I got myself a minecraft server that turns on and off on specific hours but I don't want to type the commands every time it should start playing and let it run those commands after boot. I found an old askubuntu thread (for 12.04) where this is handled and let it run as root. But for security reasons, I don't want it to run as root. I would like to still be able to type in commands to like stop the server, so it cannot run my bash script somewhere hidden.
To automatically run a command every time the system boots:
Search "Startup Applications" in the dash and open it.
Click add. For the name put "Start Minecraft Server" and under "command" put your command used to start your Minecraft server.
Press add and now the script should run on restart/startup.