How I set up a Minecraft server to run multiplayer beta versions. This guide assumes you are running Linux on your local machine.
Prerequisite
- Download MultiMC or other way to run beta Minecraft on your local machine. The version you’re playing must match the exact version (“instance” in MultiMC) as the
.jar
file you use for the server.
Download a server.jar file and create a folder for it
-
Download the Minecraft server .jar file of the version you want. Here are a few popular versions:
-
Create a folder for the server files and move the .jar file into it. I named mine
mcserver
– this guide will require less code changes if you name yours the same.
Get a server
-
Buy an ultra-basic VPS (virtual private server). On Vultr (my recommendation), you want the “Cloud Compute” option. Anything over $8 per month is probably more than you need.
-
Choose RAM/OS: 1024mb RAM with Ubuntu 22.04 LTS is a good option and what this guide is designed for.
-
Deploy it and save the server IP address somewhere. It’ll be something in a format like
40.50.600.70
. This will be the Minecraft server address. -
Save the root password somewhere. You’ll need this to set up SSH for the first time below.
SSH setup
On your local machine, set up SSH to connect to the server and log in from your local machine.
Create a SSH key (put in your email):
ssh-keygen -t ed25519 -C "youremail@email.com"
Copy the key to your new server (put in the IP address). This is the step where you’ll need that root password you wrote down before.
ssh-copy-id -i ~/.ssh/id_ed25519.pub root@40.50.600.70
Connect to the server
Login is easy from your local machine now that ssh is set up (put in IP address):
ssh root@40.50.600.70
Install Java, Rsync and open ports
These commands are run on the server through the terminal window that you connected above.
Install openjdk 8 Java:
sudo apt install openjdk-8-jre-headless
Install Rsync:
sudo apt install rsync
Set up ports:
sudo ufw allow 43
sudo ufw allow 80
sudo ufw allow from any to any port 25565 proto tcp
sudo ufw enable
Set up a directory for Minecraft:
cd ../var/
mkdir mcserver
Use Rsync to move server.jar to server
Now, back on your local machine, move the server file that you downloaded to the server itself.
rsync -avz --delete mcserver/ root@40.50.600.70:/var/mcserver
This deletes everything in the server’s /var/mcserver
directory that is not inside of your local mcserver
folder.
Initiate the Minecraft server
Back on the server, execute the Java command below to start the server (note that if your server file is not named server.jar
, you need to update that):
cd ../var/mcserver
java -Xmx1024M -Xms1024M -jar server.jar nogui
Once it initiates, shut it down (I just use CTRL-C) so we can update some of the newly created files.
vi server.properties
- In vi, press
i
to INSERT so you can change some of the settings - Set online-mode to
false
so the program won’t try to authenticate your account with dead servers from 2011. - Use
ESC
then:wq
to save and quit vi
Run the Minecraft server
Run the following commands from your local machine in a new terminal to fire up the Minecraft server (again note the IP address and the name of the .jar file). These commands can be used anytime to start the server when ready.
ssh root@40.50.600.70
cd ../var/mcserver
java -Xmx1024M -Xms1024M -jar server.jar nogui
You can set the 1024M
parts as 2048M
to allocate more RAM, if desired. Remember that we set our server deployment as 1024 though.
It is also possible to log into root on your VPS provider’s website interface and run the Java command to keep the server running indefinitely. Right now, the logs are printed in the terminal window and if I shut it down the server will go offline.
Connect to the server in the Minecraft window
- Open MultiMC or whatever you’re using to play old Minecraft versions.
- Start the Minecraft instance.
- In Multiplayer settings, add server or direct connect. Just plug in the
40.50.600.70
IP address as the server address. - Note: the Connection reset error is normally because you’re not using the exact version instance like Beta 1.7.9 as the .jar file. It has to match exactly. If you’re running the Beta 1.8.1 file on the server and trying to connect on a 1.7.9 MultiMC instance, it’ll fail.
Backups
I run this command:
rsync -av root@40.50.600.70:/var/mcserver/ mcbackup/
periodically to back up the gamefiles on the server to my local machine. This has been glitchy before so please check my code.
Enjoy
Old Minecraft is the best Minecraft! Share your server’s IP address with your friends and go play.
Daniel