Minecraft server installation on VPS/VDS may differ depending on the operating system you are using. Minecraft is a popular sandbox toy created by Swedish programmer Markus Persson and released by his studio Mojang AB. In this article we will tell you how to install the indie toy on a virtual server UPU/VDS on the Linux operating system.
Check that Java is installed on your server. If Java is not already installed, install it by running the following command in the terminal:
sudo apt-get update
sudo apt-get install default-jre
Create a separate user for the Minecraft server. This will increase security and simplify server management. Run the following command to create the user:
sudo adduser minecraft
Log in as the minecraft user:
sudo su - minecraft
Create a directory for the Minecraft server:
mkdir minecraft-server
cd minecraft-server
Download the Minecraft server from the official source, then install the Minecraft server using the following command:
java -Xmx1024M -Xms1024M -jar server.jar nogui
This command will start the Minecraft server with 1024 MB of memory and no GUI. During the first startup, the server will create the necessary configuration files. Edit the server.properties file to customize the Minecraft server. You can change the server name, maximum number of players and other parameters. The file is located in the minecraft-server directory.
Start the Minecraft server using the following command:
java -Xmx1024M -Xms1024M -jar server.jar nogui
You can configure the Minecraft server to autostart using systemd
. Create a minecraft.service file in the /etc/systemd/system
directory with the following contents:
[Unit]
Description=Minecraft Server
After=network.target
[Service]
User=minecraft
WorkingDirectory=/home/minecraft/minecraft-server
ExecStart=/usr/bin/java -Xmx1024M -Xms1024M -jar server.jar nogui
Restart=on-failure
[Install]
WantedBy=multi-user.target
After creating the minecraft.service file, run the following command to restart the systemd daemon and start the service:
sudo systemctl daemon-reload
sudo systemctl enable minecraft
sudo systemctl start minecraft
The Minecraft server is now running on your Linux VPS/VDS and is ready to use. You can connect to the server using the Minecraft client on your computer.
Apply the discount by inserting the promo code in the special field at checkout: