This got out of date very quickly. I’ve added a section for the upgrade to 1.16.1 below.
I initially started with a $5 per month VM on Digital Ocean (but more on that below.)
$ sudo apt update $ sudo apt install openjdk-8-jre-headless $ sudo apt install screen
$ sudo ufw allow 25565
$ wget https://launcher.mojang.com/v1/objects/bb2b6b1aefcd70dfd1892149ac3a215f6c636b07/server.jar $ mv server.jar minecraft_server_1.15.2.jar
(or whatever is current)
Accept button is stored in the a text file. Edit that file and replace the value
$ nano eula.txt #By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula). #Tue Mar 24 22:05:31 UTC 2020 eula=false
screen to allow the server to run, even if you’re not logged in.
$ screen $ java -jar minecraft_server_1.15.2.jar nogui
Once everything is up and running press
Ctrl + A + D to disconnect.
Use the following command to check if the server is still running.
$ screen -list ~$ screen -list There is a screen on: 1182.pts-0.minecraft-server (06/19/20 08:35:41) (Detached) 1 Socket in /run/screen/S-martin.
1182 will be different for each installation.
You can then use the
-r option to reconnect and see the output of the server running.
$ screen -r 1182
I started with the smallest available VM for $5/month with 1 GB of RAM but ended up with a couple of out of memory exceptions and complaints from the players about slow rendering. So I’ve now upgraded to the next bigger droplet with 2 GB for $10/month.
So if you’re thinking about running your own MC server for a fiver a month: don’t.
However, so far, without specifying any constraints MC only appears to be using 50% of the available memory. This is with two players. I might go back at some point and revisit the smaller version of the droplet.
The server version needs to match the version of the client. The client just got upgraded to 1.16 and to 1.16.1 a few minutes later. And the same then applies to the server, otherwise you won’t be able to connect.
I first use
sudo apt update and
dist-upgrade and then rebooted. Which is probably good practise anyway. And it closes out any servers already running.
Then download the latest version of the server (1.16.1)
$ wget https://launcher.mojang.com/v1/objects/a412fd69db1f81db3f511c1463fd304675244077/server.jar $ mv server.jar minecraft_server_1.16.1.jar
Then launch that
$ screen $ java -jar minecraft_server_1.16.1.jar nogui
And when it says
Ctrl + A + D.