Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Minecraft SystemD Unit File
[Unit]
Description=Minecraft
After=network.target
[Service]
Type=simple
User=minecraft
Group=minecraft
WorkingDirectory=/var/lib/minecraft/current
ExecStart=java -jar -Xmx2G -Xms1G server.jar --nogui
Restart=always
Environment=USER=minecraft HOME=/var/lib/minecraft/current
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.