Skip to content

Instantly share code, notes, and snippets.

@slashtechno
Last active May 1, 2022 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slashtechno/92ed450cbbc935be2f472d35e67cf12f to your computer and use it in GitHub Desktop.
Save slashtechno/92ed450cbbc935be2f472d35e67cf12f to your computer and use it in GitHub Desktop.
systemd service to run MC server
[Unit]
Description= minecraft server service
[Service]
User=pi
WorkingDirectory=/home/pi/minecraft-servers/survival-1.18.2
ExecStart=/usr/bin/java -Xms512M -Xmx2048M -jar /home/pi/minecraft-servers/survival-1.18.2/spigot-1.18.2.jar nogui
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment