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.
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
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
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.
You can upload your world to the internet (that is, some hosting server). This is HTTP, which is suitable for file downloading, so you will need to first zip the directory where you have your Minecraft world, and then
wget
the url where you have stored it. As an example, if you hosted it in Google Drive, see this. You can alsogit clone
a Github repository where your world is uploaded, which under the hood is basically the same idea.However, there is a more specialized protocol to share files and filesystem resources in general: FTP (File Transfer Protocol). There are plenty of FTP GUI clients to get started. FileZilla is a nice choice to begin with. Of course, you can use FTP within a console. In linux, there is the
ftp
command, but I encourage you to use insteadsftp
, which is essentially a secure version offtp
that usesssh
for authtentication. DigitalOcean has an specialized guide here.