Ubuntu Server - Start server as root user

So I installed MineOS-node on Ubuntu Server 20.04.1 LTS. The WebUI is working however the server can’t write to files.

I need to run the java -jar spigot-1.16.4.jar as root (sudo).

How can I do this?

Servers do not need to be run as root– in fact, that is the only user you don’t want to run java servers with.

I think this is because you’ve probably run java as root, making the files owned by root, and therefore other users cannot write to the filesystem.

  1. don’t use the webui as root
  2. correct permissions to match the user you want the server to run as:

chown -R myuser:myuser /var/games/minecraft/servers/MYSERVER