Tutorial - How to create a Minecraft server on a VPS
Find out how to install your own Minecraft server
Find out how to install your own Minecraft server
Last updated 29th June 2021
Minecraft is a popular sandbox video game. It needs to be hosted on a server if you wish to play in multiplayer.
You can rent a pre-built Minecraft server or you can set it up yourself on a VPS or on a dedicated server. This will reduce the cost and give you full control over your game instance.
This tutorial explains how to launch a Minecraft Java Edition server on an OVHcloud VPS and test its connectivity.
This guide will show you how to use one or more OVHcloud solutions with external tools, and will describe the actions to be carried out in a specific context. ou may need to adapt the instructions according to your situation.
If you encounter any difficulties performing these actions, please contact a specialist service provider and/or discuss the issue with our community. You can find more information in the Go further section of this guide.
This tutorial is based on version "1.17" of Minecraft Java Edition and OpenJDK version "16.0.1".
The first step is to set up your VPS for a Minecraft installation.
It is recommended to order a new VPS or reinstall an existing one from your OVHcloud Control Panel, using the latest available release of Ubuntu or Debian. Please refer to our Getting started guide if necessary.
Once the OS is installed, connect to your VPS with SSH as described in the Getting started guide.
First update the packages to their latest versions:
~$ sudo apt update
~$ sudo apt full-upgrade
Use the following command to ensure all required packages are installed.
~$ sudo apt install screen nano wget git
Install the Java package:
~$ sudo apt install openjdk-16-jdk
To avoid security vulnerabilities on your system, create a user named "minecraft" who will carry out the server actions:
~$ sudo adduser minecraft --disabled-login --disabled-password
Simply press the Enter
key to skip filling in the usual account information.
The user is now created. Note that no password was specified for this user. This is normal because the account is only accessible when already connected via SSH with your own user account.
Switch to the new user:
~$ sudo su - minecraft
The following commands need to be executed by the user "minecraft".
To complete the setup preparations, create a folder named server
.
~$ mkdir ~/server && cd ~/server
A "Vanilla" server is an instance without any add-ons or plugins. You will experience the game the way it was created by the developers.
First you will need to copy/paste the download link for the server software. On the official Minecraft website, right-click on the download link and select Copy Link Location
from the context menu.
Back in your command line terminal, make sure you are still in the server
folder and use wget
to download the file. Replace download_link
with the actual URL from your clipboard.
~/server$ wget download_link
Before launching the server, you need to agree to the End User License Agreement. To achieve this, enter the following command.
~/server$ echo "eula=true" > eula.txt
A file named eula.txt
is now located at the root level of your server, containing the line eula=true
. This will tell the software that you accept the Minecraft EULA. We invite you to review the terms and conditions on the Minecraft website.
Your server can now be started.
During step 1, we installed the screen
package which allows opening multiple sessions of the terminal (shell). We will start Minecraft in a new session that can run in the background. Using screen
can be very handy since it gives you the possibility to launch multiple Minecraft servers simultaneously.
First, we will create a new shell named minecraft1
:
~/server$ screen -S minecraft1
The active terminal window will switch to a new shell session. You can create multiple shells; list them with this command:
~/server$ screen -ls
To detach from the shell (and keep it running), press Ctrl
, then a
, then d
on your keyboard.
To switch from one shell to another, use this command:
~/server$ screen -x name_of_shell
You can also press Ctrl
, then a
, then n
on your keyboard.
In the previously created minecraft1
shell, launch the Minecraft server with the following command. (Use ls
to verify the filename in case it differs.)
~/server$ java -jar server.jar
To shut down your server, enter the command stop
.
Your server instance is now functional. To play the game, download the Minecraft client from the official Minecraft website.
Install and launch the client for your operating system and sign in.
On the next screen, enter the server name in the field Server Name
, and the IP address of the server in the field Server Address
.
By default, no port needs to be specified.
Your Vanilla Minecraft server is now installed on your VPS.
Please note that this installation guide should also work on an OVHcloud dedicated server or a Public Cloud. instance. With those services, you will have the advantage of better stability since the hardware is dedicated.
For add-ons, mods and to personalise your Minecraft experience, please consult this official documentation: https://help.mojang.com/.
Join our community of users on https://community.ovh.com/en/.
Please feel free to give any suggestions in order to improve this documentation.
Whether your feedback is about images, content, or structure, please share it, so that we can improve it together.
Your support requests will not be processed via this form. To do this, please use the "Create a ticket" form.
Thank you. Your feedback has been received.
Access your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.
Discuss with the OVHcloud community