---
title: "How to create a Minecraft server on a VPS"
description: "Find out how to install your own Minecraft server"
url: https://docs.ovhcloud.com/en/guides/bare-metal-cloud/virtual-private-servers/minecraft-server-on-vps
lang: en
lastUpdated: 2025-06-06
---
# How to create a Minecraft server on a VPS

## Objective

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](https://www.ovhcloud.com/en-gb/vps/) or on a [dedicated server](https://www.ovhcloud.com/en-gb/bare-metal/). 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.**

:::warning
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](https://partner.ovhcloud.com/en-gb/directory/) and/or discuss the issue with our community. You can find more information in the [Go further](#gofurther) section of this guide.

:::

## Requirements

- A [Virtual Private Server](https://www.ovhcloud.com/en-gb/vps/) in your OVHcloud account
- A GNU/Linux distribution installed on the server
- Administrative access (sudo) via SSH to your server
- A basic understanding of GNU/Linux administration

## Instructions

:::info
This tutorial is based on version "1.21" of Minecraft Java Edition and OpenJDK version "24.0.1".

:::

### Step 1: Prepare the server

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](/en/guides/bare-metal-cloud/virtual-private-servers/starting-with-a-vps.md#reinstallvps)
 if necessary.
Once the OS is installed, connect to your VPS with SSH as described in the [Getting started guide](/en/guides/bare-metal-cloud/virtual-private-servers/starting-with-a-vps.md).

First update the packages to their latest versions:

```sh
$ sudo apt update
```

```sh
$ sudo apt full-upgrade
```

Use the following command to ensure all required packages are installed.

```sh
$ sudo apt install screen nano wget git
```

Install the Java package:

```sh
$ sudo apt install openjdk-24-jdk
```

To avoid security vulnerabilities on your system, create a user named "minecraft" who will carry out the server actions:

```sh
$ sudo adduser minecraft --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:

```sh
$ sudo su - minecraft
```

:::info
The following commands need to be executed by the user "minecraft".

:::

To complete the setup preparations, create a folder named `server`.

```sh
$ mkdir ~/server && cd ~/server
```

### Step 2: Install your Vanilla Minecraft server

:::info
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](https://minecraft.net/download/server)
, right-click on the download link and select `Copy Link
` from the context menu.
![Server download](/images/bare-metal-cloud/virtual-private-servers/minecraft-server-on-vps/jar_file_download.png)
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.

```sh
~/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.

```sh
~/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](https://www.minecraft.net/).

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`:

```sh
~/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:

```sh
~/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:

```sh
~/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.)

```sh
~/server$ java -Xmx1024M -Xms1024M -jar server.jar nogui
```

- `Xmx1024M`: This sets the server to start up with 1024 MB or 1 GB of RAM. This limit can be increased if you want your server to start up with more RAM.
- `Xms1024M`: This sets the server to use a maximum of 1024M RAM. You can increase this limit if you want your server to run with more RAM, to accommodate more players, or if you have the impression that your server is running slowly.
- `jar`: Specifies which server jar file to run.
- `nogui`: This instructs the server not to launch a GUI, since it's a server and you don't have a GUI.

Alternatively, you can use the command below instead:

```sh
~/server$ java -jar server.jar
```

Once the server is operational, you will get the following result:

```console
[14:52:58] [Server thread/INFO]: Done (41.530s)! For help, type "help"
```

To shut down your server, enter the command `stop`.

### Step 3: Connect to the server

Your server instance is now functional. To play the game, download the Minecraft client from the official [Minecraft website](https://www.minecraft.net/).

Install and launch the client for your operating system and sign in.

![Server connection](/images/bare-metal-cloud/virtual-private-servers/minecraft-server-on-vps/login_minecraft.png)
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`.

![Server information](/images/bare-metal-cloud/virtual-private-servers/minecraft-server-on-vps/minecraft_server_login.png)
By default, no port needs to be specified.

### Conclusion

Your Vanilla Minecraft server is now installed on your VPS.

Please note that this installation guide should also work on an OVHcloud [dedicated server](https://www.ovhcloud.com/en-gb/bare-metal/) or a [Public Cloud](https://www.ovhcloud.com/en-gb/public-cloud/compute/) instance. With those services, you will have the advantage of better stability since the hardware is dedicated.

## Go further [](#)
For add-ons, mods and to personalise your Minecraft experience, please consult this official documentation: [https://help.mojang.com/](https://help.mojang.com/).

Join our [community of users](https://community.ovhcloud.com/).
