How to Set Up a Minecraft Server on Ubuntu or Debian

Updated , by Alex Fornuto

Traducciones al Español
Estamos traduciendo nuestros guías y tutoriales al Español. Es posible que usted esté viendo una traducción generada automáticamente. Estamos trabajando con traductores profesionales para verificar las traducciones de nuestro sitio web. Este proyecto es un trabajo en curso.
Try this guide to receive $100 at signup on a new account.

Minecraft is one of the most popular games in the world. In Minecraft you and other players are free to build and explore anything you want in a 3D generated world. If you host your own Minecraft server, you decide the rules, and you and your friends can play together in this interactive adventure game.

This guide shows you how to set up a personal Minecraft server on a Linode running Debian 9 or Ubuntu 18.04 LTS. We have updated this guide to be compatible with the major release of 1.13: Update Aquatic.


  1. To use a Minecraft server you must also have a version of the game client from

  2. Complete our Getting Started and Securing Your Server guides.

  3. Update your Linode’s software:

    sudo apt update && sudo apt upgrade
  4. Install OpenJDK, an open-source implementation of Java, and the GNU Screen package.

    Minecraft version 1.13 is only compatible with OpenJDK 8. If you are using OpenJDK 7 you must remove it using this command sudo apt remove openjdk-7-\* before continuing with this guide.
    • In Ubuntu 18.04:

        sudo apt install openjdk-8-jre-headless screen
    • In Debian 9:

        sudo apt install openjdk-8-jre-headless screen
  5. Create a new user for Minecraft to run as:

    sudo adduser minecraft

    Assign a secure password, and configure any additional SSH hardening options at this time.


If you have a firewall configured according to our Securing Your Server guide, add the following line to your iptables.firewall.rules file to add an exception for port 25565:

-A INPUT -p tcp –dport 25565 -j ACCEPT

Install Minecraft

  1. Exit your current SSH session and log back in to your Linode as the minecraft user.

  2. Download the latest version of the Minecraft Multiplayer Server from Replace the URL in this example to match the current version:

    wget -O minecraft_server.1.13.jar

    Refer to the Minecraft server page to check for the latest release.

  3. Create a script to run the Minecraft server:

    File: /home/minecraft/
    java -Xms1024M -Xmx1536M -jar minecraft_server.1.13.jar -o true
    The Xms and Xmx flags define the minimum and maximum amount of RAM the Minecraft server will use. The settings above are recommended for a Linode 2GB used solely for this purpose. Adjust these values to fit your needs.
  4. Make executable:

    chmod +x /home/minecraft/

Run Minecraft

  1. The first time you run the Minecraft server it will create an EULA file and then exit:

    $ ./
    [21:39:43] [Server thread/INFO]: Starting minecraft server version 1.13
    [21:39:43] [Server thread/INFO]: Loading properties
    [21:39:43] [Server thread/WARN]: does not exist
    [21:39:43] [Server thread/INFO]: Generating new properties file
    [21:39:43] [Server thread/WARN]: Failed to load eula.txt
    [21:39:43] [Server thread/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.
    [21:39:43] [Server thread/INFO]: Stopping server
  2. Open the eula.txt file and change the value of eula to true:

    File: /home/minecraft/eula.txt
    #By changing the setting below to TRUE you are indicating your agreement to our EULA (
    #Tue Jan 27 21:40:00 UTC 2015
  3. To ensure that the Minecraft server runs independent of an SSH connection, execute from within a GNU Screen session:

    screen /home/minecraft/

    This time the Minecraft server console will generate a lot of output as it creates required configuration files and generates the Minecraft world:

    [22:00:06] [Server thread/INFO]: Starting minecraft server version 1.13
    [22:00:06] [Server thread/INFO]: Loading properties
    [22:00:06] [Server thread/INFO]: Default game type: SURVIVAL
    [22:00:06] [Server thread/INFO]: Generating keypair
    [22:00:07] [Server thread/INFO]: Starting Minecraft server on *:25565
    [22:00:07] [Server thread/INFO]: Preparing level "world"
    [22:00:08] [Server thread/INFO]: Preparing start region for level 0
    [22:00:09] [Server thread/INFO]: Preparing spawn area: 3%
    [22:00:21] [Server thread/INFO]: Preparing spawn area: 96%
    [22:00:22] [Server thread/INFO]: Done (14.737s)! For help, type "help" or "?"
    To disconnect from the screen session without stopping the game server, press CTRL+a and then d. To resume the running screen session, use the command screen -r.
  4. Optionally, you can take this opportunity to disconnect from the screen session and customize your game settings. When the script is executed, a world is created with the default variables. If you would like to create a new world with updated variables (like world seeds), change the level-name directive in the file and modify other settings accordingly.

    After stopping and restarting the server script with the level-name changed, a new directory is created that contains your game data for that world. For more information on available settings and how to modify them, refer to the Minecraft Wiki settings page.

Connect to your Minecraft Server

  1. Open your local Minecraft client. After logging in, click on the Multiplayer option:

  2. Click on Add server and enter your Linode’s IP address or domain name. When you’re finished click Done:

  3. Your server is now available to incoming connections. Click Join Server to connect:

Congratulations! You can now play Minecraft in a persistent world with your friends. For more information on working with screen, check out our guide on GNU Screen.

This page was originally published on

Your Feedback Is Important

Let us know if this guide made it easy to get the answer you needed.