Minecraft Bedrock Edition – Ubuntu Dedicated Server Guide

Minecraft Bedrock Edition Logo
Minecraft: Bedrock Edition Logo

Minecraft Bedrock Edition is the version of Minecraft that powers the iPhone / Android versions (formerly Minecraft Pocket Edition), the Xbox / PlayStation / Nintendo Switch editions and the free Windows 10 Minecraft edition.

Mojang has released a dedicated server which is considered to be in alpha testing.  I have found it to be very stable and able to run on a wide variety of hardware.

This script and guide are written to help you get a robust Minecraft Bedrock dedicated server up and running in only a few minutes!

This is the standalone version. The easiest and most problem-free way to run this is using Docker (installed as simply as sudo apt install docker.io): Legendary Minecraft Bedrock Container

I’ve also released a way for Java and Bedrock players to play on the same server using Geyser: Minecraft Java + Bedrock Server Together – Geyser + Floodgate

It’s now possible to convert your worlds between Bedrock and Java versions. Check out my guide on Chunker here for more information.

Features

  • Sets up the official Minecraft Bedrock Server (currently in alpha testing)
  • Fully operational Minecraft Bedrock edition server in a couple of minutes
  • Ubuntu / Debian distributions supported
  • Sets up Minecraft as a system service with option to autostart at boot
  • Automatic backups when server restarts
  • Supports multiple instances — you can run multiple Bedrock servers on the same system
  • Updates automatically to the latest or user-defined version when server is started
  • Easy control of server with start.sh, stop.sh and restart.sh scripts
  • Adds logging with timestamps to “logs” directory
  • Optional scheduled daily restart of server using cron

Requirements

  • A computer with a 64 bit processor (if you are trying to use ARM read my article on the limitations). 32 bit binaries of the official server are not available so it needs to be 64 bit!
  • 1 GB of RAM or higher
  • The only officially supported platform by Microsoft is Ubuntu 22.04 / 20.04 (current LTS, recommended)
  • Other Linux flavors supported by this script as well as long as they use systemd (for the service). The script assumes apt is installed but there are minimal dependencies so you could install these on another distro (that doesn’t have apt present) and use the script normally.

Recommended Gear

Game Editions

Minecraft: Bedrock Edition is the “Windows 10” version of Minecraft as well as the version of Minecraft on the Xbox / Playstation / Switch. The versions of Minecraft for Android and iOS are also the Bedrock edition.

All of these versions support cross-platform play with each other (but not with the Java edition).

Minecraft Bedrock Digital Code
Minecraft Bedrock Digital Code

This is the PC Minecraft for Windows 10 (Bedrock) edition of Minecraft. It is able to play cross-platform with other players on Android / iOS / Playstation / Xbox / Switch. Available as a code that is instantly activated to give you permanent access to the game!

Links: Amazon.com*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*

Minecraft Bedrock Playstation
Minecraft Bedrock Playstation

The Sony PlayStation version of Minecraft: Bedrock edition.

Links: Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.se*, Amazon.sg*

Minecraft Bedrock Nintendo Switch
Minecraft Bedrock Nintendo Switch

This is the Nintendo Switch version of Minecraft: Bedrock edition.

Links: Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*

Minecraft Bedrock Xbox One
Minecraft Bedrock Xbox One

This is the Microsoft Xbox version of Minecraft: Bedrock edition.

Links: Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.sg*

Recommended Storage (Solid State Drive)

I strongly recommend a Solid State drive (SSD) for your server. This is because Minecraft is constantly reading/storing chunks to the disk which makes I/O performance very important.

These are much cheaper than they used to be. Here’s a decent 120 GB one (higher capacity options are available) at a very low price:

Kingston A400 SSD
Kingston A400 2.5″ SATA SSD

The Kingston A400 is reliable, widely available around the world, has low power requirements and performs very well. It’s also very affordable. This drive has been benchmarked over 1000 times at Pi Benchmarks and is the #1 most popular SSD among the community!

Links: AliExpress*, Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*

If you have a M.2 NVME slot in your motherboard you can go with a high end drive. This will give your server maximum performance even if a large number of players are running around on the server changing blocks and triggering disk writes.

This is the one I have in my machine. These range from 250 GB to 2 TB depending on how big your server might grow:

The Samsung 980 Pro (NVMe) is a professional grade SSD and one of the fastest in the world. The Samsung NVMe drives have been at the top of this category for a long time and are well trusted for both their performance and reliability / long life.

Links: AliExpress*, Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*

Computer / CPU / Memory

Almost any PC made in the last few years will be a x86_64 bit computer. If you have an older computer around that isn’t being used then it will most likely have the right CPU and amount of memory (as well as fast storage) to run a basic server.

Throwing a SSD in one of these older computers will provide an excellent server experience for small and larger player counts.

The speed of your storage will make the largest difference. Older HDDs are going to have significantly slower performance than any modern SSD even with all other hardware equal. This is because the Minecraft server is constantly reading/writing chunks of your world as well as updates to it to the disk so this tends to be the bottleneck.

Operating System

I highly recommend using Ubuntu Server to run the Minecraft dedicated server. It is available here.

At the time of writing the current version is Ubuntu Server 20.04. This is a secure and robust operating system and will leave plenty of resources available for the server to run.

The script should run on any Debian based flavor of Linux but since the Minecraft Bedrock server is compiled natively for Ubuntu I recommend sticking with it. If you have a GUI flavor of Ubuntu and a decent PC (>= 2 GB of RAM) the server will work just fine on it.

Note: People have reported in the comments that Ubuntu 16.x is no longer working with the latest official Mojang binaries. Ubuntu 18.04 is the minimum requirement for the latest versions, and 20.04 is recommended!

Installation

Log into your Linux server either using SSH or a mouse and keyboard and paste/type the following command:

curl https://raw.githubusercontent.com/TheRemote/MinecraftBedrockServer/master/SetupMinecraft.sh | bash

The script will setup the Minecraft sever and ask you some questions on how to configure it. I’ll explain here what they mean.

The first question will be the installation path. This is the root installation path for ALL servers you will have. If you add additional servers later you should select the exact same installation path. It should always be left as the default (~).

The only exception is if you have something like a completely dedicated disk for the Minecraft server. In that case you should always use the same root path of /mnt/yourdrive or wherever the path is for every new/additional server you install.

“Start Minecraft server at startup automatically (y/n)?” – This will set the Minecraft service to start automatically when your server boots. This is a great option to set up a Minecraft server that is always available.

“Automatically restart and backup server at 4am daily (y/n)?” – This will add a cron job to the server that reboots the server every day at 4am. This is great because every time the server restarts it backs up the server and updates to the latest version. See the “Scheduled Daily Reboots” section below for information on how to customize the time or remove the reboot.

That is it for the setup script. The server will finish configuring and start!

First Run

The server will start up and start displaying output to the console.

[2019-03-30 20:25:12 INFO] Starting Server
[2019-03-30 20:25:12 INFO] Version 1.10.0.7
[2019-03-30 20:25:12 INFO] Level Name: Bedrock level
[2019-03-30 20:25:12 INFO] Game mode: 0 Survival
[2019-03-30 20:25:12 INFO] Difficulty: 1 EASY
[2019-03-30 20:25:20 INFO] IPv4 supported, port: 19132
[2019-03-30 20:25:20 INFO] IPv6 supported, port: 19133
[2019-03-30 20:25:23 INFO] Server started.

Once you see the “Server started” line you will be able to connect from the client.

To add the server to the client open Minecraft and click “Play”. Then at the top of the screen select the “Servers” tab and click “Add Server”.

This will ask you for a Server Name and Server IP Address. For the name you can put anything and for the server IP address put the address of your Linux server. Leave the port as the default 19132. For more information on how to let people from outside your network on go to the “Port Forwarding” section below.

Now choose the server you just added in the list and connect!

Start, Stop and Restart Server

The server can be started, stopped and restarted two different ways. You can use the provided scripts in the Minecraft folder or you can use systemctl. Here are the commands:

cd ~/minecraftbe
./start.sh
./stop.sh
./restart.sh

-OR-

sudo systemctl start minecraftbe
sudo systemctl stop minecraftbe
sudo systemctl restart minecraftbe

Automatic Backups

The server backs up each time it starts. This helps you recover easily if something goes wrong. This system works best if you configured the server to restart daily since it means you will have a backup every day.

To access these backups type:

cd ~/minecraftbe/backups
ls

When a backup is made the filename will be the date and time the backup was taken. If you need to restore a backup it’s very easy. Substitute the timestamp in my example to the backup you want to roll back to. Type:

cd ~/minecraftbe
./stop.sh
rm -rf worlds
tar -xf backups/2019.02.15.22.06.30.tar.gz
./start.sh

Your world has now been restored! It’s a good idea to download these backups off the server periodically just in case the server’s storage fails.

Installing Resource Packs / RTX Support

For instructions on how to install resource packs (including optional RTX support) view my step by step Minecraft Bedrock Dedicated Server Resource Packs guide here.

Scheduled Daily Reboots

The daily reboots are scheduled using cron. It’s very easy to customize the time your server restarts.

To change the time that the server restarts type: crontab -e

This will open a window that will ask you to select a text editor (I find nano to be the easiest) and will show the cronjobs scheduled on the server. The Minecraft one will look like the following:

0 4 * * * /home/ubuntu/minecraftbe/restart.sh
Crontab's syntax layout
Crontab’s syntax layout

There are 5 fields here. The default restart time is set to reboot at 0 minutes of the 4th hour of the day (4 AM). The other 3 fields are left as * to represent every day of every month. Make any desired changes here and press Ctrl+X to exit nano and update the cronjob.

To remove the daily reboot simply delete the line and save.

Reconfigure / Update Scripts

The scripts can always be reconfigured and updated by downloading the latest SetupMinecraft.sh and running the installer again. It will update all of the scripts in the Minecraft directory and reinstall the startup service for you.

Running SetupMinecraft.sh again will also give you a chance to reconfigure options such as the memory dedicated to the server, daily reboots, starting the server on boot, etc.

This will not overwrite your world or any other data so it is safe to run!

Port Forwarding

If everyone on your server is on the same LAN or WiFi network as you then you don’t need to do this. If you want people to connect from outside your local network then you need to set up port forwarding on your router.

The process for this is different for every router so the best thing to do is just look at your router and find the model # and put that in google with port forwarding for easy instructions on how to do it for your specific router.

You want to forward port 19132. The type of connection is both TCP and UDP. On some routers you need to do both a TCP entry and then a second entry as UDP.

Once you do this people will be able to connect to your Minecraft server through your public IP address. This is different than your local IP which is usually a 192.x.x.x or 10.x.x.x. If you don’t know what that is just go to google and type “what’s my ip” and Google will kindly tell you!

Version Override

You can revert to a previous version with the revert.sh script included in your directory like this:

james@jamesgigabyte-linux:~/minecraftbe/james$ ./revert.sh
Set previous version in version_pin.txt: bedrock-server-1.19.10.20.zip

If you have a specific version you would like to run you can also create version_pin.txt yourself like this:

echo "bedrock-server-1.18.33.02.zip" > version_pin.txt

The version hold can be removed by deleting version_pin.txt. This will allow it to update to the latest version again!

Wired vs. Wireless

Going with an ethernet (wired) connection is going to be faster and more reliable. There’s so much wireless traffic and other interference in the air that running your server on WiFi is not recommended.

Even if it is working great 99% of the time it can ruin your experience very quickly if the WiFi drops for a couple of seconds and you get blown up by a creeper!

All that being said, the server works fine on wireless. The script will work fine as is with a wireless connection.

Benchmarking / Testing Storage

If you’re getting poor performance you may want to run my storage benchmark with:

sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash

PC results won’t show up on the site yet (it’s meant for Raspberry Pi) but it will run on Linux just fine and give you a score. If you search for the model of your drive on Pi Benchmarks you can compare your score with others and make sure the drive is performing correctly!

Troubleshooting Note – Oracle Virtual Machines

A very common problem people have with the Oracle Virtual Machine tutorials out there that typically show you how to use a free VM is that the VM is much more difficult to configure than just about any other product / offering out there.

It is because there are several steps you need to take to open the ports on the Oracle VM. You need to both:

  • Set the ingress ports (TCP/UDP) in the Virtual Cloud Network (VCN) security list
  • *and* set the ingress ports in a Network Security Group assigned to your instance

Both of these settings are typically required before you will be able to connect to your VM instance. This is purely configuration related and has nothing to do with the script or the Minecraft server itself.

I do not recommend this platform due to the configuration difficulty but the people who have gone through the pain of configuring an Oracle VM have had good experiences with it after that point. Just keep in mind it’s going to be a rough ride through the configuration for most people.

Troubleshooting Note – Hyper-V

There is a weird bug in Hyper-V that breaks UDP connections on the Minecraft server. The fix for this is that you have to use a Generation 1 VM with the Legacy LAN network driver.

Conclusion

The Minecraft Bedrock Edition dedicated server runs much better than previous third party servers in the past that were missing critical features. The performance is very good even on low end hardware. It has never been easier to set up a Minecraft Bedrock server.

If you have any feedback or suggestions let me know in the comment section. A lot of the changes and developments in this script and guide are directly from readers.

Have fun!

Other Resources

For a guide on how to set up resource packs check out my Minecraft Bedrock Resource Pack guide

If you’re trying to run this on the Raspberry Pi check out the Raspberry Pi specific guide here

1,555 thoughts on “Minecraft Bedrock Edition – Ubuntu Dedicated Server Guide”

  1. Avatar for Ryan

    Hi James, thank you so much for this! As the bedrock version has updated recently, I wonder how can I pack up the world and update the version from 1.18.12 to 1.18.19

    1. Avatar for James A. Chambers

      Hey Ryan,

      Welcome, and thanks for the kind words! I think I can help for sure.

      The Bedrock server is updated to the latest version of the server whenever it’s restarted. Basically if there’s a new version out and you need your server to update you just need to restart it. You can do this by pulling up the console and typing “stop” in the console or you can just do a:

      sudo systemctl restart yourservername

      Occasionally there are times where Microsoft might push a client update and be “slow” to upload the update to the servers. When this happens you basically have to wait (as do all dedicated server owners as we are all waiting on Microsoft) but it usually doesn’t last more than a few hours at the most.

      I think if you get it restarted you should be good to go!

        1. Avatar for James A. Chambers

          Hey Ryan,

          It will download the latest version that is on Microsoft’s web site. Basically if it’s not updating to a newer one it’s because they haven’t posted it yet (or something is wrong which we’ll cover momentarily).

          You can actually open the site in your browser and refresh until you see the file name change to a new release. If you click the “I Agree” checkbox you can hover over the download button and see the full link path. Right now it looks like this (with the version Microsoft has available at the end):

          https://minecraft.azureedge.net/bin-linux/bedrock-server-1.18.33.02.zip

          If you restart the server at that point it will instantly download the new version because that is the source of the files. If it’s live on Microsoft’s download page the script checks that each time it starts so if it shows in your browser that is the same thing it will see.

          Usually they are dropped around the same time but sometimes there may be a period of several hours (or in rare cases longer than that) where for some reason they released the client on the Microsoft Store but did not make the dedicated server files available at the same time. This is the same for everyone unfortunately (and outside anyone’s control except Microsoft) but it usually resolves itself fairly quickly.

          If you think it’s failing to update for some reason I would definitely recommend running SetupMinecraft.sh again. That version strikes me as a little old (the site says 1.18.33 but sometimes the versions match up strangely) so maybe you need some of the newer changes I’ve made that improve route detection. This is very recent like within the past couple/few weeks that I made those changes.

          I would say running SetupMinecraft.sh again to update your scripts to the latest version has a pretty good chance of taking care of this. This is safe to do and it’s designed for it (although it’s always a good idea to take your “backups” out of the backups folder and put them somewhere safe / make sure you have copies before touching the server files).

          Hopefully that helps!

  2. Avatar for Aiden

    When I enter commands in my Terminal, They don’t seem to effect the server. For example, I’d like to promote myself to an Operator, so I type “OP MyName”, and it doesn’t do anything…… What am I doing wrong here? I’ve set up a server from scratch before, and the commands worked. I used this shortcut this time, and now they don’t. I can’t see /list either.

    1. Avatar for James A. Chambers

      Hey Aiden,

      It sounds like you’re doing everything right here. Are you pulling up your server’s console with screen -r? Like you aren’t typing it in the regular Linux terminal I assume as you do need to bring up the Minecraft server terminal with screen -r first.

      I only wanted to mention this since you said you’re using it for the first time and if you weren’t using this before then you would have launched it the old way from the command line and been immediately inside the server console. In this it’s running in a background window using an application called “screen” that you can bring up on demand.

      Now assuming you don’t mean this I also wanted to briefly mention not to put the / in front of the commands in the console. You left it off on your “OP MyName” example but had it on the “/list” example so I think you’re also aware of this but I wanted to mention not to use the forward slash in the console like you would in game (if only for other people reading this looking for help and completeness).

      What messages are you getting when you try these commands? Like mine looks like this:

      [2022-04-24 14:49:00] NO LOG FILE! - setting up server logging...
      [2022-04-24 14:49:00] [2022-04-24 14:49:00:575 INFO] Starting Server
      [2022-04-24 14:49:00] [2022-04-24 14:49:00:575 INFO] Version 1.18.30.04
      [2022-04-24 14:49:00] [2022-04-24 14:49:00:575 INFO] Session ID ba6689f0-80a0-4891-b5d8-194bc551503a
      [2022-04-24 14:49:00] [2022-04-24 14:49:00:575 INFO] Level Name: Bedrock level
      [2022-04-24 14:49:00] [2022-04-24 14:49:00:580 INFO] Game mode: 0 Survival
      [2022-04-24 14:49:00] [2022-04-24 14:49:00:580 INFO] Difficulty: 1 EASY
      [2022-04-24 14:49:00] [2022-04-24 14:49:00:696 INFO] opening worlds/Bedrock level/db
      [2022-04-24 14:49:01] [2022-04-24 14:49:01:579 INFO] IPv4 supported, port: 19132
      [2022-04-24 14:49:01] [2022-04-24 14:49:01:579 INFO] IPv6 supported, port: 19133
      [2022-04-24 14:49:02] [2022-04-24 14:49:02:320 INFO] Server started.
      [2022-04-24 14:49:02] [2022-04-24 14:49:02:350 INFO] IPv4 supported, port: 57332
      [2022-04-24 14:49:02] [2022-04-24 14:49:02:350 INFO] IPv6 supported, port: 57716
      op test
      [2022-04-24 14:49:06] No targets matched selector

  3. Avatar for GEoff

    Hi James! Thanks for this, its fantastic! I have been tinkering with a Dell WYSE 3040 thin client as a light server. It works well for my needs, but I ran into a problem! The machine only has 8GB of eMMC disk space, and it’s been filled up. I checked the size of the server root and its only around 500-600 MB. when your configuration does backups/updates, does anything (like the server binaries or something) go elsewhere? I noticed that things like /usr and /var had gotten pretty large.

    I’m running headless ubuntu server 21.10.

    1. Avatar for James A. Chambers

      Hey GEoff,

      Welcome! So basically no, the script doesn’t have any other files outside of the minecraftbe directory. The only exceptions to this are /etc/sudoers.d/minecraftbe and /etc/systemd/system/yourserver.service.

      I’ve definitely ran into this issue before on Linux installations with very small disk space. I work a lot with embedded devices so I’m definitely used to this.

      Assuming there is nothing else really running on it then my guess is it’s mostly apt cache and other system services related to updates. You could do a sudo apt clean and sudo apt autoclean and it wouldn’t surprise me if this gets back as much as you’re going to get without literally starting to remove files and packages manually.

      You may have to go through various directories but it sounds like you’ve already been doing that and know there’s a lot in /usr/ and /var/ (makes sense, the apt cache is all at /var/cache/apt and user related caches are in the usr folder). Here is a good guide for doing this that contains some variations to the commands to let you narrow things down and bulk scan a little bit easier to find what is using the disk space.

      You can use the du script from the link above and go inside the var folder and run it to get a breakdown of which of the var folders are using all the space. My guess would be cache, log, etc. and then repeat this for the user folder so we can find out exactly which folder is taking up so much space.

      Even the backups for this are stored in the main Minecraft folder so I suspect it will be general apt stuff, stuff in the /tmp folder, etc. I have VMs like this that have been running services for years and are running nothing else that get filled up like this too (my MeshCentral server which is just an Ubuntu VM running only MeshCentral fills up every 6-12 months and I have to do this same thing). sudo apt clean && sudo apt autoclean will generally get me most of my space back and then I’ll manually clean out things like the /tmp folder, /var/tmp or any user caches that are getting too large.

      The logs can get pretty out of control sometimes (especially if they aren’t rotating very often or not often enough) and those are in /var/log. That can look like this:

      james@jamesgigabyte-linux:/var/log$ ls -s
      total 76856
      8 alternatives.log 16 auth.log.4.gz 28 dmesg.1.gz 516 kern.log.1 2460 syslog.3.gz
      12 alternatives.log.1 0 boot.log 28 dmesg.2.gz 232 kern.log.2.gz 1832 syslog.4.gz
      8 alternatives.log.2.gz 16 boot.log.1 28 dmesg.3.gz 212 kern.log.3.gz 0 ubuntu-advantage.log
      0 apport.log 16 boot.log.2 28 dmesg.4.gz 28 kern.log.4.gz 12 ubuntu-advantage-timer.log
      4 apport.log.1 16 boot.log.3 120 dpkg.log 44 lastlog 16 ubuntu-advantage-timer.log.1
      4 apport.log.2.gz 12 boot.log.4 216 dpkg.log.1 44 nvidia-installer.log 4 ubuntu-advantage-timer.log.2.gz
      4 apport.log.3.gz 28 boot.log.5 144 dpkg.log.2.gz 12 nvidia-uninstall.log 4 unattended-upgrades
      4 apport.log.4.gz 16 boot.log.6 12 faillog 4 openvpn 64 wtmp
      4 apport.log.5.gz 40 boot.log.7 16 fontconfig.log 4 postgresql 52 Xorg.0.log
      4 apport.log.6.gz 108 bootstrap.log 4 gdm3 4 private 52 Xorg.0.log.old
      4 apport.log.7.gz 0 btmp 4 gpu-manager.log 4 samba 144 Xorg.1.log
      4 apt 0 btmp.1 4 gpu-manager-switch.log 4 speech-dispatcher 1476 Xorg.1.log.old
      212 auth.log 4 cups 4 hp 4 sssd 16 xrdp.log
      268 auth.log.1 4 dist-upgrade 4 installer 19372 syslog 8 xrdp-sesman.log
      24 auth.log.2.gz 140 dmesg 4 journal 44756 syslog.1
      20 auth.log.3.gz 140 dmesg.0 656 kern.log 3036 syslog.2.gz

      If you go in here and see a ton of .gz files those are backup logs that have been compressed. Look at all the ones I have on my main desktop here (not in need of a cleaning right now but you can see the files accumulating). I’ll usually remove these with something like a rm -rf /var/log/*.gz. This will remove the compressed log file backups while leaving the active log files alone (removing the real active log files will typically start crashing services and the system doesn’t always recreate the permissions properly in the cases it actually tries to remake them which is also not guaranteed). Removing the backup copies (.gz) is safe as is removing the backups that end with .1, .2, .3 etc. that haven’t been compressed yet.

      8GB is quite low so I imagine there’s not even room for the apt cache and you’re going to have to clean it out (and maybe constantly clean it with a 8GB limit). This kind of happens on all of them and we’re a lot more used to it on Raspberry Pi and platforms like that where a 8GB – 16GB size SD card is pretty standard (a ton of my site content is related to Raspberry Pis if this seems like it’s coming out of left field). It should be doable though without too much effort but those are the places I’d look first for sure!

      1. Avatar for Geoff

        Thanks James!

        Surprisingly the apt cache was already empty, but I was able to gain back some space with autoremove, and cleaning up some logs (especially the journal that was over a gig alone!) I made some changes to logrotate so hopefully that will sow things down.

        I’m also looking now into other options like a minimal install so I start with an extra gig or so free.

        Unfortunately with this specific hardware, the only expansion option is USB. so as a last resort I might work with that somehow.

        Thanks for your input! It was a truly helpful response where a simple “nope, wasn’t me!” Would be justified 🙂

        1. Avatar for James A. Chambers

          Hey Geoff,

          No problem at all! This one hit hard for me because of all my embedded experience so I figured I’d share the places I look first to usually claim enough to keep these going and fitting on a small partition.

          Best of luck and take care!

  4. Avatar for Toast

    Upon running this script on a fresh Ubuntu on a VPS a Package Configuration prompt appears with the message “daemons using outdated libraries”. I cannot select anything as using the default up and down arrows just makes their text counterparts (eg.”^[[A”) appear. I am not the most familiar with Ubuntu and I can’t figure out how to reopen that prompt. This (i believe) leads to the server being unable to start: the logs file says “error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory”. Any help with this would be appreciated. Thanks!

    1. Avatar for James A. Chambers

      Hey Toast,

      Ugh, I think I know what is happening. That is basically an interactive prompt that pops up when certain new packages are updated/installed asking if you want to restart running services that rely on them (so that they will use the new version). My Amazon Lightsail VPS does the same thing so I know exactly what you’re referring to and it’s annoying.

      So fortunately SetupMinecraft.sh will check the dependencies every time you run it. This basically means that if you reboot your machine and run SetupMinecraft.sh again those services won’t be using the old version anymore (which triggers that interactive prompt). I suspect the prompt broke the installer as it doesn’t sound like libssl was installed (it’s a part of the dependencies). You can probably get it to appear again with a:

      sudo apt update && sudo apt dist-upgrade

      I would first try rebooting the server and then running SetupMinecraft.sh again. You can use the same values you used the first time you ran it (it’s designed to safely update and install the scripts over an existing server without hurting anything). Whatever was getting stuck before should all be rebooted and happy after rebooting the server and then the installer should complete successfully without that prompt appearing at all.

      Can you give that a try and let’s see if it gets it for you!

        1. Avatar for James A. Chambers

          sudo apt install libssl1.1 should do it. I imagine there’s something more going on with it though like it has never been updated with a sudo apt update && sudo apt dist-upgrade.

          There’s another possibility which is if it’s running the 22.10 bleeding edge beta then there are definitely libssl issues with that distro that someone else commented about here a few days ago. I don’t think this is likely as usually a lot of the VPS providers struggle with having really old versions and not too new of versions if that makes sense.

          Which version of Ubuntu is it? I’m guessing that it just needs updates. It may be 18.04 and I certainly hope not 16.04 but it should be upgradeable with at worst a sudo do-release-upgrade (takes a while if it needs this one but I’ve done it remotely on VPS before and you can always just delete it and start over it something goes wrong provided you have backups or nothing else is on there).

          Ideally you should be on 20.04 (or newer but *not* the bleeding edge 22.10 beta which ships with libssl3). I’m not sure if 18.04 still works and I’m certain 16.04 won’t work anymore (it used to but Microsoft no longer builds for those C libraries on that version and it wouldn’t surprise me if 18.04 is in the same boat already).

          It may need a sudo apt install --fix-broken but that’s a very bad sign on a brand new VM/VPS and would possibly warrant deleting that and spinning up a new one (usually faster than fixing it). Let me know what you find!

          1. Avatar for Toast

            Oh my god you are absolutely right – turns out I was running on Ubuntu 22.04 instead of 20.04 this entire time. Genius! It looks like 22.04 doesn’t have the libssl package for some reason, and downgrading the VPS to 20.04 worked perfectly. Thanks a bunch, I hope this helps anyone with a similar problem as well.

            1. Avatar for James A. Chambers

              Hey Toast,

              No problem, sorry you ran into that! The newer Ubuntus are definitely going to cause me some headaches and I got fair warning about that with 22.10 as well. There is no libssl1.1 compatibility package available on 22.10. I imagine you are seeing the same situation with 22.04 and that they have already moved to libssl3 and have removed the libssl1.1 package.

              Basically Microsoft will ultimately need to fix this by linking Minecraft with libssl3 instead of libssl1.1 (or figuring out how they want to manage their networking). I imagine this is not that close to happening and might not even be on their radar yet. Minecraft isn’t the only Microsoft application impacted though so this will definitely need either a compatibility package available or Microsoft will need to change their link libraries.

              Thanks for leaving your resolution, I’m sure it will help others as well. Enjoy and have fun!

              1. Avatar for Spinnerite

                I just wanted to say I got the script running on Ubuntu server 22.04 using this guide to install the libssl1.1 now my kids are super happy with their Minecraft server.

              2. Avatar for James A. Chambers

                Hey Spinnerite,

                That looks like a good guide! I’d recommend this method over some of the other ones I’ve seen. This guide not only is building the libraries but actually is using the proper commands so that it won’t overwrite/clobber your existing libssl3 libraries.

                Definitely the best one I’ve seen so far. It’s quite a bit more steps than some of the more dangerous methods but those steps are absolutely essential if you don’t want to break the system and cause conflicts. Thanks for sharing!

  5. Avatar for Toast

    Hello,

    I’m wondering if it’s possible to downgrade to a previous version on the server (1.18.30.04 -> 1.18.12.01 specifically). I have the zip file already my downloads folder from the Minecraft server software website. Thanks!

    1. Avatar for James A. Chambers

      Hey Toast,

      You absolutely can but I’m not sure why you would want to. Generally all of the clients for Bedrock are on platforms that are automatically patched and it won’t connect to old servers.

      Assuming that you are aware of this and have some kind of “frozen” Minecraft client then you should be able to absolutely just extract that over the top of your existing files and it will replace them with that version. My script tries to keep them up to date but you could disable the update check in start.sh for sure.

      Basically you should be able to do what you are saying but I’ve never seen anyone that is able to keep a Bedrock server held back for very long. It will be a constant headache for sure as it’s all designed to automatically update and basically requires the latest version. It’s not like Java where you can “choose” if that makes sense. It is theoretically possible though using these steps. Best of luck and let me know if I can help further!

      1. Avatar for Toast

        Hey James,

        Thanks for the very quick reply. I attempted to extract the zip file by disabling the check and using the same code that updates to the specified version. This works, however frequently when someone tries to connect the server crashes on the error message similar to “could not find curl binary, use libcurl.co” (not exact message). After some fiddling I decided it would be best to stop supporting the “frozen in version” bedrock clients entirely Either way, thank you for your advice.

        1. Avatar for James A. Chambers

          Hey Toast,

          No problem at all! I think this is for the best for sure.

          This is pretty much standard procedure in Java to freeze versions or be several major revisions back (it definitely has it’s upsides) but Microsoft has done pretty much literally everything in their power to make freezing Bedrock at the very least more trouble than it’s worth while technically possible (at least on PC, it probably isn’t possible on console).

          Best of luck and thanks for posting your fix!

  6. Avatar for Thurm

    Hi James, great guide. We’ve been using it for about a month now and it’s been a great experience. That being said, at one point in an effort to get coordinates showing up for everyone, I enabled cheats. I disabled them, but now obviously achievements are disabled too. I have tried editing the level.dat in NBTExplorer to no avail, it just won’t open. Do you know of any other method to edit this type of server’s NBT data so we can get achievements back up and running?

    1. Avatar for James A. Chambers

      Hey Thurm,

      According to Microsoft it’s impossible. You may have already seen that they don’t allow it officially but I wanted to mention right off the bat that this is designed / intended behavior even though it’s annoying/frustrating. It’s working as designed in other words but it definitely can be defeated.

      You’re basically going to have to edit the nbt files. That is where the data is. There’s other programs you can try using but I have no idea if they are up to date / will work but others say they will around the internet. This is basically just another NBT editor. There’s a setting named “hasBeenLoadedinCreative” you’ll for sure need to take care of as well as a “Commands enabled”.

      For the record to enable coordinates you would just do:

      /gamerule showcoordinates true

      in Bedrock I believe. I don’t think this is considered a cheat. Enabling the “commands” enables the cheats though and all sorts of things outside the coordinates.

      The 100% reliable way to fix this is to restore a backup. This looks like you’d lose weeks of gameplay if you did a rollback. It definitely doesn’t look impossible at all to fix this but you will need to get a NBT editor working for sure.

      Hopefully that helps!

      1. Avatar for Thurm

        Yes, I’ve tried using an NBT editor so I can just load up the file and change that “hasBeenLoadedinCreative” line, but for some reason this server’s NBT files won’t load in any NBT editor I’ve seen thus far. I get “The NBT file could not be loaded – ZLIP read failed -3” in NBTExplorer, and that Universal Minecraft Editor software doesn’t like the LDB files that my Ubuntu Server has saved in my worlds folder. It wants a “.mcworld” file.

        I can open the NBT in a hex editor but obviously unless I know exactly the lines to change that won’t help. I did figure out the gamerule showcoordinates command back when we were trying to get this to work. I just wanted to know if you knew anything about this script requiring something special to edit NBT files or the ability to export the save as a .mcworld file instead of .LDB files. Let me know, and thanks for replying.

        1. Avatar for James A. Chambers

          Hey Thurm,

          Which ones have you tried? Almost all of them are for regular Minecraft and not Bedrock. I see a bunch of outdated ones on GitHub (typical with Minecraft tools and why I always keep this script updated as this has always annoyed me). This one supposedly works (it’s also the same tool that the article I linked in my previous post uses).

          Here’s another reddit link where the only reply of a possible tool to use was specifically this editor.

          That may be your only choice or it certainly is the only choice I’m seeing without doing a deeper dive.

          Bedrock is the less popular edition by far best I can tell. It may depend on the market segment we’re talking about though. Hardcore older Minecraft players will probably be on Java but younger players or people who are more console gamers are a lot more likely to be on Bedrock (no data on this, just my overall sense).

          That isn’t meant to judge anyone and has more to do with the history of the game (Java has first mover advantage and Minecraft became arguably the most popular game of all time before Bedrock was even conceived and all of that history and the sales to go along with it happened on Java). The people playing the longest are more likely to have / be used to / prefer that original edition they started with. These are also the people most likely to create tools (they’re older giving them a higher likelihood of having the skills to make the tools) which is partially why the selection is so skewed.

          A less flattering way to say that would be that all the Java players are old dinosaurs who can’t or don’t want to change and that all the younger/newer players are on Bedrock but those younger/newer players are definitely less likely to create advanced tools for the game (yet, and a few of them here and there were indeed capable of making these or there would be zero available, but the overall “big picture” of why it’s skewed is mostly explained by this).

          I support both editions and have a script for each as there are valid reasons to use both editions for different purposes. Bedrock almost always has zero tools available but some of these editors do claim to work with it. This even says it works on the 360 / Switch / etc. and that all has to be Bedrock.

          If you’re positive you’re using a Bedrock tool then there’s a chance that world/level is completely corrupted but I think this is unlikely. Almost every editor out there will be for the old Minecraft / Java Minecraft and I imagine this will be the issue and that your level is fine. I’m not even sure they call it “NBTs” still in Bedrock as the data seems to be stored completely differently but once you are actually inside the editor things look very similar to regular Minecraft.

          I’d say give some of those a try and make sure specifically it says it’s supporting “Bedrock” otherwise it *definitely* is talking about regular Java Minecraft. Hopefully that helps!

          1. Avatar for Thurm

            Thank you so much for the length reply! I did end up getting Universal Minecraft Editor to work by loading the folder rather than the .dat itself, so I’m able to make edits to the level.dat now. I’ve been playing Minecraft for many years so I have lots of experience with both Java and Bedrock. I’m surprised to hear Bedrock would be less popular since that’s the version that all consoles run and is pushed at you by default on PC and game pass as well. I know it’s not as friendly for people who want to mod, but I figured that was probably a small subset of players with how popular the game is at this point.

            I know Java would definitely give us more freedom, but we’re using Bedrock as some of our friends are on Xbox/Switch and Java won’t work for us. My current issue is now that my own player/xbox account is unable to earn achievements, but if I join the world with a fresh Xbox user, they can earn them despite me having completely erased all playerdata from the world folder via the UME tool. I’m going to take to Reddit to see if I can get some feedback there. I’ll report back here so there’s a record of a fix if I can figure it out.

            1. Avatar for James A. Chambers

              Hey Thurm,

              Dang, I wonder how deeply they embedded that data! I vaguely recall that it may be embedded in the map data itself in Bedrock which makes things a lot more complicated. Definitely let me know what you find!

              1. Avatar for Thurm

                Hey James,

                I was able to figure out what the issue was. I first got suspicious when I logged in with a second Xbox account to the server post-edits with Universal Minecraft Editor and was able to earn achievements without any issue. I still couldn’t get it to work on my own account, though. I tried using Pocket Edition on my phone and I was able to earn achievements there, so I knew it couldn’t be tied to my Xbox account. Finally I realized that I wasn’t able to earn any achievements in any world at all on my PC and solved it. I had run a PowerShell script from Chris Titus Tech that disables telemetry in Windows. An inadvertent side effect of this was that UWP apps aren’t able to communicate to Xbox’s servers when an achievement has been earned. I re-enabled telemetry, booted up MC on my PC, and low and behold, all my achievements popped. So I’m glad to report that there’s nothing wrong with the level.dat, and the links you’ve shared do indeed solve the problem across Xbox, PC, and PE versions.

                Thanks for your help!

              2. Avatar for James A. Chambers

                Hey Thurm,

                Wow, that rabbit hole went a lot deeper than I was expecting and I already knew it was pretty tough to reverse this. That is fantastic news and thank you so much for sharing your resolution!

                This will definitely help others for sure and I’ll be linking to it in the future if it comes up. Thanks again!

    2. Avatar for Hansma

      I’m a complete idiot when it comes to this, but I managed to get coordinates to show for everyone typing the following when you are in the “screen” (not sure if its called that.. or what its called.. after you type “screen -r #servername#)
      Write the following:
      gamerule showcoordinates true

  7. Avatar for Al P

    I just upgraded to Ubuntu Server 22.04, and re-ran the install script but alas, when running start.sh I get.

    error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

    22.04 runs OpenSSL 3.0.2. Any ideas? Not a major issue, but would be nice to fix if possible.

    1. Avatar for James A. Chambers

      Hey Al,

      I found this from Ubuntu on the subject of the OpenSSL 3.0 transition here.

      Of interest I saw this:

      This new major release brings of course some new things, but also breaks API and ABI.

      Now as far as the Bedrock server that is a static binary provided by Microsoft that apparently links to OpenSSL 1.1. This essentially means until Microsoft updates their libraries it is linking to an older version of OpenSSL for sure. This is happening right in the Minecraft Bedrock executable and is essentially hard-coded or compiled in when Microsoft builds that version.

      Basically Microsoft needs to make some changes to the Minecraft Bedrock server to fix this (at least from the Bedrock side). They also mentioned this in the above link:

      As far as universe is concerned, in an ideal world all the 180 packages above would be fixed in time for the release. However, if not
      so, we’ll either remove the package from the release or, if really necessary, would introduce a compatibility openssl-1.1 package

      I wonder if they actually added this openssl 1.1 compatibility package. That is basically what you’d need.

      Thanks for giving me the heads up about this as I didn’t know it was coming (I’m running 21.10 on my main desktop but not 22.04). This is the first time I’ve really looked into it. The easiest thing will be if there is a compatibility package. I’ve also seen people building OpenSSL 1.1 from source (essentially building their own package) to fix this when fixing the source application isn’t possible (it’s not with Minecraft Bedrock, it’s closed source unfortunately).

      Does it seem to be running fine other than giving these warnings? I believe Minecraft does have it’s own statically compiled network libraries included so I’ve never really been sure why it links with libssl at all. If everything is working correctly then I’d expect that this will just “disappear” one day when Microsoft updates the libraries they are linking to in their compiler.

      I’m not sure how this transition will play out exactly as they have to juggle people who won’t have OpenSSL 3.0 packages even available to them (almost all of them right now except beta/preview releases like 22.04) with people who may *only* have 3.0 available to them. This is why the compatibility package makes more sense as it will be quite some time before OpenSSL 3.0 is even available for most distros (especially LTS).

      It would not shock me if this is not even on Microsoft’s radar yet. As the packages continue to move closer to mainline Linux distros though they will definitely be aware of this and ultimately have to fix it or suppress the message about it.

      Hopefully that helps!

      1. Avatar for Al P

        Thanks for the excellent reply.

        Unfortunately no, it does not run at all. I’ve always been an early adopter, so half expected it to break, but thought I’d at least make you aware of the issue.

        1. Avatar for James A. Chambers

          Hey Al,

          Oh wow, that is harsh indeed. I found a message here that says:

          The issue is that OpenSSL 3.0 changed the API, which breaks older code.
          However, we chose not to ship OpenSSL 1.1 in parallel to 3.0 as that
          would carry the expectation of having security support for 1.1.1, which
          is EOL upstream in 2023.

          Marking as Won’t Fix, however it should be relatively straightforward
          for anyone to pick up the sources for openssl 1.1.1 from Impish and put
          them in a PPA.

          This is exactly what I was looking for which is a PPA that just packages OpenSSL 1.1.1 you could use as a workaround. I found none, but then I found this:

          This solves the issue:

          sudo apt update && sudo apt install libssl1.1 -y

          Can you try this? At the end of the thread they said this no longer works. That means that they didn’t really keep the binaries available though.

          I found another thread installing libssl1.0 in a similar way. This may be one to try if it won’t find / take 1.1. This was from March so it may have also been before this change. I’m puzzled what they expect people to do though if this is the case.

          I rechecked the original link from my last reply and the developer did say the libssl1.1 binaries should stay available. If it lets you install this I will add it to the dependencies installer. Can you give that a try?

          1. Avatar for Al P

            I tried the apt install libssl1.1 but it doesn’t work. As in apt says it can’t find the package. I found the same post as you and tried that also but no dice. Being a developer myself I stumbled across a post from the Microsoft dotnet core team who have the same issues with dotnet core 3.1 and 5. They basically said, it’s not going to work and they won’t backport a fix. They fixed it in .NET6. All that says to me is they have that attitude towards .NET core, their bread and butter, I’m not sure where bedrock is going to sit.

            1. Avatar for James A. Chambers

              Hey Al,

              That explains a lot. I did notice that none of the things they initially said would exist to make this okay / painless actually happened. It seems personal / conflict driven to me as well. I don’t know the history of this package (like why it’s skipping straight from 1.1 to 3) but it seems like there probably is a very long story behind this journey that some people are extremely invested in.

              I think you are on the bleeding edge of this issue for sure. I believe it’s only a matter of time before someone puts a PPA together with it. This is going to break so many other things too and already is as I’m sure you noticed scouring the internet for information about this like I did as well. It cannot stand that there is just no solution and one will be provided whether the developers / package maintainers / whoever wants it or not.

              There is the obvious solution of building it yourself from source but if you do something like a make install it will overwrite your new OpenSSL 3.0 libraries and basically break your system. Someone needs to design a package with this in mind that doesn’t conflict with 3.0 and it doesn’t seem like anyone has done this yet.

              I didn’t even mention this solution due to the likelihood of conflicts but I’m sure it’s possible to put these files somewhere that the PATH variable points to as opposed to a system-wide install. Both my script and Microsoft’s own instructions to run the server on their web site both override the LD_LIBRARY_PATH variable where it looks for these libraries. You could build it with as many static build flags enabled as it can take and *not* do a make install and use the binary directly.

              You could probably just stick this statically compiled version of this in your server folder because of this already in-place LD_LIBRARY_PATH override. There’s already a couple of libraries in there I believe (at least there used to be). Normally you can’t do this very easily with other applications (they’ll link to system paths) but Minecraft specifically allows and basically requires a path override to even run properly on Linux (as designed by Microsoft).

              You could theoretically put that missing library it’s complaining about right in your server folder without disturbing anything else on the system (if it’s statically compiled, otherwise if it’s dynamically linked you’d have to put probably dozens or more other dependency libraries in there as well until it stops throwing errors).

              Definitely let me know if you learn anything more. Thanks for giving me the heads up on this and I’ll keep an eye out for more information on it!

              1. Avatar for Matt

                I was able to get around this error by adding the bionic security repo, updating, then installing libssl1.1

                sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
                sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
                echo "deb http://security.ubuntu.com/ubuntu/ bionic-security main" >> /etc/apt/sources.list
                sudo apt update
                sudo apt install libssl1.1

              2. Avatar for James A. Chambers

                Hey Matt,

                That package was freely available on those distros until like March or April. They removed it from the package list. Essentially what you’ve done here is add the older Ubuntu versions (bionic). VERY old Ubuntu versions as Bionic is not even 20.04 (Bionic Beaver is 18.04).

                I have no idea what kind of effect this will have on your system long term. It doesn’t sound like it immediately broke it so that’s something. Surely it would be safer though to just download the package and do a dpkg -i oldpackage.deb instead of add a several version old repository to one of the newer versions I’d think. It may depend on a couple of other libraries which you’d have to download those too. I’ve used this method before to solve problems like this.

                I would go further though. I’m sure I could easily build a static libssl 1.1 library and just put it in the Minecraft folder. These types of system-wide solutions are going to create problems for sure. If you are comfortable just reimaging the OS completely fairly often something like this is totally fine to do. If it’s an important server running anything else or you don’t have good backups in place you absolutely do not want to do this.

                Basically this will do the trick but there are already other ways to do it that are safer than this. It’s a decent “quick and dirty” solution though but I would consider the OS burned once you’ve done something like this and would reimage it in at most a few months from now when this problem has been dealt with (either by Microsoft or by me if I just build a static libssl and put it in the folder). Anyone working with production or work equipment would not want to go this route and you’d basically be fired or at the very least told to do a full clean reimage in shame as they’d basically configured the OS to install packages/updates from several versions ago which is at best going to have conflicts at some point and at worst will completely self-destruct relatively quickly.

                It would be like setting Windows 11 to include the Windows 10 patching server. Would it work for most stuff? Probably yes, it would work for most stuff as a lot of it is drivers or deep application files that are shared between the two versions. But when it doesn’t work the results and the conflicts are going to be…. catastrophic. Whatever happens would not be fixed as this is an unsupported configuration and they would even go as far as to say whatever happens is 100% your fault (and do, legally in the license agreement at least in Microsoft’s case).

                Thanks for sharing your solution! Although I’m not that enthusiastic about it that is only from the perspective of for most people using the script. If you set up your package manager to install packages from a several version old Ubuntu version you are going to have problems basically forever until you reimage it with a supported/normal configuration and start over. If you are just setting up quick and dirty short term servers on machines you frequently reimage anyway or VMs then who cares. I just wanted to make sure people understand the implications of it for sure!

              3. Avatar for Al P

                wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1l-1ubuntu1.2_amd64.deb

                sudo dpkg -i libssl1.1_1.1.1l-1ubuntu1.2_amd64.deb

                The above worked!

                Manually installing the above has got my server running on 22.04.

              4. Avatar for James A. Chambers

                Hey Al,

                Thanks for confirming this! That should theoretically be quite a bit safer. The safest method of all is the one Spinnerite posted but with this method you could actually remove the package using apt now with:

                sudo apt remove libssl1.1

                and it will wipe out this package (even if it has been removed from the main Ubuntu repositories because we installed it using a .deb file so it’s available to uninstall until it’s gone).

                This means if this problem is resolved not too long from now you can “undo” what you did with the above command returning you to a completely normal / standard configuration.

                Thanks again for letting me know this worked for you!

Leave a Comment

Your email address will not be published. Required fields are marked *

Type here..

Exit mobile version