Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to create a new Minecraft Server with DigitalOcean

Creating a new Minecraft Server

This is a short and simple guide on how to set up a multiplayer server running the latest version of Minecraft.

This guide has been tested on Ubuntu 16.04 and 18.04.

Setup

Create a new Ubuntu 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

Running the Server

Copy the download link of the latest Minecraft version here.

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

mkdir minecraft
wget -O minecraft_server.jar <paste-download-link-here>

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

You might need to update your firewall configuration so that the correct ports are open if you are getting the message "Unable to connect to world".

ufw allow 25565/tcp

Editing Properties

A server.properties file is automatically created when you run the server for the first time. A list of properties can be found here.

vi server.properties

Please note that after you edit the properties, you'll need to restart your server.

@John-Kryspin

This comment has been minimized.

Copy link

@John-Kryspin John-Kryspin commented Aug 18, 2019

Thanks for this!

@dgramma

This comment has been minimized.

Copy link

@dgramma dgramma commented Aug 31, 2019

So simple. Thank you!

@AlfredoDaAs

This comment has been minimized.

Copy link

@AlfredoDaAs AlfredoDaAs commented Nov 3, 2019

can this work for an Ubuntu 18.04 server?

@niksudan

This comment has been minimized.

Copy link
Owner Author

@niksudan niksudan commented Nov 5, 2019

@AlfredoDaAs

can this work for an Ubuntu 18.04 server?

Should be fine, haven't verified though.

@abinavseelan

This comment has been minimized.

Copy link

@abinavseelan abinavseelan commented Nov 13, 2019

@AlfredoDaAs

can this work for an Ubuntu 18.04 server?

Just tested this on 18.04. Works pretty well. 🙂

@TannerBluhm

This comment has been minimized.

Copy link

@TannerBluhm TannerBluhm commented Nov 16, 2019

How can I install Forge on this server?

@vincenzofehring

This comment has been minimized.

Copy link

@vincenzofehring vincenzofehring commented Jan 25, 2020

When I followed this, my 18.04 Digital Ocean Droplet, my server starts fine, but my game says "Unable to connect to world." Do I need to open ports, on the droplet, or what am I missing?

@leviable

This comment has been minimized.

Copy link

@leviable leviable commented Mar 18, 2020

If anyone else is having vincenzofehring's issue above, you need to update ufw:
ufw allow 25565/tcp

@asett0

This comment has been minimized.

Copy link

@asett0 asett0 commented Mar 21, 2020

Yep can confirm leviable's suggestion. Had the same problem as vincenzofehring but now it works.

@niksudan

This comment has been minimized.

Copy link
Owner Author

@niksudan niksudan commented Mar 21, 2020

Thank you @leviable and @asett0! I've updated the guide accordingly.

@arpitbhardwaj24

This comment has been minimized.

Copy link

@arpitbhardwaj24 arpitbhardwaj24 commented Aug 6, 2020

Thanks a lot. Simple af.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.