

It is recommended to enable this setting for all long-running services (in particular network-facing ones). # /home, /root and /run/user seem to be empty from within the unit. # Read only mapping of /usr /boot and /etc # Users Database is not available from within the unit, only root and minecraft is available, everybody else is nobody # Solves the issue where the minecraft server will endlessly restart itself Create the Systemd Unit file nano and the following:.Now you need to create the user for the service: useradd -system -shell /usr/sbin/nologin -home /opt/minecraft -g minecraft minecraft.Create the minecraft group for the minecraft user we'll add in the next step: groupadd minecraft.Create the /opt folder if it doesn't already exist: mkdir /opt.Next install the necessary packages apt install openjdk-8-jre-headless curl screen nano bash grep.To check if you are root, run whoami to display your username. Connect to your (v)root server or if you want to run the server on your machine, open a terminal.For Ubuntu, it comes with 15.04 (15.04 is an old version which have had end-of-support, we suggest using later LTS versions instead, but the following contents is fully working in this version). For all modern Servers supporting Systemd.
