Advertisement
Guest User

derpderpderp, what's a UPS?

a guest
Aug 7th, 2023
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. > sudo nano /etc/systemd/system/minecraft.service
  2.  
  3.  
  4. <<
  5. [Unit]
  6. Description=Minecraft Server
  7. After=network.target
  8.  
  9. [Service]
  10. User=<minecraft_username> # Replace this with the username you use to run the Minecraft server
  11. WorkingDirectory=/path/to/minecraft/server
  12. ExecStart=/path/to/java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui # Replace this with the actual startup command for your Minecraft server
  13. Restart=on-failure
  14.  
  15. [Install]
  16. WantedBy=multi-user.target
  17. >>
  18.  
  19. sudo systemctl daemon-reload
  20. sudo systemctl enable minecraft.service
  21. sudo systemctl start minecraft.service
  22.  
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement