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).
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*
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*
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*
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:
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
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
Hi there,
so I installed the package, everything is running totally smooth… on LAN.
However, no access possible from WAN. I checked my port forwarding, it is working properly (I created the 2 rules , TCP and UDP separately). Running the default ports. Everything checks out!
But still no Minecraft access from WAN-side.
Heres my copy-paste:
NO LOG FILE! - setting up server logging...
[2020-04-11 22:49:03 INFO] Starting Server
[2020-04-11 22:49:03 INFO] Version 1.14.32.1
[2020-04-11 22:49:03 INFO] Session ID d8d3139c-afcd-4ae6-9d63-a082dcc663ee
[2020-04-11 22:49:03 INFO] Level Name: Bedrock level
[2020-04-11 22:49:03 INFO] Game mode: 0 Survival
[2020-04-11 22:49:03 INFO] Difficulty: 2 NORMAL
[2020-04-11 22:49:03 INFO] opening worlds/Bedrock level/db
[2020-04-11 22:49:05 INFO] IPv4 supported, port: 19132
[2020-04-11 22:49:05 INFO] IPv6 supported, port: 19133
[2020-04-11 22:49:05 INFO] IPv4 supported, port: 33477
[2020-04-11 22:49:05 INFO] IPv6 supported, port: 43900
[2020-04-11 22:49:06 INFO] Server started.
gamerule showcoordinates true
Game rule showcoordinates has been updated to true
Am I missing something here? Fresh 18.04 LTS install, firewall running from the router… not sure however if there is a built-in software firewall in Ubuntu…
Have you solved this?
I am also having this issue after a fresh install of Ubuntu Server 20.04 and ufw inactive. Reading from the comments here, I saw most had success with Ubuntu Server 18.04 and so I gave that a shot as well, bu same result. I even changed NIC cards just for kicks and still no dice. Appreciate any help you could provide.
Never mind, I was using port checkers to validate my port-forwarding rules, and all of them was reporting it is closed, but if you do try to connect to the server outside of your LAN (assuming you did configure it right), it works!
And to the creator of this awesome script, a huge thanks to you!
Can you confirm you managed to get WAN connectivity then?
I have port forwarding for UDP setup yet still seem to not connect externally – Just looking for confirmation that someone has successfully had external connections.
After a year of trying, no, I was unable to fix this issue.
I’m also installing a second server alongside the first one (which still works on LAN, but now WAN). Somehow, the new one doesn’t let me connect at all. Copied the settings from the first one. Difference being, server #2 is on 20.04LTS. Still have 18 LTS on server 1.
Hey Sebastien,
Did the 18.04 vs 20.04 make any difference just out of curiosity? A year is a long time, but this issue is way older and goes way back to pre-pandemic. We started seeing the multiple ports on startup issue at least as far back as 2019 I was already saying it looked normal.
See how it says listening on 19132 and 19133 and then a second set of ports? That’s when this started happening. There didn’t used to be a second set of ports. It would only show “Listening on XXXXX” for the ports you had in your config file. If those weren’t 19132 and 19133 you wouldn’t see any output related to them at all and certainly there was no set of second random ports that are basically unexplained to this day. No one knows what they do. You don’t appear to have to connect on the random ones. That makes 4 ports total.
Have you tried my fixes in this GitHub issue by chance? It can present itself as ping ports not responding on some servers and a bunch of other things. It’s all related and stems from the default ports 19132 and 19133.
The best luck we’ve had is to not use the default ports at all on *any* server from other people’s reports. That would mean ZERO servers using port 19132 or 19133. The bug is some sort of interaction with those ports. Staggering the startup of servers and having a specific server start up first has got it fixed for others in the past as well (not having them all try to start together). It doesn’t seem to work for 100% of everyone but that one seems to be well over 50-60% success rate.
There’s no clean workaround because we’re basically dealing with buggy “undefined” behavior that isn’t supposed to be happening and is still unexplained. Different systems/configurations seem to behave differently with it. It could be the Linux flavor like Ubuntu vs Debian, different support library versions or a million other factors as to why it’s not the same for everyone.
Others have had to use some variation of something like having one server using the default ports and then starting that one first before all of the other ones, or AFTER all of the other ones. There’s no silver bullet to work around it for everyone but between all those different ones I’d say most people have had one work. Have you tried some of these yet by chance?
Now if you want to see my frustration level boil over after *YEARS* of this bug (which is directly in the Bedrock dedicated server binary, which is solely under the control of Microsoft unfortunately) that last link was issue #19 and this is issue #106 (with a lot of the issues in the middle being directly related). The rant in there is definitely directed toward Microsoft and not the individual.
It’s indeed very frustrating. I’ve been pretty loud in calling out Microsoft repeatedly because we are just at their mercy for this one and it has been YEARS! Maybe one of those workarounds might help though. It also wasn’t always the case and I want to return to those days (or experience them for the first time) as much as you do for sure. Best of luck!
Sorry for the Extremely late reply to this. Actually, I didn’t see a difference since I never went to 20.04 fully, and within a week I was back on 18.04. That said, I simply think I was having a router issue, as my router was basically a setup of 3 identical Asus RT-N66U, where 2 were access points and one was the acting router. I switched this out to a TP-Link high performance router (wired only) and I have since figured that this is a port forwarding issue that I need to learn how to deal with.
As for the most recent upload of the server version, THANK YOU SO MUCH for fixing this! The version-pin function is quite handy and works flawlessly. I’ve decided to manually upgrade the server from now on, since, as you put it, we’d be at the mercy of Microsoft. So thanks for fixing this, we can now play without waiting for 1.19 to drop in!
Back to mining…. 😉
OH — I forgot to ask. Do you know if it’s possible to run multiple instances of the server software side-by-side in the same Ubuntu install? Or will I have to run multiple dockers, or even worse, multiple VMs of Ubuntu? I’d like to have multiple worlds available but I’m very skeptical about how that will work without dedicated NIC access. Let me know what you think.
Hey Sebastien,
I think I can help! It should be no problem to do this on any of them. You would just use different ports for each of the servers basically. This is supported on the standalone version and the Docker version.
Basically the answer specifically is yes you can run multiple instances of the server side by side in standalone Ubuntu. You can run multiple versions of the container as well. This is not the same as multiple Dockers though as dockerd is the master daemon and is designed to run a bunch of different things at once without having as much overhead. It is true though that it contains it’s own virtualized OS environment and this would create a little bit more overhead than just doing side-by-side application runs on the same Ubuntu instance. It’s pretty minimal though unless we’re working with very constrained resources.
VMs would definitely be the worst way to do it. That would basically duplicate / tie up resources over and over again and would be “full” virtualization for sure. Both Docker and the standalone version will do this no problem without much overhead (running on Ubuntu would have the least overhead but the overhead on the Bedrock server is pretty low).
Hopefully that helps!
No problem at all! I’m pretty excited for 1.19 to drop as well here. I think it should be soon!
I’m glad the version pinning is working for you as well!
Is there an existing command to figure out which versions exist?
I ask because I’ve just upgraded Minecraft Bedrock to what seems like 1.19.0, however the server file version is listed in the downloads folder as 1.19.10.20. So without having the same as the server, my private server’s world is still as-of-yet inaccessible.
Hey Sabastien,
Welcome back! Unfortunately no there isn’t. Basically this is completely unsupported (officially) functionality myself and the community have come up with over time. On Microsoft’s web site they actually had a notice posted for the past week or so that older versions of the server would not be available for download.
This isn’t true of course. The old versions are on there as long as you know the version name. I’m seeing the public server right now as bedrock-server-1.19.1.01.zip. That makes a lot more sense than 1.19.10 as this is the initial release so it should start at 1. The .10 version might be the public preview but I would ignore it.
You can completely clear your downloads folder too if you’d like to make sure it’s not pinning the wrong version and is just downloading the latest version. It should take care of this when you restart as long as you have removed version_pin.txt. As far as I know this should match the latest version in the Microsoft store at the moment (at least I haven’t heard otherwise yet!). Definitely let me know if that gets it going for you!
Yeah, I tried, but the Minecraft client version is locked at 1.19.0. The message appearing says “Outdated Server!” this time. Which means, as far as I know, the version on the website which is available for download being 1.19.10 won’t be compatible. I’d have to be able to find Bedrock Server version 1.19.0 for that to work as I understand it. Their message onthe server download page is currently “The Microsoft Build 2022 Conference will include a special demo that uses unreleased Minecraft features while connecting to a special Preview Dedicated Server (1.19.10). When The Wild Update releases, we will update the download page to offer a compatible Dedicated Server (1.19.0) which will still support the Build 2022 demo.” This message means they KNOW the version is 1 number ahead, and they are still supposed to upload the version 1.19.0.
So here I am waiting 🙂
Hey Sebastien,
The warning is still there but that is *not* the current version on the servers. I posted a direct link from Microsoft’s site in that last reply and it is to 1.19.1.
The message is wrong basically / outdated. If you click “I Agree” and hover over the download link you will see the current release. That’s where the script downloads the server from so restarting the server should do it.
Make sure you don’t have “version_pin.txt” in your server folder. If you’re positive you’ve restarted it and it’s still using this version then it’s likely at some point revert.sh was ran on there and pinned this version. You can just delete this file from your Minecraft server folder if it’s in there to resume updating to the current version.
You don’t need to pin every version in other words. Just delete the file and it will go back to the regular behavior if that makes sense.
You pretty much simply need to restart it. Others have already got it going here it looks like!
Well… looks like my server isn’t running anymore. No amount of reinstalls or restarts actually restart the thing. When I run ‘screen -r’, I get “There is no screen to be resumed.” The server is not running. I can run ./start.sh 6 times in a row, no matter, the thing won’t restart. Luckily I have copies of my original world.
Here’s the log content from today:
[2022-06-07 21:41:25] NO LOG FILE! - Failed to up file descriptor limit Operation not permitted
[2022-06-07 21:41:25] NO LOG FILE! - setting up server logging...
[2022-06-07 21:41:25] [2022-06-07 21:41:25:167 INFO] Starting Server
[2022-06-07 21:41:25] [2022-06-07 21:41:25:168 INFO] Version 1.19.1.01
[2022-06-07 21:41:25] [2022-06-07 21:41:25:168 INFO] Session ID d31b43a1-8ed0-4419-892c-57cb8b9b3981
[2022-06-07 21:41:25] [2022-06-07 21:41:25:168 ERROR] Unknown authority mode true, expected one of [ 'client-auth', 'server-auth', 'server-auth-with-rewind' ]
[2022-06-07 21:41:25] [2022-06-07 21:41:25:168 INFO] Level Name: Survie Seb Felix
[2022-06-07 21:41:25] [2022-06-07 21:41:25:171 WARN] 'whitelist.json' will be deprecated. Please migrate to 'allowlist.json'.
[2022-06-07 21:41:25] [2022-06-07 21:41:25:171 INFO] Game mode: 0 Survival
[2022-06-07 21:41:25] [2022-06-07 21:41:25:171 INFO] Difficulty: 3 HARD
[2022-06-07 21:41:25] [2022-06-07 21:41:25:219 INFO] opening worlds/Survie Seb Felix/db
[2022-06-07 21:41:25] [2022-06-07 21:41:25:219 ERROR] DBStorage chain is invalid. Possibly encryption-related, or bad DBStorageConfig passed. Reason: Unable to decipher/decrypt LevelDB.
terminate called without an active exception
[2022-06-07 21:41:25] [2022-06-07 21:41:25:224 ERROR] Network port occupied, can't start server.
[2022-06-07 21:41:25] [2022-06-07 21:41:25:224 INFO] Server stop requested.
[2022-06-07 21:41:25] [2022-06-07 21:41:25:242 INFO] Package: com.mojang.minecraft.dedicatedserver
[2022-06-07 21:41:25] Version: 1.19.1.01
[2022-06-07 21:41:25] OS: Linux
[2022-06-07 21:41:25] Server start: 2022-06-07 21:41:25 EDT
[2022-06-07 21:41:25] Dmp timestamp: 2022-06-07 21:41:25 EDT
[2022-06-07 21:41:25] Upload Date: 2022-06-07 21:41:25 EDT
[2022-06-07 21:41:25] Session ID: d31b43a1-8ed0-4419-892c-57cb8b9b3981
[2022-06-07 21:41:25] Commit hash: 931f0a6ecff04e83e2dfe9e8fea5cc51df34f35d
[2022-06-07 21:41:25] Build id: 9901304
[2022-06-07 21:41:25] CrashReporter Key: 8421ebae-2254-3a17-a865-939c959f9904
[2022-06-07 21:41:25]
[2022-06-07 21:41:25] Crash
[2022-06-07 21:41:25] [2022-06-07 21:41:25:243 INFO] at gsignal (UnknownFile:?)
[2022-06-07 21:41:25] at abort (UnknownFile:?)
[2022-06-07 21:41:25] at __libc_start_main (UnknownFile:?)
Failed to open curl lib from binary, use libcurl.so instead
[2022-06-07 21:41:25] 6b9e25a5-7ce2-4d92-a71f-a679c74626a5
Incidentally, I also encountered an error when downloading libcrypt1, which seems to be a dependency. It’s not in the Ubuntu repo, so no way of getting it. That said, it worked before. Once I upgraded just now, it failed to restart.
Hey Sebastien,
You may have already got this going but it looks like you’re already running a copy of the server and the files are all in use:
[2022-06-07 21:41:25] [2022-06-07 21:41:25:224 ERROR] Network port occupied, can’t start server.
I wouldn’t worry about any of those errors at the bottom. Whenever the server crashes it always throws those ones at the end and the important stuff is always in the middle right before that.
I would recommend just restarting the entire computer/server and then trying again. There’s definitely something stuck open in the background. You can also just restore a backup but if there’s still a stuck server running you’re going to get all kinds of permissions errors. Restarting the entire machine should get it going!
Nope – no cigar yet. I’ve disabled ufw, I’ve issued commands for allowing my ports 19132/19133 if ufw were to run anyway, and I’ve also run
sudo netstat -tulpn | grep LISTEN
. My port is not in use, yet the system refuses to launch when I issue “./start.sh”. Nothing is working. I also rebooted completely from scratch.I’ll make a backup of my worlds and possibly reinstall while I have a chance. Can’t understand what happened!
Hey Sebastien,
Dang, I was pretty sure that would get it. Everyone has had a successful upgrade so far (that has posted at least).
There’s some other things we need to check. First I would try running SetupMinecraft.sh again before anything else. This will check your dependencies but while you’re doing that you should also change your ports off the default ports. It’s possible you are getting the default ports conflict bug.
Next did you run that newer version of the beta on this? Like did you go from 9.10 to this version? Because that is for sure going to break it (as going backwards after running a newer Minecraft version nearly always does). If that is a case you will want to restore a backup for sure.
There’s several other concerning things in your log file that point to the server is actually running somewhere somehow (ps -A should reveal it, or screen -r / screen -ls) or it’s been corrupted:
Unknown authority mode true, expected one of [ ‘client-auth’, ‘server-auth’, ‘server-auth-with-rewind’ ]
. My default server.properties that is used for the project has “server-authoritative-movement=server-auth”.This is saying your server.properties file has properties that don’t even match the available options for example. It says you chose “true” for the authority mode but the choices are ‘client-auth’, ‘server-auth’, ‘server-auth-with-rewind’.
It gets worse though:
opening worlds/Survie Seb Felix/db
[2022-06-07 21:41:25] [2022-06-07 21:41:25:219 ERROR] DBStorage chain is invalid. Possibly encryption-related, or bad DBStorageConfig passed. Reason: Unable to decipher/decrypt LevelDB.
terminate called without an active exception
There’s only two reasons this happens. Usually it’s because the server is already in use which would make sense with ports error but this error is before that and the port error may be unrelated and may be due to the exception (kind of like the ones at the end which I’m positive are always there for basically any crash no matter what the cause was). The other reason is because the world is corrupted and you would definitely want to start from a backup. This will probably “just work” when you try a backup if it’s actually corrupted.
I could see something like this happening if you tried to make your own backup of the live server folders when it was running possibly. That would definitely create basically a backup with all the lock files in place that tell the server it’s already running, etc. which is why the normal backup system takes them before the server starts in start.sh basically.
Definitely give those a try as I guess it’s possible restoring a backup won’t fix it but everything I’m seeing looks like this is corrupt or there is somehow another instance of the server running (maybe as a different user, root, who knows) but if you rebooted the machine that rules that out. Let’s see what you find!
That looks like a very good analysis. Let me run through this.
-I have un SetupMinecraft.sh again. No go.
-I did go all the way top 1.19.10.20 and backtrack to 1.18.30 with the use of “version_pin”. THEN I ran Setup Minecraft.sh again. This MAY have broken it. But read on;
-server-auth parameter, that, I figured out. I realized the file is “deprecated” because it should have upgraded and didn’t, somehow.
-Unable to decipher/decrypt, that’s probably because of my libcrypt1 error I mentioned before. There’s a dependency there that cannot be resolved, as this file is not on the repo anymore. Which should theoretically mean support is weaning. BUT:
-unlisted here is the fact I have been having issues with the server’s config in RAID1. The driver is, in fact, driving me crazy. Recently had to manually reset and run “fsck” to bring back one of the 2 drives back in the array. The setup is really quite bad, and this RAID1 setup I made, which was supposed to help and create redundancy, did not help at all and is now forcing me to reinstall. So this may in fact be the origin of the bug I’m experiencing.
I have backups and they have been stored elsewhere, but now I barely have a choice and have to reinstall Ubuntu *one more time*. I’m positive the backup will work. But the hassle of this is slowly getting to me.
Thanks for all your help, I will be keeping you posted here!
Hey Sebastien,
Great finds! I definitely suspected that the server.properties one may have been from an older server (and I know from our conversations you’ve been using it for some time) and that this wasn’t the cause of this actual issue.
The RAID arrays are really interesting. That would definitely explain something this crazy. It almost seems like the copy of files on the disk are from some sort of snapshot of when the server was running if that makes sense. When the server is running it will create various lock and temp files that are destroyed when the server closes or even cleaned up when the server restarts again.
Yours seems to be in some kind of locked state despite not having a server running. This is why I was so sure there had to be an instance hiding somewhere. Something like you’re talking about with the RAID arrays could absolutely explain something like this though.
I share your enthusiasm that restoring a backup will work here. The nature of these errors definitely do point to disk corruption (once we get past the is it already running stage). Definitely let me know if you need any more help or just want to bounce some ideas off someone!
So – I tried deleting the minecraftbe folder and reinstalling from scratch. Seems like there’s starting to be a few dependency problems. Some files fail to start now. Libcrypt1 is still not found. I think your new minimal req is 20.04. I’ll probably have to move to 22.04 myself. Keep ya posted.
Hey Sebastien,
That makes sense. Maybe they bumped the requirements for 1.19 to run the server (this would be what Microsoft links to when they build the server, basically the Linux dependencies). That would definitely explain some of the dependency issues. Are you on 18.04 right now? It was definitely only a matter of time and if you confirm this then it has finally happened!
Actually after trying my damnedest on 18.04 I gave up and messed up my entire install trying to upgrade. So I am now try to run a CLEAN install of 22.04. However…
Start Minecraft server at startup automatically (y/n)?y
Created symlink /etc/systemd/system/multi-user.target.wants/CouzinCraft.service → /etc/systemd/system/CouzinCraft.service.
Your time zone is currently set to America/Toronto. Current system time: Fri 10 Jun 2022 10:44:05 PM EDT
You can adjust/remove the selected reboot time later by typing crontab -e or running SetupMinecraft.sh again.
Automatically restart and backup server at 4am daily (y/n)?n
Setting server file permissions...
Setup is complete. Starting Minecraft server. To view the console use the command screen -r or check the logs folder if the server fails to start.
bash: line 404: \.CouzinCraft\s: command not found
Minecraft server failed to start after 20 seconds.
couzin2000@SebUBServer2:~$
…I’m getting that message. And I have no clue as to what it means. It’s a fresh install. Nothing can be missing. What gives?
wait, I just re-read that – what is “CouzinCrafts”? it’s supposed to be “CouzinCraft”, not with an S at the end. How did this happen? Not my doing!
Hey Sebastien,
Nice find! It looks like the startup check was missing part of a command in SetupMinecraft.sh. I’ve fixed this on GitHub if you want to run SetupMinecraft.sh again here. This really shouldn’t have much of an impact unless the server actually isn’t starting.
What happens if you run start.sh or type sudo systemctl start yourserver? What do the log files look like? Is this a restored backup? Does it happen if you try a fresh server?
ok. Finally got MinecraftBE to work correctly. I had to completely wipe the slate clean and install Ubuntu 22.04 LTS, because the driver running the RAID1 setup was the built-in controller on the mobo (no wonder it was messing up, those things are SO outdated). So running 22.04 now, and after a fresh install, I was finally able to enjoy 1.19.0 in my private world!
Though I did create many other problems for myself (my Plex Media Server has to be reinstalled and TeamViewer is faulty and will not work), this DID get it rolling. I’m positive I also got rid of many stability problems.
If I see any other bugs pop up I’ll be sure to let you know! Thank you for your assistance!
Hey Sebastien,
I’m greatly relieved that you’re back up and running! I think you’ll be very happy with the fresh install. I’ve found both 20.04 and 22.04 to be very pleasantly stable!
It’s never fun to have to redo all the other services on the server but in this case you were several LTS releases behind so it was probably time and for the best. Definitely enjoy and have fun!
I can’t install the ‘qemu-user*.deb’ file
I get this:
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
dpkg: error: cannot access archive 'qemu-user*.deb': No such file or directory
QEMU-x86_64-static did not install successfully -- please check the above output to see what went wrong.
Can anyone help??
root@******:/home/*****/minecraftbe/boahs# ./stop.sh
Server is not currently running!
however, the server is running and I am logged in on another computer.
Hey mooseknuckle,
Can you try issuing a screen -r and see which screen sessions are running? You should be able to resume the session from there and take over the console!
That was a fast response, thanks. I set the server to start up as the machine starts. It works very well, but I am running in to two issues, including the one posted above.
While I am logged into the world from another computer, I input:
root@minecraft:/home/stephen/minecraftbe/boahs# screen -r
There is no screen to be resumed.
root@minecraft:/home/stephen/minecraftbe/boahs# cd ..
root@minecraft:/home/stephen/minecraftbe# screen -r
There is no screen to be resumed.
root@minecraft:/home/stephen/minecraftbe#
root@minecraft:/home/stephen/minecraftbe/boahs# screen -list
No Sockets found in /run/screen/S-root.
However, the world is active and working from another computer. running ./stop.sh states that there are no servers. Running ./start.sh starts up the world, however, when I then run screen it says the world cannot be started because there is already an active world, so it looks like the game is trying to start a second session of the game besides the one that is starting up as the computer starts up. for some reason screen -list cannot detect the already running version.
BUT
if I then run ./stop.sh, both servers are stopped. But ./stop.sh only shuts down both of them only after I’ve started up the second instance of the server. Then if I start it again, I can use the screen command to see the console. I’d really like to not have to start another server, stop both servers, and start the server again every time I want to see the console. I can’t get why screen list can’t see the startup server running in the background, even when I’m cd’d directly to the server folder.
root@minecraft:/home/stephen/minecraftbe/boahs# ./stop.sh
Stopping Minecraft server ...
Minecraft server boahs stopped.
root@minecraft:/home/stephen/minecraftbe/boahs# ./start.sh
Backing up server (to minecraftbe/boahs/backups folder)
worlds/
worlds/Bedrock level/
........(level successfully starting, didn't want to spam this comment)
........(level successfully starting, didn't want to spam this comment)
2020-04-05 14:21:35 (3.63 MB/s) - ‘downloads/version.html’ saved [300962/300962]
Minecraft Bedrock server is up to date...
Starting Minecraft server. To view window type screen -r boahs
To minimize the window and let the server run in the background, press Ctrl+A then Ctrl+D
root@minecraft:/home/stephen/minecraftbe/boahs# screen -r boahs
NO LOG FILE! - setting up server logging...
[2020-04-05 14:19:00 INFO] Starting Server
[2020-04-05 14:19:00 INFO] Version 1.14.32.1
[2020-04-05 14:19:00 INFO] Session ID f0b35755-dd48-491a-b024-40751c5060f3
[2020-04-05 14:19:00 INFO] Level Name: Bedrock level
[2020-04-05 14:19:00 INFO] Game mode: 0 Survival
[2020-04-05 14:19:00 INFO] Difficulty: 1 EASY
[2020-04-05 14:19:00 INFO] opening worlds/Bedrock level/db
[2020-04-05 14:19:03 INFO] IPv4 supported, port: 0
[2020-04-05 14:19:03 INFO] IPv6 supported, port: 0
[2020-04-05 14:19:03 ERROR] Network port occupied, can't start server.
[screen is terminating]
Now I cannot get the console window at all, just this when running “screen -r minecraftserver”.
During this entire console process, I am logged in to the server from another client computer, and there have been no interruptions. It’s like the linux startup instance of the game is not affected by the commands run in this folder at all. To check why the screen command is trying to run the console on port 0, I looked in server.properties, and see what is expected:
server-port=19132
# Which IPv4 port the server should listen to.
# Allowed values: Integers in the range [1, 65535]
server-portv6=19133
# Which IPv6 port the server should listen to.
# Allowed values: Integers in the range [1, 65535]
Ho would I see the minecraft console through ssh (ability to ssh into my server from a mac or windows computer) to perform commands such as reloading permissions? Thank you.
I cant seem to get the client to connect. It says that the server i up and I am on Lan. They (Client/Server) are both connected to the router. I always time out while connecting.
I got it to work. Just figuring out how to do addons now
Hi Pete,
Can i ask how you fixed this?
I am trying to connect and the server says that the clients are connected but it times out on the client side and I can never connect.
Thanks,
Alicia
I hope someone can help. I called my server “mcbed” as I have a java one installed on another server that works fine.
I set up a brand new Ubuntu Server, ran the script and got this:
:~/minecraftbe/mcbed# ./start.sh
Checking for the latest version of Minecraft Bedrock server ...
--2020-04-03 23:54:38-- https://www.minecraft.net/en-us/download/server/bedrock
Resolving minecraft.net (minecraft.net)... 143.204.235.57, 143.204.235.38, 143.204.235.35, ...
Connecting to minecraft.net (minecraft.net)|143.204.235.57|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://www.minecraft.net/en-us/download/server/bedrock [following]
--2020-04-03 23:54:38-- https://www.minecraft.net/en-us/download/server/bedrock
Resolving www.minecraft.net (www.minecraft.net)... 152.199.21.175, 2606:2800:233:1cb7:261b:1f9c:2074:3c
Connecting to www.minecraft.net (www.minecraft.net)|152.199.21.175|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 300962 (294K) [text/html]
Saving to: ‘downloads/version.html’
downloads/version.html 100%[====================================================================================================>] 293.91K --.-KB/s in 0.03s
2020-04-03 23:54:38 (8.64 MB/s) - ‘downloads/version.html’ saved [300962/300962]
Minecraft Bedrock server is up to date...
Starting Minecraft server. To view window type screen -r mcbed
To minimize the window and let the server run in the background, press Ctrl+A then Ctrl+D
:~/minecraftbe/mcbed# screen -r mcbed
There is no screen to be resumed matching mcbed.
I’m trying to set this up using Digital Ocean so that it’s available externally and was able to get everything working and connect when just using the normal java minecraft server. However my son wants to play from his iPad and I think I need to install bedrock to do this. I’ve followed the guide and didn’t run into any issues with the install of bedrock using your guide. However, I’m unable to connect to the server from either my PC or from an iPad. I wasn’t sure if anyone had any thoughts.
Are your ports open? assume so if you got the java one running… but they do use different ports – 19132 is the standard
Also are you running as ROOT? (probably shouldn’t but that is one option.