Operating System : Ubuntu
Enter the below commands to start Minecraft game server
1. Gameserver will auto start on boot(5 sec delay). Use: screen -ls to check the running screen session game.
To view game server console, Use: screen -r games
2. You can detach from the screen session at any time by typing: Ctrl+a d
Start game server via script
1. Use: /home/minecraft/startgameserver.sh to start game server in screen session
Use: screen -ls to check running screen session game.
Use: screen -r games to view game server console
(gameserver will not stop after exit SSH when run under screen)
Start game server manually
- For manual java command start, use: cd /home/Minecraft and use: java -Xmx1G -Xms1G -jar server.jar nogui
Edit -Xmx1G -Xms1G for different ram allocation.
Example use: java -Xmx4G -Xms4G -jar server.jar nogui for 4GB ram allocated to game server
Adding a server in-game
1. Server creation is done when console log shows: Done (*s)! For help, type "help"
2. Go to the game client. Multiplayer >> Add server >> enter VPS IP along with port number 25565
Example 123.45.67.89:25565
Attach screen after exiting SSH
Use: screen -r games
Note: "WARN:Can't keep up! Is the server overloaded?" login console is normal on the first load due to high CPU usage when creating the game server (Duration less than 1 minute)
Changing server properties
- Change max player (Linux)
- Use: cd /home/minecraft to go to game server directory
- Use : ls to view files
- Use: nano server.properties to edit server.properties file
- Find “max-players” and edit the value to set max players in game server
- Ctrl-X to exit and save file will be prompted. Enter “Y” for confirmation
Adding game server plugins (Linux)
- If your game server is running, use stop in console to stop game server
- Navigate to the plugins folder using. Use: cd /home/papermc/plugins
- Download plugins .jar file using wget from website such as: https://www.spigotmc.org/resources/ or https://dev.bukkit.org/projects
- Right click on the Download Now button and copy link address
- wget <paste in the download link> Example: wget https://dev.bukkit.org/projects/spark/files/latesthttps://www.spigotmc.org/resources/spark.57242/download?version=460794
- If wget does not work, use curl. Example: curl -O https://dev.bukkit.org/projects/spark/files/latesthttps://www.spigotmc.org/resources/spark.57242/download?version=460794
- Make sure downloaded file is jar file. Use ls to show files
- Rename downloaded file if not in jar format. Use: mv latest spark.jar
- Start game server via script. Use: /home/papermc/startgameserver.sh
- Use: screen -r games to view game server console
- Use: plugins in game console to preview active plugins
- Use /plugins in game to check installed plugins