Setup auto boot

Assumption in this tutorial: The restricted user for OpenSim is “maria”.

We copy the following script with the file name “” as user root to /etc/systemd/system. (You can select any filename and directory, we select the sake of clarity the directory containing the configuration file.) With this script, at boot time the self-made firewall script is called. Finally, the user is set to the restricted OpenSim account (here maria), and in whose home directory a file “” is called. There later the limited user can run programs at start-up.

vi /etc/systemd/system/
# /etc/systemd/system/

case $1 in
    bash /root/
    su maria -l -c 'bash' &
    echo "Usage: $0 {start|stop}"
    exit 1

Then we set execute permissions:

chmod u+x /etc/systemd/system/

Thus, our script can be started as a service, it still needs a configuration file. Here, the directory /etc/systemd/system is mandatory, the file extension .service as well. So here we call the configuration file meaningful “maria-autostart.service”:

vi /etc/systemd/system/maria-autostart.service
Description=At system boot start firewall and call of user.

ExecStart=/etc/systemd/system/ start
ExecStop=/etc/systemd/system/ stop


If both files are created, we must activate the service:

systemctl enable maria-autostart.service

Log in now with the limited user account, and in its home directory (here maria) create a text file named “”. For first, this file can be left empty, later it will be filled with the startup commands for OpenSim. Do this file creation not as user root, otherwise later the restricted user cannot modify the file.
Set execute permissions: “chmod u+x”

Computer boot up once a day

(To deepen see also: Wiki)

OpenSim is still in beta stage, and is sometimes not very stable. Therefore, the computer shall start anew each day. Paste the following line into the file /etc/crontab:

0 6 * * * root shutdown -r now

The numbers give the time, here 6:00 o’clock.

Continued: Configuring MariaDB (or MySql)

Scroll to Top