---
title: How to Install a Minecraft Server on Ubuntu 20.04
url: https://docs.vultr.com/how-to-install-a-minecraft-server-on-ubuntu-20-04
description: Learn how to install and configure your own Minecraft server on Ubuntu 20.04 with our step-by-step guide. Perfect for gamers who want complete control.
publish_date: 2021-02-11T00:00:00Z
last_updated: 2026-09-09T23:27:20.322973Z
header_image: https://assets.vultrdevrel.com/docs-main-doc-assets-1/833/f41324d2938b06c0.png
---

> Index of every Vultr Docs page in markdown: https://docs.vultr.com/llms.txt

## Introduction

This article explains the steps to install Minecraft cloud gaming servers on Ubuntu 20.04.

## Prerequisites

* Deploy a [Vultr Ubuntu 20.04](https://console.vultr.com/deploy) instance with at least 1 GB of RAM.
* [Update the Ubuntu server](https://docs.vultr.com/how-to-update-a-vultr-cloud-server#how-to-update-debian--ubuntu).

## 1. Create a Minecraft User

Create a sudo user named **minecraft**.

    # adduser minecraft
    # usermod -aG sudo minecraft

Switch to the new user.

    # su - Minecraft

## 2. Install Java and Screen

Update the package index.

    $ sudo apt update

Install Java.

    $ sudo apt install openjdk-16-jdk -y

Install Screen. This allows your server to run without leaving your terminal open.

    $ sudo apt install screen -y

Confirm the installed packages.

    $ sudo java -version

## 3. Install the Minecraft Server

Create a new server directory for your server files.

    $ mkdir minecraft

Move to the directory.

    $ cd minecraft

Install `wget`

    $ sudo apt install wget

Navigate to [https://www.minecraft.net/en-us/download/server](https://www.minecraft.net/en-us/download/server) to find the download links for the latest version of Minecraft. Download it with `wget`. For example, with version **1.16.4**`, run:

    $ sudo wget https://launcher.mojang.com/v1/objects/35139deedbd5182953cf1caa23835da59ca3d7cd/server.jar

Run the server. The `1024M` parameter in `-Xms1024M -Xmx1024M` configures Java for 1 GB of RAM. Change this to the amount of RAM you want to allocate for Minecraft. The operating system requires available RAM as well, please don't assign all available RAM to Minecraft. For example, if the server has 4 GB RAM, you might consider setting `-Xms3072M -Xmx3072M`.

    $ java -Xmx1024M -Xms1024M -jar server.jar nogui

You should receive an similar output to this.

    [main/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.

To agree to the EULA, edit eula.txt.

    $ sudo nano eula.txt

Find the line that says `eula=false` and change it to `eula=true`. Save and exit the file.

Create a startup script for your server.

    $ nano start.sh

Paste the following into start.sh. Adjust the `Xmx` and `Xms` RAM values as needed.

    #!/bin/sh
    while true
    do
    java -Xmx1024M -Xms1024M -jar server.jar nogui
    echo "restarting in 10"
    sleep 10
    done

Save and exit the file.

Make `start.sh` executable.

    $ chmod +x start.sh

Create a screen instance for the server.

    $ sudo screen -S "Minecraft Server"

Start your server script.

    $ ./start.sh

To exit the screen session, press :key_control: + :key_a: then :key_d:. To resume the screen session, run:

    $ sudo screen -R

### Server Modification Tips

Here are some tips for your Minecraft server:

* You can use Minecraft commands in the screen session without a leading `/`. For example `op @a` will make everybody online a server operator.
* To modify the general game settings for your Minecraft server, input the command `sudo nano server.properties` to get access to them.
* The Minecraft server creates a new directory called `world` on the first launch for Minecraft modifications, datapacks, and other features.

### References

* [Minecraft Server Download](https://www.minecraft.net/en-us/download/server)
