I have a Minecraft server on my ubuntuserver which starts with systemctl. When I stop the minecraft server to restart it, the service is only inactive. I would like the server to restart automatically.
You probably haven't activated the service.
sudo systemctl enable SERVICE
Only then does it start automatically. At least as far as I know 🤣 It can also be started without enabled. There was also how to set services to restart automatically as soon as they are turned off. But you have to read that yourself. I can highly recommend Ubuntuusers.de.