Overview
Installing a Minecraft server on a VPS (Virtual Private Server) provides better performance and customization options. It allows for smoother gameplay, control over server settings, and the ability to create a global gaming community. A VPS will enable 24/7 availability for the Minecraft server, ensuring it remains online even when the local machine is powered off.
Note: Java 8 and Minecraft version 1.16.5 is used in this example.
Note: Right-click to paste contents into the SSH.
How to Install Minecraft on a VPS Server
Step 1. Log in to the VPS server using an SSH client.
Step 2. Depending on the preferred version, run the following commands to install Java:sudo apt-get update
Java 8 - sudo apt install openjdk-8-jdk
Java 11 - sudo apt install openjdk-11-jdk
Java 17 - sudo apt install openjdk-17-jdk
Step 3. When prompted, input Y
and press Enter.
Step 4. Run the following commands to set up and go to the Minecraft directory.mkdir /Minecraft
cd /Minecraft
Step 5. Find the Minecraft server .jar
download link on MCVersions.
Step 6. Right-click on Download Server jar and select Copy Link Address.
Step 7. Run the following command: wget minecraft_server.jar [Download Link]
Step 8. Run the following command to create a screen to run the Minecraft server even when the SSH session is not open:screen -S minecraft
Step 9. Run the following command to start the Minecraft server:java -Xms1024M -Xmx1024M -jar server.jar
Step 10. Run the following command to edit the EULA: nano eula.txt
Step 11. Change false
to true
.
Step 12. Press CTRL + X.
Step 13. Input Y
and press Enter.
Step 14. Run the following command to start the Minecraft server:java -Xms1024M -Xmx1024M -jar server.jar
Replace 1024
with the amount of RAM desired to allocate on the Minecraft server. The amount of RAM should be less than the RAM allocated to the VPS.
Step 15. Press CTRL + A + D to detach the server to leave it running in the background even if the SSH client is closed.
Step 16. Run the following command to reattach the screen: screen -r minecraft
- VPS, VPS Server, Minecraft VPS, how to install minecraft on a VPS
- 7 Users Found This Useful