Skip to content

Instantly share code, notes, and snippets.

@dan-king
Forked from niksudan/mc-server-setup.md
Last active March 31, 2018 23:25
Show Gist options
  • Save dan-king/a7bf1664c26ccf8caf2a9c63f632d058 to your computer and use it in GitHub Desktop.
Save dan-king/a7bf1664c26ccf8caf2a9c63f632d058 to your computer and use it in GitHub Desktop.
How to create a new Minecraft Server with DigitalOcean

Creating a new Minecraft Server

Setup

Create a new Ubuntu 16.04 droplet on DigitalOcean. Make sure it has at least 2GB of RAM, and you provide it with your SSH key.

SSH into the server and install Java, which is required for Minecraft to run.

apt-get update && apt-get install default-jdk
java -version

Additionally, install Screen, which will allow us to run the server in the background.

apt-get install screen

Getting the Minecraft server software

Create a directory to install the server files and download the server.

mkdir minecraft
cd minecraft
wget -O minecraft_server.jar https://s3.amazonaws.com/Minecraft.Download/versions/1.12/minecraft_server.1.12.jar

Running the Minecraft server

Start the server. Change '512M' to your server's memory availability.

java -Xmx512M -jar minecraft_server.jar nogui```

Agree to the EULA

You need to do this to allow it to run:

sudo nano eula.txt

Change “false” to “true” and save it.

Edit the server properties file.

vi server.properties

Start a new screen session.

screen -S Server

Run the server.

java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui

Exit the screen session.

CTRL + A, D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment