Skip to content

Instantly share code, notes, and snippets.

@yoshimov
Created July 11, 2021 06:56
Show Gist options
  • Save yoshimov/64b246182889f2c61d8e4f26722404bb to your computer and use it in GitHub Desktop.
Save yoshimov/64b246182889f2c61d8e4f26722404bb to your computer and use it in GitHub Desktop.
systemd service for minecraft server
[Unit]
After=multi-user.target
[Service]
ExecStartPre=/home/ec2-user/check_version.sh
ExecStart=/usr/bin/java -Xmx7500M -Xms3000M -jar server.jar nogui
User=ec2-user
Restart=always
WorkingDirectory=/home/ec2-user
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment