Skip to content

Instantly share code, notes, and snippets.

@JohnMertz
Last active August 17, 2020 02:45
Show Gist options
  • Save JohnMertz/c6bb4a9298dd3dc53b8030ff50466226 to your computer and use it in GitHub Desktop.
Save JohnMertz/c6bb4a9298dd3dc53b8030ff50466226 to your computer and use it in GitHub Desktop.
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