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 ilium007

    If I switch apps on iOS, or if the iOS device goes to sleep (even just briefly) I can’t reconnect to the bedrock server unless I force quite the iOS client and reopen and reconnect to the server.

    1. Avatar for James A. Chambers

      Hey illum007,

      Thanks for that. I’ve encountered the same behavior on the Android version and the PC version. It’s like once the application thinks it can’t reach the server/loses connection due to switching/etc. a single time it marks it permanently down. This is a great tip to help people get it going. Thanks!

  2. Avatar for Devilotx

    How do I host multiple worlds on this server? I have one world for my family to do creative builds etc etc, but when the server stopped updating (see note above) I rebuilt the server with a new name on the same computer, here I built a survival world, but the server info is different.
    I did try to move the old world from the old install into the new folder structure.

    ~/minecraftbe/OLDSERVER/worlds/OLDWORLD
    ~/minecraftbe/NEWSERVER/worlds/NEWWORLD

    New world works, I then copied the OLDWORLD folder into the worlds folder of the NEWSERVER, but I cannot seem to get OLDWORLD to work at the same time as NEWWORLD. restarting the server still only shows NEWWOLRD.

    Wondering what config needs to be changed for this to work.

    thanks~

  3. Avatar for Matt

    James,

    No option for reply to your last post on my thread, so I’m leaving a new comment. I did decide to go with the xfce. It’s progress is loading and unpacking at the time of your post. I’ll let you know, Still excited to try!

    1. Avatar for Matt

      Sorry for the massive data dumps here James. Issue appears to be in line 13/17 for me,

      Minecraft Bedrock server is up to date...
      Starting Minecraft server. To view window type screen -r bedrock_server
      To minimize the window and let the server run in the background, press Ctrl+A then Ctrl+D
      matt@MC-Server:~/minecraftbe/bedrock_server$ screen -r bedrock_server
      There is no screen to be resumed matching bedrock_server.
      matt@MC-Server:~/minecraftbe/bedrock_server$ ./start.sh
      ./start.sh: line 13: route: command not found
      Network interface not up, will try again in 1 second
      ./start.sh: line 17: route: command not found
      Network interface not up, will try again in 1 second
      ./start.sh: line 17: route: command not found
      Network interface not up, will try again in 1 second
      ./start.sh: line 17: route: command not found
      Network interface not up, will try again in 1 second
      ./start.sh: line 17: route: command not found
      Network interface not up, will try again in 1 second
      ./start.sh: line 17: route: command not found
      Network interface not up, will try again in 1 second
      ./start.sh: line 17: route: command not found
      Network interface not up, will try again in 1 second
      ./start.sh: line 17: route: command not found
      Network interface not up, will try again in 1 second
      ./start.sh: line 17: route: command not found
      Network interface not up, will try again in 1 second
      ./start.sh: line 17: route: command not found
      Network interface not up, will try again in 1 second
      ./start.sh: line 17: route: command not found
      Network interface not up, will try again in 1 second
      ./start.sh: line 17: route: command not found
      Network interface not up, will try again in 1 second
      ./start.sh: line 17: route: command not found
      Network interface not up, will try again in 1 second
      ./start.sh: line 17: route: command not found
      Network interface not up, will try again in 1 second
      ./start.sh: line 17: route: command not found
      Network interface not up, will try again in 1 second
      ./start.sh: line 17: route: command not found
      Network interface not up, will try again in 1 second
      ./start.sh: line 17: route: command not found
      Network interface not up, will try again in 1 second
      ./start.sh: line 17: route: command not found
      Network interface not up, will try again in 1 second
      ./start.sh: line 17: route: command not found
      Network interface not up, will try again in 1 second
      ./start.sh: line 17: route: command not found
      Network interface not up, will try again in 1 second
      ./start.sh: line 17: route: command not found
      Network interface not up, will try again in 1 second
      ./start.sh: line 17: route: command not found
      Waiting for network interface to come up timed out - starting server without network connection ...
      Checking for the latest version of Minecraft Bedrock server ...
      --2020-12-22 20:56:30-- https://minecraft.net/en-us/download/server/bedrock/
      Resolving minecraft.net (minecraft.net)... 13.249.51.53, 13.249.51.38, 13.249.51.61, ...
      Connecting to minecraft.net (minecraft.net)|13.249.51.53|:443... connected.
      HTTP request sent, awaiting response... 302 Moved Temporarily
      Location: https://www.minecraft.net/en-us/download/server/bedrock/ [following]
      --2020-12-22 20:56:30-- https://www.minecraft.net/en-us/download/server/bedrock/
      Resolving www.minecraft.net (www.minecraft.net)... 23.47.48.16, 23.47.48.22, 23.47.48.7, ...
      Connecting to www.minecraft.net (www.minecraft.net)|23.47.48.16|:443... connected.
      HTTP request sent, awaiting response... 301 Moved Permanently
      Location: https://www.minecraft.net/en-us/download/server/bedrock [following]
      --2020-12-22 20:56:30-- https://www.minecraft.net/en-us/download/server/bedrock
      Reusing existing connection to www.minecraft.net:443.
      HTTP request sent, awaiting response... 200 OK
      Length: unspecified [text/html]
      Saving to: ‘downloads/version.html’

      downloads/version.html [ ] 302.88K 1.58MB/s in 0.2s

      2020-12-22 20:56:31 (1.58 MB/s) - ‘downloads/version.html’ saved [310146]

      Minecraft Bedrock server is up to date...
      Starting Minecraft server. To view window type screen -r bedrock_server
      To minimize the window and let the server run in the background, press Ctrl+A then Ctrl+D
      matt@MC-Server:~/minecraftbe/bedrock_server$ screen -r bedrock_server
      There is no screen to be resumed matching bedrock_server.

      So it’s taking issue with 13 and 17 in start.sh

      DefaultRoute=$(route -n | awk ‘$4 == “UG” {print $2}’)

      SInce the QEMU version is good, no problem there, I’m thinking I need to bridge my eth connection to a virtual LAN port? That’s not in the instructions, but I’m not exactly attempting it the same way.

      Thanks sir,
      Matt

      1. Avatar for James A. Chambers

        Hey Matt,

        This is a problem that came up in a pull request on GitHub but I’ve been trying to figure out the best way to fix it. The issue is that ‘route’ is not on the default path for Debian so it needs to be /sbin/route I believe.

        An easy temp fix would be to edit start.sh and just change the ‘route’ lines to /sbin/route. Check out this pull request to see how it was fixed by GitHub contributor goodoldme.

        My concern with implementing this pull request as-is is that not every distribution is going to have route on this same path. I was working on a different solution where I test to see if the route command exists and then if it doesn’t it will try using /sbin/route. For you though and our testing go ahead and make these two changes to your start.sh file as you are on Debian!

        I’ll bump up this on the priorities too and get it in the main branch. I’m relieved QEMU is working as that was the major obstacle! It sounds like this last fix is all you need here.

        1. Avatar for Matt

          James, Please find below:

          matt@MC-Server:~/minecraftbe/bedrock_server$ ./start.sh
          Checking for the latest version of Minecraft Bedrock server ...
          --2020-12-22 23:26:56-- https://minecraft.net/en-us/download/server/bedrock/
          Resolving minecraft.net (minecraft.net)... 65.8.218.37, 65.8.218.51, 65.8.218.64, ...
          Connecting to minecraft.net (minecraft.net)|65.8.218.37|:443... connected.
          HTTP request sent, awaiting response... 302 Moved Temporarily
          Location: https://www.minecraft.net/en-us/download/server/bedrock/ [following]
          --2020-12-22 23:26:56-- https://www.minecraft.net/en-us/download/server/bedrock/
          Resolving www.minecraft.net (www.minecraft.net)... 23.47.48.27, 23.47.48.22
          Connecting to www.minecraft.net (www.minecraft.net)|23.47.48.27|:443... connected.
          HTTP request sent, awaiting response... 301 Moved Permanently
          Location: https://www.minecraft.net/en-us/download/server/bedrock [following]
          --2020-12-22 23:26:57-- https://www.minecraft.net/en-us/download/server/bedrock
          Reusing existing connection to www.minecraft.net:443.
          HTTP request sent, awaiting response... 200 OK
          Length: unspecified [text/html]
          Saving to: ‘downloads/version.html’

          downloads/version.html [ ] 302.88K 1.41MB/s in 0.2s

          2020-12-22 23:26:57 (1.41 MB/s) - ‘downloads/version.html’ saved [310146]

          Minecraft Bedrock server is up to date...
          Starting Minecraft server. To view window type screen -r bedrock_server
          To minimize the window and let the server run in the background, press Ctrl+A then Ctrl+D
          matt@MC-Server:~/minecraftbe/bedrock_server$ screen -r bedrock_server
          There is no screen to be resumed matching bedrock_server.
          matt@MC-Server:~/minecraftbe/bedrock_server$ ./restart.sh
          Server is not currently running!
          matt@MC-Server:~/minecraftbe/bedrock_server$

          This seems to be an IP route issue. I swear I think I need to bridge the connection from my eth (enp9s0), to a virtual LAN port that can port a virtual pipe. I could be totally wrong! I don’t know…

          The start.sh file was modified exactly as you described, and I checked the post by goodoldme. They are the same.
          Then, I tried something different. I yanked the line:
          DefaultRoute=$(/sbin/route -n | awk ‘$4 == “UG” {print $2}’)
          and replaced with:
          DefaultRoute=$ /sbin/route
          (Don’t fret, I put it back the way it was ) 🙂

          Anyway, it exposes this several times until it gives up:

          Network interface not up, will try again in 1 second
          Kernel IP routing table
          Destination Gateway Genmask Flags Metric Ref Use Iface
          default _gateway 0.0.0.0 UG 100 0 0 enp9s0
          link-local 0.0.0.0 255.255.0.0 U 1000 0 0 enp9s0
          192.168.5.0 0.0.0.0 255.255.255.0 U 100 0 0 enp9s0
          Network interface not up, will try again in 1 second
          Kernel IP routing table
          Destination Gateway Genmask Flags Metric Ref Use Iface
          default _gateway 0.0.0.0 UG 100 0 0 enp9s0
          link-local 0.0.0.0 255.255.0.0 U 1000 0 0 enp9s0
          192.168.5.0 0.0.0.0 255.255.255.0 U 100 0 0 enp9s0
          Waiting for network interface to come up timed out - starting server without network connection ..

          Debian is clunky, slow (surprisingly), and I’m not sure how to bridge the connections. Kubuntu made it easy, and it worked.
          As an aside, during Debian 10.7 setup, I was prompted to indicate which network interface was my preferred method. Of course I chose wired.
          After setup was complete I found that firmware was not installed for the wireless adapter!
          I’ve loaded up the firmware from Debian’s site, but I haven’t had any luck getting it to work.
          Maybe I should have rolled with the 10.7.0-i386 instead of the xfce i386 version. Not sure.

          I really appreciate all of the help, but I’m beyond frustrated at this point. I wouldn’t blame you if you told me to take a hike.

          1. Avatar for James A. Chambers

            Hey Matt,

            No worries! It sounds like the Kubuntu network manager was bridging the connections for you through the GUI. The KDE flavor of Debian would be more like the GUI you’re used to. The K in Kubuntu is for KDE. XFCE probably isn’t using any hardware acceleration (it’s fairly barebones) so things like the menus and animations will feel a lot less snappy.

            Let’s try bridging them with this resource here.

            Also, I would try running the server manually again. The script is checking for an active internet connection, but really let’s just see if you can run it:

            LD_LIBRARY_PATH=. ./bedrock_server

            Run that command from your server folder at ~/minecraftbe/yourserverlabel

            What we want to check is if the server will run basically. You may still need to resolve the bridging issue or you can delete the whole check altogether if it’s just not detecting your route configuration properly but you know your networking is working!

            I’m definitely going to update the script with everything we’re learning here. This is invaluable information. I’m glad you’ve stuck through it and been so persistent! I can’t give up either if you won’t!

            1. Avatar for Matt

              matt@MC-Server:~/minecraftbe/bedrock_server$ LD_LIBRARY_PATH=. ./bedrock_server
              bash: ./bedrock_server: cannot execute binary file: Exec format error

              I won’t give up!

              1. Avatar for James A. Chambers

                Hey Matt,

                That doesn’t sound like binfmt-utils is on there. That should make it run using qemu-user-static but it doesn’t seem like it is here. I’ll grab a 32 bit Debian over the Christmas break here and see what’s going on with it!

                Let’s try running it manually like this with the qemu-user-static binary:

                pi@rpi8gb:~/minecraftbe/testserver $ LD_LIBRARY_PATH=. qemu-x86_64-static bedrock_server

                This is really similar to how we tested running the server manually on the command line but instead of letting binfmt pass it to QEMU we are directly telling it to run it using QEMU with x86_64 emulation. We’re basically spoon feeding it everything it needs!

              2. Avatar for Matt

                I’m having some issues with Debian, but I’m trudging through with this. I can’t get a screen up, but it’s gotten this far:

                matt@MC-Server:~/minecraftbe/bedrock_server$ LD_LIBRARY_PATH=. qemu-x86_64-static bedrock_server
                NO LOG FILE! - setting up server logging...
                [2020-12-29 11:41:31 INFO] Starting Server
                [2020-12-29 11:41:31 INFO] Version 1.16.201.2
                [2020-12-29 11:41:31 INFO] Session ID 5c0fdefc-1a96-4b76-bf64-e6f18310571e
                [2020-12-29 11:41:31 INFO] Level Name: Bedrock level
                [2020-12-29 11:41:31 INFO] Game mode: 0 Survival
                [2020-12-29 11:41:31 INFO] Difficulty: 1 EASY
                [INFO] opening worlds/Bedrock level/db
                [INFO] IPv4 supported, port: 19132
                [INFO] IPv6 supported, port: 19133
                [INFO] IPv4 supported, port: 56126
                [INFO] IPv6 supported, port: 60830
                [INFO] Server started.
                [INFO] Player connected: Realmccoyone, xuid: 2533274924760772

                The screen will not display on the Linux box, and after my client computer connects, it just hangs up with loading server...

                Screen may be out of date (from separate terminal instance):

                GNU Screen version 4.06.02 (GNU) 23-Oct-17

                Having issues getting it to display in order to set up server.

              3. Avatar for James A. Chambers

                Hey Matt,

                That is looking good. It says the server is starting and you can even see your player’s xuid connecting and joining in!

                Usually on that “screen” menu you posted the output on you can just hit enter and it will go away and go to a command prompt inside screen. If you type “exit” in this screen/command prompt you should go back to your real command prompt. You can change it to not show the “startup message” like your used to by editing the file /etc/screenrc with nano. You’ll see something like this:

                # ——————————————————————————
                # SCREEN SETTINGS
                # ------------------------------------------------------------------------------

                #startup_message off

                On my system the command to disable the startup message was off. You can uncomment that line to tell screen to disable it!

                Basically the regular screen command will just open an empty command prompt. If the welcome message is all that’s different it probably is still opening a fresh command prompt.

                You can detach from an existing screen by pressing Ctrl+A then pressing Ctrl+D. The screen should minimize if it’s working correctly. The command screen -r will list all the screens running in the background on your system. If there’s only one it will reattach to it without making you choose it.

                Basically the way the script works is it runs screen but it executes the command to run the server inside it at launch. Otherwise screen basically will do nothing but load a terminal that you can Ctrl+A then Ctrl+D out of. You can see how I do this if you open up the start.sh script and you could adapt to run QEMU using the workaround of calling x86_64 ourselves (I haven’t got to installing Debian 32-bit yet but it’s still on my todo list) before I get it added into the main script for our testing!

  4. Avatar for Preston

    Hello James,

    I have loved using this server for almost a year now. It recently wont update to the correct server and i suspect your new code will fix this.

    Before I do that I was wondering if you would recommend having this instance in a VM or a docker container?
    I would like to have multiple server instances and run a NAS

    1. Avatar for James A. Chambers

      Hey Preston,

      Welcome back! That’s awesome it has been working well for so long.

      So you’re absolutely right. Mojang made a change to their webserver that returns a not found error when you use the “–spider” parameter.

      I had to change this in the scripts to not use this parameter and just make a normal non-spider connection to download newer versions of the server. Updating to the latest one should fix it for you! Just make sure you have a backup of your server before you try upgrading the scripts just to make sure you don’t lose anything!

      1. Avatar for Preston

        I’m back an up and running!

        I made sure to back up. I need to figure out how to save it to the HDD rather than the SSD(Boat drive). I have to remember to clear out the downloads every few months cuz my boot drive is so small.

        How would I do this, and do you use Vm’s or Docker to split out a server.

  5. Avatar for Matt

    James,

    I’m having issues getting this to work, and I wonder if my 32bit Latitude D620 running Kubuntu 18.04 might be the problem. I was thinking I could repurpose some old hardware, and it’s the first time I’ve run your script.

    I’m getting this after what seems to be a good setup (the end processes of the setup and subsequent lack of start.sh, stop.sh, restart.sh, etc…):

    Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|199.232.8.133|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 2865 (2.8K) [text/plain]
    Saving to: ‘start.sh’

    start.sh 100%[==============================================================================================================>] 2.80K --.-KB/s in 0.003s

    2020-12-19 20:09:22 (959 KB/s) - ‘start.sh’ saved [2865/2865]

    Grabbing stop.sh from repository...
    --2020-12-19 20:09:22-- https://raw.githubusercontent.com/TheRemote/MinecraftBedrockServer/master/stop.sh
    Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 199.232.8.133
    Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|199.232.8.133|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 1928 (1.9K) [text/plain]
    Saving to: ‘stop.sh’

    stop.sh 100%[==============================================================================================================>] 1.88K --.-KB/s in 0.002s

    2020-12-19 20:09:22 (948 KB/s) - ‘stop.sh’ saved [1928/1928]

    Grabbing restart.sh from repository...
    --2020-12-19 20:09:23-- https://raw.githubusercontent.com/TheRemote/MinecraftBedrockServer/master/restart.sh
    Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 199.232.8.133
    Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|199.232.8.133|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 1729 (1.7K) [text/plain]
    Saving to: ‘restart.sh’

    restart.sh 100%[==============================================================================================================>] 1.69K --.-KB/s in 0s

    2020-12-19 20:09:23 (8.53 MB/s) - ‘restart.sh’ saved [1729/1729]

    Configuring minecraft_server service...
    --2020-12-19 20:09:23-- https://raw.githubusercontent.com/TheRemote/MinecraftBedrockServer/master/minecraftbe.service
    Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 199.232.8.133
    Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|199.232.8.133|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 351 [text/plain]
    Saving to: ‘/etc/systemd/system/minecraft_server.service’

    /etc/systemd/system/minecraft_server.service 100%[==============================================================================================================>] 351 --.-KB/s in 0s

    2020-12-19 20:09:24 (5.94 MB/s) - ‘/etc/systemd/system/minecraft_server.service’ saved [351/351]

    Start Minecraft server at startup automatically (y/n)?y
    Automatically restart and backup server at 4am daily (y/n)?y
    Daily restart scheduled. To change time or remove automatic restart type crontab -e
    Setup is complete. Starting Minecraft minecraft_server server...
    There is no screen to be resumed matching minecraft_server.
    matt@KUBUNTU-SERVER:~$ ls -al
    total 696
    drwxr-xr-x 20 matt matt 4096 Dec 19 20:07 .
    drwxr-xr-x 3 root root 4096 Dec 19 15:11 ..
    -rw------- 1 matt matt 3726 Dec 19 20:06 .bash_history
    -rw-r--r-- 1 matt matt 220 Dec 19 15:11 .bash_logout
    -rw-r--r-- 1 matt matt 3771 Dec 19 15:11 .bashrc
    drwxrwxr-x 15 matt matt 4096 Dec 19 19:57 .cache
    drwxr-xr-x 9 matt matt 4096 Dec 19 20:11 .config
    drwx------ 3 matt matt 4096 Dec 19 15:24 .dbus
    drwxr-xr-x 3 matt matt 4096 Dec 19 19:44 Desktop
    drwxr-xr-x 2 matt matt 4096 Dec 19 15:24 Documents
    drwxr-xr-x 2 matt matt 4096 Dec 19 17:30 Downloads
    -rw-r--r-- 1 matt matt 14965 Dec 19 15:11 .face
    lrwxrwxrwx 1 matt matt 5 Dec 19 15:11 .face.icon -> .face
    drwx------ 2 matt matt 4096 Dec 19 19:40 .gconf
    drwx------ 3 matt matt 4096 Dec 19 15:23 .gnupg
    -rw-rw-r-- 1 matt matt 375 Dec 19 15:24 .gtkrc-2.0
    drwxrwxr-x 3 matt matt 4096 Dec 19 15:29 .kde
    drwxrwxr-x 3 matt matt 4096 Dec 19 15:23 .local
    drwxrwxr-x 3 matt matt 4096 Dec 19 19:15 minecraftbe
    drwx------ 5 matt matt 4096 Dec 19 15:54 .mozilla
    drwxr-xr-x 2 matt matt 4096 Dec 19 15:24 Music
    drwxr-xr-x 2 matt matt 4096 Dec 19 19:19 Pictures
    drwx------ 3 matt matt 4096 Dec 19 19:34 .pki
    -rw-r--r-- 1 matt matt 807 Dec 19 15:11 .profile
    drwxr-xr-x 2 matt matt 4096 Dec 19 15:24 Public
    -rwxrwxr-x 1 matt matt 11132 Dec 19 19:12 SetupMinecraft.sh
    -rw-rw-r-- 1 matt matt 11132 Dec 19 20:07 SetupMinecraft.sh.1
    -rw-r--r-- 1 matt matt 0 Dec 19 16:40 .sudo_as_admin_successful
    drwxr-xr-x 2 matt matt 4096 Dec 19 15:24 Templates
    drwxr-xr-x 2 matt matt 4096 Dec 19 15:24 Videos
    -rw-rw-r-- 1 matt matt 260 Dec 19 20:09 .wget-hsts
    -rw------- 1 matt matt 59 Dec 19 19:40 .Xauthority
    -rw------- 1 matt matt 560382 Dec 19 20:23 .xsession-errors
    matt@KUBUNTU-SERVER:~$ cd ~/minecraftbe
    matt@KUBUNTU-SERVER:~/minecraftbe$ ./start.sh
    bash: ./start.sh: No such file or directory
    matt@KUBUNTU-SERVER:~/minecraftbe$ ./restart.sh
    bash: ./restart.sh: No such file or directory
    matt@KUBUNTU-SERVER:~/minecraftbe$ sudo
    usage: sudo -h | -K | -k | -V
    usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
    usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user] [command]
    usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt] [-T timeout] [-u user] [VAR=value] [-i|-s]
    []
    usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt] [-T timeout] [-u user] file ...
    matt@KUBUNTU-SERVER:~/minecraftbe$ sudo systemctl start minecraftbe
    [sudo] password for matt:
    Failed to start minecraftbe.service: Unit minecraftbe.service not found.

    Anyway, I just can’t get it to run. During one attempt, it commented that it was started, but the screen was closed. Not sure wgat that was about, but I only saw that once.

    What do you think? Any help is appreciated.

    1. Avatar for James A. Chambers

      Hey Matt,

      The server should be one folder deeper. It should be a subfolder inside the minecraftbe folder named what you chose as the server label. This is because it supports hosting multiple instances (except this is broken at the moment for everyone due to a bug in the current official Bedrock server). I expect everything’s there. If you chose the server label “test” for example the server folder should be named test or ~/minecraftbe/test. The scripts even run on armhf/arm64 such as the Raspberry Pi so I’m sure they’ll be there.

      There’s a couple things you can do to see what’s going wrong. There’s a log folder that will have a startup log, but I suspect in your case the binary can’t run at all and there will be no log. If we’re lucky the screen command managed to spit out a single line that will probably say binary format error or something if I were to guess. The alternative is you can run the server manually on the command line if you want to go into the previously mentioned server folder and run the Bedrock server yourself like this:

      LD_LIBRARY_PATH=. ./bedrock_server

      I’m honestly not sure if it works on 32 bit. I’m seeing mixed answers trying to look it up here but either the logs folder or running the binary yourself without help from the scripts should help! If it gives you something like can’t open/execute binary file then Mojang/Microsoft did not compile the dedicated server with 32 bit support. I think this is the likely answer here.

      You could also do a:

      ldd bedrock_server

      to see if it’s trying to link to a bunch of 64 bit libraries that don’t exist (or just flat out erroring out) or if it’s actually finding 32 bit libraries it can use!

      If it doesn’t work on 32 bit I could probably add 32 bit QEMU emulation support. This is agonizingly slow on ARM platforms but x86 to x86_64 might not be so bad. It’s not ideal since it’s still software emulation (and it will have to be to run 64 bit instructions on a 32 bit CPU unfortunately unless they release a 32 bit dedicated binary), but if this is something you’d be interested in trying I can definitely look into it and we could have you test to see if it’s fast enough on x86 to actually log in/play without lag!

      1. Avatar for Matt

        This is great information James and thank you!! You’re very kind. Let me peel back and start over by building in the subfolder, and then if I’m seeing the same thing, I’ll consult the logs/try running the binary w/o the scripts and let you know. After some more digging last night, the error I’m receiving does show up in some web conversation as an ARM support issue. So, emulation support could be tried, but only if you’d want to test it with me out of curiosity. I wouldn’t ask you to go down that rabbit hole unless your curiosity was driving you. I’m only trying to make use of an old Centrino duo w 4G of RAM and a lean front end. Thought it might drive Minecraft just fine.

        Matt

        1. Avatar for Matt

          So as we suspected (I’m sure the setup is good now) it cannot execute the binary. It’s the only comment in the log file. That’s as far as it gets.
          This time had the subfolder properly placed, and the files are all written fine. It won’t execute the 64 bit binary.

          I initially had a subfolder built yesterday when prompted for the server name, but in that last run (5th time) I was trying anything to make it happen. Sorry for the poor data and confusion.

          I’ll guinea pig the emulation if you want to write it. It may end up being helpful to others to make use of some older hardware (if it runs well).

          2 x Genuine Intel CPU T2300 @ 1.66GHz
          4GB SODIMM DDR2
          SATA 2.5" 500GB HDD
          Kubuntu 18.04.5 LTS 32-bit

          1. Avatar for James A. Chambers

            Fantastic, I’ve just uploaded this support. Can you try removing your old folder with rm -rf ~/minecraftbe and then rm SetupMinecraft.sh and download the latest one here.

            I put in the architectures to detect as i386 (probably what yours is) and i686 (I think this is barely used anymore but I put it in here just in case). Basically it should say “32 bit platform detected — installing dependencies” and install QEMU here.

            I’ll download a 32 bit OS here and create a VMware ESXI instance for testing as well here. I’m excited to see the results!

        2. Avatar for James A. Chambers

          Hey Matt,

          That’s fantastic, I love it! I have all shapes and sizes of older hardware being used and repurposed at home here for all kinds of projects. It’s a lot of fun!

          The ARM emulation is really slow but ARM and x86_64 are much more different from each other than x86 and x86_64 are from each other. Given there’s still a lot of powerful 32 bit hardware out there I think this is well worth adding in. I should be able to do it today honestly because I just need to add a check in the SetupMinecraft.sh kit for the 32 bit architectures alongside the ARM architectures it detects.

          I’ve left the ARM support in there because you never know what kind of hardware people have access to. A Raspberry Pi 4 isn’t powerful enough to emulate it, but the new Surface Pro X from Microsoft runs on a new Qualcomm ARM chip. I believe Apple’s new M1 chip also uses ARM architecture but I’d have to double check on that, but the point is you never know what’s out there or what could come up in the future. These new chips are desktop grade chips when it comes to performance and are benchmarking extremely well!

          I definitely think adding 32 bit support is worth it for the same reason. Perhaps it will work on 32 bit laptops, but if it’s a little sluggish there maybe something like an old retired server or a former powerful 32 bit gaming rig would make quick work of it!

          1. Avatar for Matt

            Sorry for the delay, been outside. I’ll look for the dependencies to load up and…

            About to start. I’ll let you know.

            🙂

            1. Avatar for Matt

              OK:

              32 bit platform detected — installing dependencies…
              Available QEMU version is not high enough to emulate x86_64. Please update your QEMU version.

              Now I need to look at that…

              Getting closer

    2. Avatar for Jeff

      Matt,

      Look under the name of your server. If you do “ls ~/minecraftbe” I could tell you what name you choose. The scripts are under the name of the server so if you “cd ~/minecraftbe/”

      You can see they are in that directory

      James you have done a great job on the scripts.

      1. Avatar for Matt

        Attempted to update the QEMU version to 4.1.
        This took some time, mostly due to unrelated projects that had to get done today. Also had to attempt it a couple of times until I found the place (noobie) where I could enable the source apt list so that I could take in the source code.
        The “make” process took a LONG time.
        Then adding the apparmor editions, apparmor libvert and libvertd only to get this:

        Dec 20 19:53:02 KUBUNTU-SERVER apparmor[6432]: * Reloading AppArmor profiles
        Dec 20 19:53:03 KUBUNTU-SERVER apparmor[6432]: Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
        Dec 20 19:53:06 KUBUNTU-SERVER apparmor[6432]: AppArmor parser error for /etc/apparmor.d/usr.sbin.libvirtd in /etc/apparmor.d/usr.sb
        Dec 20 19:53:06 KUBUNTU-SERVER apparmor[6432]: Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
        Dec 20 19:53:06 KUBUNTU-SERVER apparmor[6432]: Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
        Dec 20 19:53:06 KUBUNTU-SERVER apparmor[6432]: AppArmor parser error for /etc/apparmor.d/usr.sbin.libvirtd in /etc/apparmor.d/usr.sb
        Dec 20 19:53:06 KUBUNTU-SERVER apparmor[6432]: Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
        Dec 20 19:53:06 KUBUNTU-SERVER apparmor[6432]: ...fail!
        Dec 20 19:53:06 KUBUNTU-SERVER systemd[1]: apparmor.service: Control process exited, code=exited status=123
        Dec 20 19:53:06 KUBUNTU-SERVER systemd[1]: Reload failed for AppArmor initialization.

        Matt@KUBUNTU-SERVER:~/qemu-4.1.0$ journalctl -xe
        Dec 20 20:03:02 KUBUNTU-SERVER audit[6764]: AVC apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/s
        Dec 20 20:03:02 KUBUNTU-SERVER audit[6764]: AVC apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/s
        Dec 20 20:03:02 KUBUNTU-SERVER audit[6766]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skippi
        Dec 20 20:03:02 KUBUNTU-SERVER audit[6769]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skippi
        Dec 20 20:03:02 KUBUNTU-SERVER audit[6770]: AVC apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/c
        Dec 20 20:03:02 KUBUNTU-SERVER audit[6770]: AVC apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/
        Dec 20 20:03:02 KUBUNTU-SERVER apparmor[6686]: AppArmor parser error for /etc/apparmor.d/usr.sbin.libvirtd in /etc/apparmor.d/usr.s
        Dec 20 20:03:02 KUBUNTU-SERVER audit[6770]: AVC apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/
        Dec 20 20:03:02 KUBUNTU-SERVER audit[6774]: AVC apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/
        Dec 20 20:03:02 KUBUNTU-SERVER apparmor[6686]: Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
        Dec 20 20:03:02 KUBUNTU-SERVER audit[6774]: AVC apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/
        Dec 20 20:03:02 KUBUNTU-SERVER audit[6778]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skippi
        Dec 20 20:03:02 KUBUNTU-SERVER apparmor[6686]: ...fail!
        Dec 20 20:03:02 KUBUNTU-SERVER systemd[1]: apparmor.service: Control process exited, code=exited status=123
        Dec 20 20:03:02 KUBUNTU-SERVER systemd[1]: Reload failed for AppArmor initialization.
        -- Subject: Unit apparmor.service has finished reloading its configuration
        -- Defined-By: systemd
        -- Support: http://www.ubuntu.com/support
        --
        -- Unit apparmor.service has finished reloading its configuration
        --
        -- The result is RESULT.
        Dec 20 20:03:02 KUBUNTU-SERVER systemd[1]: Started Run anacron jobs.
        -- Subject: Unit anacron.service has finished start-up
        -- Defined-By: systemd
        -- Support: http://www.ubuntu.com/support
        --
        -- Unit anacron.service has finished starting up.
        --
        -- The start-up result is RESULT.
        Dec 20 20:03:02 KUBUNTU-SERVER sudo[6678]: pam_unix(sudo:session): session closed for user root
        Dec 20 20:03:02 KUBUNTU-SERVER anacron[6780]: Anacron 2.3 started on 2020-12-20
        Dec 20 20:03:02 KUBUNTU-SERVER anacron[6780]: Normal exit (0 jobs run)
        lines 1000-1032/1032 (END)

        This is getting painful for a windows server guy out of his depth.

        Worked on this for another couple of hours…
        Still sitting @ qemu 2.11.

        1. Avatar for James A. Chambers

          I was going to suggest upgrading to 20.04 but I checked and they discontinued i386 support at 19.10 it looks like.

          I wrote a guide about the “evil” way to get a later version of QEMU in this article here. Scroll down to the “Evil way to get latest QEMU” section. It’s for Raspberry Pi because it also used to have too old of packages (< 3.1) but the process is exactly the same for what you'll be doing. Basically you can head to the Debian repository and steal their i386 package and binfmt-support for the binfmt support package. Download these two and you can install them with sudo dpkg -i qemu-user-static-xxx.deb and sudo dpkg -i binfmt-utils-xxx.deb, but the guide goes through it a little bit more in depth step by step. This will take you all the way to 5.2 which is more than good enough.

          I’m guessing the reason the one you built didn’t seem to help is that it needs to be a “static” build for this type of emulation to work. Most build guides and the default settings are not building the static version but it can be set with a make flag to compile a static binary, but I’d just probably grab those two .deb files and install them. It’s faster, easier and unless this is a emulation machine with a bunch of other software expecting you to have a specific old QEMU version it shouldn’t hurt anything in this case.

          The reason this is “evil” is that you are bypassing the package manager which is bad practice and can cause a lot of problems. But you’re in a situation where your packages will basically never be updated as the i386 version was discontinued so they’re probably not doing anything outside security updates at this point! It’s also relatively safe with QEMU as most people don’t have this package in a critical dependency chain in their system. It’s likely you didn’t have it at all before this!

          I just wanted to make clear that this is not a good habit to get into but building QEMU, as you discovered, takes quite a while. It used to take like 36 hours to build on Raspberry Pi which is why I chose this alternative here!

          I didn’t realize it was on such an old version still or that i386 had been totally canned for Ubuntu/Kubuntu or I would have let you know this before hand. That’s the way it goes testing this sometimes unfortunately and now we know! That should be the last thing you need to do. After that you should be able to start the server!

          1. Avatar for Matt

            James, again, awesome stuff. Tons of detail and I love it. Indeed, I struggled with a couple of different QEMU packages yesterday but I’ve learned a bit. Being new to Linux, having my feet in the fire is sometimes the best way for me to learn.

            Lets try your “evil” method…

            🙂

            Matt

            1. Avatar for James A. Chambers

              Hey Matt,

              Sounds great! The nice thing about this method is that Ubuntu is a derivative of Debian. It’s basically built on top of it and is an extension of core Debian which makes the packages (usually) fairly compatible between the two. Even though they’ve stopped maintaining their repositories for i386 Debian has not.

              In fact, installing Debian might be a good option to consider long term. They’re still proudly supporting i386 builds to this day, and not a lot of distros still are! You’d have a similar choice in flavors as you do with Ubuntu for a desktop environment outlined here.

              You don’t need to do this right now. I more threw out this information assuming you’re going to be successful here but that over the long term it’s going to be more and more difficult to keep an out of support Kubuntu operational here over time and to give others reading this that may be using 32 bit still some options to be able to still get up to date software straight through the repository.

              Definitely let us know how it goes. The big outstanding question will be how much does QEMU emulation slow down the 32 bit version!

            2. Avatar for Matt

              Unpacking binfmt-support (2.2.1-1) ...
              dpkg: dependency problems prevent configuration of binfmt-support:
              binfmt-support depends on libc6 (>= 2.28); however:
              Version of libc6:i386 on system is 2.27-3ubuntu1.4.

              Looks like I need to look into libc6:i386.

              Sorry for the lag time in responses on this thread James. I got a call this morning about a customer network issue impeding their POS, so I had to get on the road to fix it.

              1. Avatar for Matt

                LOL!!!

                I think I’m going to scare people away from trying this .

                I’m starting to have fun now:

                matt@KUBUNTU-SERVER:~$ sudo apt-get install libc6-i386 libc6-dev-i386
                Reading package lists... Done
                Building dependency tree
                Reading state information... Done
                Package libc6-i386 is not available, but is referred to by another package.
                This may mean that the package is missing, has been obsoleted, or
                is only available from another source
                However the following packages replace it:
                libc6

                E: Package 'libc6-i386' has no installation candidate
                E: Unable to locate package libc6-dev-i386
                matt@KUBUNTU-SERVER:~$ sudo apt-get install libc6-dev
                Reading package lists... Done
                Building dependency tree
                Reading state information... Done
                libc6-dev is already the newest version (2.27-3ubuntu1.4).
                libc6-dev set to manually installed.
                You might want to run 'apt --fix-broken install' to correct these.
                The following packages have unmet dependencies:
                binfmt-support : Depends: libc6 (>= 2.28) but 2.27-3ubuntu1.4 is to be installed
                E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
                matt@KUBUNTU-SERVER:~$ apt --fix-broken install
                E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
                E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
                matt@KUBUNTU-SERVER:~$ sudo apt --fix-broken install
                Reading package lists... Done
                Building dependency tree
                Reading state information... Done
                Correcting dependencies... Done
                The following packages will be REMOVED:
                binfmt-support
                0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
                1 not fully installed or removed.
                After this operation, 226 kB disk space will be freed.
                Do you want to continue? [Y/n] n
                Abort.
                matt@KUBUNTU-SERVER:~$ wget http://ftp.us.debian.org/debian/pool/main/g/glibc/libc6_2.28-10_i386.deb
                --2020-12-21 15:08:15-- http://ftp.us.debian.org/debian/pool/main/g/glibc/libc6_2.28-10_i386.deb
                Resolving ftp.us.debian.org (ftp.us.debian.org)... 208.80.154.15, 64.50.236.52, 64.50.233.100, ...
                Connecting to ftp.us.debian.org (ftp.us.debian.org)|208.80.154.15|:80... connected.
                HTTP request sent, awaiting response... 200 OK
                Length: 2743020 (2.6M) [application/octet-stream]
                Saving to: ‘libc6_2.28-10_i386.deb’

                libc6_2.28-10_i386.de 100%[=========================>] 2.62M 157KB/s in 16s

                2020-12-21 15:08:31 (169 KB/s) - ‘libc6_2.28-10_i386.deb’ saved [2743020/2743020]

                matt@KUBUNTU-SERVER:~$ sudo dpkg --install libc6*.deb
                dpkg: regarding libc6_2.28-10_i386.deb containing libc6:i386:
                libc6:i386 breaks locales (<< 2.28)
                locales (version 2.27-3ubuntu1.4) is present and installed.

                dpkg: error processing archive libc6_2.28-10_i386.deb (--install):
                installing libc6:i386 would break locales, and
                deconfiguration is not permitted (--auto-deconfigure might help)
                Errors were encountered while processing:
                libc6_2.28-10_i386.deb
                matt@KUBUNTU-SERVER:~$ sudo dpkg --install libc6_2.28-10_i386.deb
                dpkg: regarding libc6_2.28-10_i386.deb containing libc6:i386:
                libc6:i386 breaks locales (<< 2.28)
                locales (version 2.27-3ubuntu1.4) is present and installed.

                dpkg: error processing archive libc6_2.28-10_i386.deb (--install):
                installing libc6:i386 would break locales, and
                deconfiguration is not permitted (--auto-deconfigure might help)
                Errors were encountered while processing:
                libc6_2.28-10_i386.deb

                Any suggestions?
                Hehehe.

                I really am laughing now.

              2. Avatar for James A. Chambers

                Yeah absolutely, libc is a critical system dependency (for basically everything) and won’t be able to be updated this way (nor will most things). Only a very self-contained package like QEMU can be done like this without essentially breaking the entire system. If anything depends on the package, like if anything had depended on QEMU for example, it would be broken in the same way and apt won’t work again until it’s repaired. Since nothing depends on QEMU, nothing cares, but *everything* depends on libc.

                You’ll probably need to do a

                sudo apt install --fix-broken

                to let it remove that libc package and any other ones that break the dependency chain so the package manager works again (hopefully, this is not a dependency you want to mess with, but if the system still boots then it didn’t actually replace the real libc). It’s the dependency for the C language itself which powers all of Linux. Every program you have depends on it that isn’t a script pretty much. Your system’s libc is too old to run the sid packages apparently. It’s oh so close (2.27 is available but you need 2.28, just one short!) but we’ll have to go older.

                qemu-user-static is version 3.1 for Debian Buster, the minimum possible version. If that one requires a newer libc than is available for your distro then it’s not going to work. 3.1 is very old now (more than two full major revisions out of date) though so that may be the way to go here.

                They’ve put you in a difficult position here. Reading this makes it sound like they were going to keep it going.

                But then they didn’t and 20.04 has zero i386 support unfortunately. The “best” answer in this case is to ditch Ubuntu for anything else that still supports i386 and will have up to date packages, but the 3.1 package may be able to help here. From our testing so far I’m guessing when I write up the documentation for 32 bit it’s going to say switch to Debian Buster or another i386 supporting distro but will have this as a workaround if 3.1 will run.

              3. Avatar for Matt

                Unfortunately the dependancy is still for 2.28:

                matt@KUBUNTU-SERVER:~$ sudo dpkg --install qemu-user-static_3.1+dfsg-8+deb10u8_i386.deb
                [sudo] password for matt:
                Selecting previously unselected package qemu-user-static.
                (Reading database ... 232791 files and directories currently installed.)
                Preparing to unpack qemu-user-static_3.1+dfsg-8+deb10u8_i386.deb ...
                Unpacking qemu-user-static (1:3.1+dfsg-8+deb10u8) ...
                Setting up qemu-user-static (1:3.1+dfsg-8+deb10u8) ...
                update-binfmts: /lib/i386-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by update-binfmts)
                dpkg: error processing package qemu-user-static (--install):
                installed qemu-user-static package post-installation script subprocess returned error exit status 1
                Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
                Errors were encountered while processing:
                qemu-user-static

                The binfmt-support depends on libc6 being at 2.28. 🙁

                Funny thing is that this idea all started when I realized that I couldn’t install docker on my Synology NAS (DS218play). I was going to emulate there in order to run a Minecraft server! When I found out that the hardware isn’t up to it (need 218+ to get the necessary Docker) I figured this old laptop would be a good option. I don’t have a rack in the house, or I’d unbox an old PowerEdge 1950 that I retired from our Data Center and format a couple of WD RED drives for this. Alas, it is too loud and doesn’t make a very good looking coffee table.

                Looking like Debian for me if you think I’ll never see a 2.28 libc.

              4. Avatar for James A. Chambers

                I like xfce because it’s really lightweight and uses the least amount of resources out of the other desktop managers. It definitely doesn’t have very many bells and whistles but it’s probably my favorite out of all of them, especially for these kinds of uses!

                I can’t believe those other packages are wanting 2.28 too. That’s crazy! I had an easier time getting it to work on a Raspberry Pi with armhf and arm64 than it has been to get it to work with Kubuntu 18.04 i386 which is pretty amazing.

                I think you made the right decision. With a lack of up to date packages we were just going way too far down a rabbit hole here to get essentially a discontinued distro to cooperate. I found references to some more up to date packages but it seems like they’re maybe for different flavors than Kubuntu.

                Let us know how Debian looks here!

  6. Avatar for James

    Hey James,

    did something change with the SetupMinecraft.sh? i am re installing my server and i removed all my minecraftpe directories and re downloaded your setup script. now my directory doesn’t have any of the start stop or restart.sh scripts. its weird.

    here is the ls -al

    drwxrwxr-x 17 4096 Dec 19 03:27 .
    drwxrwxr-x 3 4096 Dec 19 02:43 ..
    drwxrwxr-x 2 4096 Dec 19 03:27 backups
    drwxr-xr-x 14 4096 Dec 12 00:38 behavior_packs
    -rw-r--r-- 1 0 Dec 19 03:18 Dedicated_Server.txt
    drwxr-xr-x 9 4096 Dec 12 00:38 definitions
    drwxr-xr-x 2 4096 Dec 19 02:53 development_behavior_packs
    drwxr-xr-x 2 4096 Dec 19 02:53 development_resource_packs
    drwxr-xr-x 2 4096 Dec 19 02:53 development_skin_packs
    drwxrwxr-x 2 4096 Dec 19 02:43 downloads
    drwxrwxr-x 2 4096 Dec 19 03:27 logs
    drwxr-xr-x 2 4096 Dec 19 02:53 minecraftpe
    drwxr-xr-x 2 4096 Dec 19 02:53 premium_cache
    drwxr-xr-x 4 4096 Dec 12 00:38 resource_packs
    drwxr-xr-x 14 4096 Dec 12 00:38 structures
    drwxr-xr-x 3 4096 Dec 19 02:53 treatments
    drwxr-xr-x 3 4096 Dec 19 02:53 worlds
    drwxr-xr-x 2 4096 Dec 19 02:53 world_templates

    1. Avatar for James A. Chambers

      That is very weird because someone else was reporting this happening and I was certain they must have a corrupt partition or a failing drive.

      I just tried downloading and installing from scratch on a Ubuntu 20.04 Server installation, used minecraftbe as the server label and left the ports as default and it fired right up. Stopped the server and everything stopped. All scripts present and accounted for, able to restart the server normally.

      The other person reporting this was Paul in this thread, but I can’t recreate it.

      What OS and version are you running on and what did you pick for the server label and ports? I have yet to be able to recreate this but now that there’s a second one it seems like something is up!

      Did you stop the server beforehand? If it’s left open it could try to overwrite some stuff but I still don’t see how it could make scripts disappear. Are they ever making it in the first place after you first install? Hopefully you also aren’t installing it as sudo, I guess I should have asked that too as that would install everything to the /root folder.

      1. Avatar for James

        i just upgraded all my software on the Ubuntu 20.04.1 LTS (GNU/Linux 5.4.0-58-generic x86_64)

        server label was Banski-Realm and everything else was default. on initial startup the server window starts but i dont believe the server ever started. i ctrl c out of the remote session and rebooted the server for good measures.

    2. Avatar for Mandar

      I just ran into exact same problem. Fresh installed Ubuntu 20.04. Downloaded the Minecraftbe Setup script.. server came up fine. My son was not able to connect, so all I did was ran the restart script and poof.. all the scripts are gone. and the directory structure is pretty much whats above. Is there anything special I need to do to reinstall from scratch?

      1. Avatar for James A. Chambers

        Hey Mandar,

        You were about 10 minutes too early! I’ve just fixed this here and committed it to GitHub a few minutes ago. Go ahead and do a rm -rf ~/minecraftbe and run SetupMinecraft.sh again. The problem specifically was in start.sh not having a hard path to the backups folder so running ./start.sh or ./restart.sh was putting the scripts in a place they didn’t expect to be and then the scripts themselves got pruned instead of the backups folder. These paths have been changed to be hard coded. Can you try again and report back?

        1. Avatar for Mandar

          Yep seems issue is resolved. I was able to download setup script again reinstall and it came up fine. I was able to restart and its back up. Somehow my son still not able to connect from his laptop. We’re on the same network. I got the ip address right.. nc reporting connection succeeded. Not sure. will check what else is missing

          1. Avatar for James A. Chambers

            Hey Mandar,

            Have him try closing his Minecraft client completely and then opening it again. I have this problem a lot when I’m testing and for some reason once the client decides the server isn’t up a single time it will fail to connect to it even if it comes up later. Android version does the same thing. Once I restart the client it will usually instantly connect afterward!

              1. Avatar for James A. Chambers

                Hey Mandar,

                It could matter but I believe that’s correct. I had 1.16.200 but I just checked the App Store and had an update. My server is showing 1.16.201.2 here. After updating I was able to get in here and my version was showing 1.16.201. It might be worth checking the Microsoft App Store and make sure it’s the latest but it sounds correct here.

                You’re also able to netcat it, so it doesn’t seem like it’s a firewall issue like it needing a UFW allow 19132 on the Linux side. One possibility is firewall settings on Windows. It pops up that annoying window that says if you want to allow it on public networks, private networks, etc. the first time you start the client and by default a few of them are unchecked. Normally it hardly matters but with UDP traffic you often need to have the “private network” box checked since UDP is a connectionless protocol and frankly I would check all of them for Minecraft. If you have any type of third party firewall it’s definitely worth a check. It may be good to just turn the firewall off temporarily completely and if it works then you can work on correcting the configuration.

                Is the Windows machine able to ping it or netcat it? Ports are both TCP and UDP and connecting by private IP like your 192.x or 10.x is recommended but if you have the knowledge to netcat it I trust that you’ve almost certainly got your IPs and ports right.

                Did you add the server manually? Can he see the description for the server (usually just something like “Dedicated Server” by default or does it just say “Locating…”? Mine does populate and that’s a good sign that they are at least able to see each other and talk to each other. I believe the server information/description is the TCP part of the protocol but that in Bedrock almost everything else is UDP. Is there anything on your network that may affect UDP traffic?

              2. Avatar for Mandar

                Sorry James, this is coming way late, but guess what my problem was from Windows 10 client unable to connect to Ubuntu Bedrock? The stupid WiFi network setting was causing it. You have it right there in the comment above “private network”, but the setting is buried deep inside. Here’s how to find it.

                Right next to the Windows main menu in the “Type here to search” textbox type Network and Sharing Center
                Choose Network and Sharing Center
                Choose Network & Internet
                Choose WiFi
                Click Manage Known Network
                Click the WiFi network you are connected to
                Click Properties
                Change the Public to Private

                That’s it. After that it started working. Not sure what network settings Windoze internally changes, but I spent many hours fiddling with firewall and other network settings. Anyway.. hope this helps someone.

              3. Avatar for James A. Chambers

                Welcome back Mandar!

                I’m very glad you got it working! Thanks for stopping by and posting these instructions.

                This is one of the things that comes up a lot and it is one of the more difficult things to troubleshoot without seeing the setup in person. I guarantee it will help people in the future who may be struggling with the same thing!

  7. Avatar for Paul

    Hey this is awesome!

    I do need some help though…if I edit the server.properties with nano and save it – all my scripts disappear. If I do a “ls” command none of them are there. Does anyone know why? I have recreated it a couple times. With a clean install I can connect and play…but as soon as I modify it, things are gone and because the script is gone, obviously nothing starts.

    1. Avatar for James A. Chambers

      Hey Paul,

      At first when I read this I thought maybe there was a syntax error, a quote, or some other special character you might have been putting in server.properties that might make the server choke. The only problem is it doesn’t add up. This would not have any effect on the scripts or the server’s folder contents.

      The only time I’ve ever seen anything like this was when the partition was corrupt or very rarely when a drive/storage device was failing. Usually running a e2fsck on it will clean something like this up. It should find some errors if you scan your partitions with fsck (typically /dev/sda1 [boot] and /dev/sda2 [root], you can list your drives with the command ‘lsblk’). On most distros you can use:

      sudo touch /forcefsck

      to tell your distro to run a fsck check the next time you reboot before mounting the root partition.

      The best way though is to boot into recovery/rescue mode or use the live CD and run e2fsck on your partitions. You can’t fix them when your operating system is mounted/running. Typically it will find and correct some errors, then after a reboot your changes should stick!

      1. Avatar for Paul

        Yeah it is really weird. I am going to try it on unbuntu with a GUI as well. I’ll check the drive…it was an old SSD I found at work….

      2. Avatar for Paul

        Ok – I loaded it up in Ubuntu with a GUI after the drive was tested thoroughly – run the setup script with all defaults, and when the server is running I type stop and it stops.It says it stopped properly. Then I type start but I can tell it does not start properly.
        If I navigate to minecraftbe/mcserver and run ./start.sh – there is no script. There are no scripts in the mcserver folder at all – they were there before.

        All I did was type stop.

        1. Avatar for James A. Chambers

          When you stop the server, or edit server.properties it is triggering a write to the disk. Stopping the server for example writes all the changes to disk since the server started up. Even if you never logged on many things still changed like the time of day, etc. Depending on what’s wrong with it’s probably doing something like partially overwriting nearby files stored next to it on the disk.

          The server zip file is extracted first, so it makes sense those would be the last to go and you’d see most of the base files in there. The scripts are pretty much the last thing it sets up, so it makes sense those are what would take the hit. They would be closest to what your drive thinks is “free space” but it sounds like it’s not finding the right place to start writing (hardware issues or corrupt partition, but if fsck is clearing it then it’s likely hardware).

          Any configuration changes you make will be immediately lost too as you originally pointed out. I’m guessing if you try to use this Ubuntu you’re going to see a whole host of problems in other areas eventually. If it’s Ubuntu Desktop browsing the web will probably be enough to start seeing problems pretty quick.

          Just to be clear, none of the scripts or the server itself can do this. The server doesn’t do any kind of rolling back, reverting, or anything like that. It doesn’t know the script files even exist. This is a hardware issue. I bet you can get it to do it just by going in the folder and creating new random files with random gibberish in them for example. Anything that writes to that area of the disk without even running the server should trigger it.

          Did fsck not find anything wrong with it? You may need to scan the hardware itself here like actually scanning for bad sectors. Here’s a guide to try for HDDs. There’s some commands that can help like “badblocks” in there!

          If it’s a SSD like an NVMe drive you may need to check it using smartctl like this.

          Let us know how it turns out!

          Edit: Someone else reported this too. What is your OS, version, and what did you pick for the server ports and your server label? I can’t recreate this so far. The other thing I’ve been asking is if you are running SetupMinecraft as sudo (you aren’t supposed to, it sudos itself when it needs to and if it is then your server is actually being installed in the /root folder).

          1. Avatar for Paul

            I used ubuntu server at first – the latest one and then the normal version, again the latest one. The hard drive test I did took a couple hours and was the diagnostic that was a part of the BIOS setup. Everything(ports etc.) was default option. I may have run the script with a sudo reference. I am not sure. I could try that again making sure to watch for that. I did grab the basic bedrock ubuntu server software off the mojang website and use it and everything worked first try – then my kids were happy with what they had for now – so I didn’t re attempt yet.
            Appreciate the follow up. I will let you know what I find.

            1. Avatar for James A. Chambers

              Hey Paul,

              Thank you for following up as well! I did add a sudo safety check to the latest version of the script and put it on GitHub just in case as I have done this before on accident and it ended up installing to the /root folder and things were very weird. I’m also completely open to the possibility that the script could be doing something wrong and my goal with it is for everyone to just be able to instantly set up a Bedrock instance with no issues.

              Very curious, I wonder what this is going to turn out to be and if it’s the same thing James is getting. I have not been able to reproduce it yet and it doesn’t seem to happen to most people, but everyone has been giving great feedback and follow ups and I have no doubt we’ll get to the bottom of it!

              EDIT: Right after I posted this I was able to find a problem in the log files James sent me. I think I’ve got it fixed. Thanks for your patience and followups Paul! If you could try it again when you get the chance I’d love to confirm with you that it worked the way it was supposed to this time!

              The problem occurred when you ran start.sh manually. There was a relative path to the backups folder, and instead of pruning that it was pruning your main folder since it was in a different folder than the service starts in. Doh! I was restarting the server using sudo systemctl restart minecraftbe (or your server label) so I couldn’t reproduce it because I wasn’t starting it with start.sh! I’ve now literally coded a hard path that is set when start.sh is created by SetupMinecraft.sh to fix it (and learned an embarrassing lesson frankly). Log rotation was only added 3 days ago so you pretty much found it immediately!

              Thanks again guys, it is appreciated!

              1. Avatar for Paul

                I will try again soon and report back ONLY if it is doesn’t
                work. Right now my kids are in the middle of a world and I have been working a bunch. From reading in here, I would think you got it nailed down though. Thanks again for your help on this issue and the whole project.

Leave a Comment

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

Type here..

Exit mobile version