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
After the script says “Downloading the latest version of Minecraft Bedrock server…” I keep getting the error “curl: (3) URL using bad/illegal format or missing URL”. What could I be missing? I’m sure I’m missing something obvious.
Hey Sluqw3rth,
All I can figure is it must be copying the URL incorrectly. There are some computers / consoles / languages that may be substituting characters when you’re pasting it especially if there’s additional layers you’re accessing it through like remote desktop or VNC. Sometimes it’s even the web browser that is mangling text although most people should be able to paste it without any issue.
The error specifically says it’s missing the URL or it’s in an illegal format — this means the command is not copying correctly for some reason, as there is definitely a URL in there and it should be normal URL characters but something may be getting mangled somewhere along the way so try typing it manually (sorry, it’s a pain) is probably the easiest way to check for this!
Thanks for responding. I did hand type the installation script but I still got the same error. I’ve just noticed and error earlier in the process. “Warning: Failed to create the file downloads/version.html: Permission denied” Each time I run the script I do successfully create the backup, downloads, and logs folders inside the new server folder but there is never anything in them. I see this permission denied error for the start, stop, restart, and fix permissions scripts. Could this be a firewall or permissions issue? I have checked both but… I feel like I could be missing something obvious.
Hey James, something I noticed is that the start script no longer starts the service in systemd, are you willing to remove that feature?
I ask that as I use those services to easily administrate my server from a webapp
Hey Alejandro,
Great question! So the exact way it works now is that the systemd service is always created but it won’t actually be enabled at startup unless you answer “y” to the question of whether to start the server at startup during SetupMinecraft.sh.
The systemd service itself actually calls start.sh no matter how it’s configured. So if you do a systemctl start yourserver the systemd script changes to your server’s main directory and executes the start.sh for that specific server. It’s basically a very thin wrapper for start.sh, which is a very thin wrapper for screen, which is a very thin wrapper for the actual real official Minecraft Bedrock dedicated server binary/console if that makes sense.
For this reason, even if you didn’t start the server using service, you can actually still use the systemd commands to control the server with start, stop, etc. Here’s the service code to give a less abstract idea of what I mean:
[Unit]
Description=servername Minecraft Bedrock Server
After=network-online.target
[Service]
User=userxname
WorkingDirectory=dirname/minecraftbe/servername
Type=forking
ExecStartPre=+/bin/chown -R userxname dirname/minecraftbe/servername
ExecStart=/bin/bash dirname/minecraftbe/servername/start.sh
ExecStop=/bin/bash dirname/minecraftbe/servername/stop.sh
GuessMainPID=no
TimeoutStartSec=600
[Install]
WantedBy=multi-user.target
And that’s all there is to the service! It’s just those lines. It’s because it’s a “forking” service which basically means all it does is start other services/scripts. It basically sets the working directory and then uses the start.sh and stop.sh scripts to control the server as well.
So basically it should be fine to keep integrating it with other applications no matter which of these methods you’re using. Whether you use the systemd wrapper or the start.sh/stop.sh scripts to control it they all end up going to the same place/code so it should be totally safe to continue doing what you’re doing.
The only difference I could think of between the two methods is if you don’t start the server using systemd (sudo systemctl start/restart/stop yourserver) then you probably won’t see the service as “online” if you are tracking it by service. The service though should continue to be present like it has been and work the same. Hopefully that helps!
That’s actually what I’m doing, using the systemd status to track if the server is online, thanks for answer, I really like your work
Awesome, I can definitely say I plan on keeping the functionality the same so as long as everything is working you should be good to go. Have fun and thanks!
Hello, Ubuntu 18.xx
fresh install, and i get the following….. any ideas
error line seems to be:
Failed to start Aldrich.service: Unit Aldrich.service is not loaded properly: Exec format error.
I just used the above
curl https://raw.githubusercontent.com/TheRemote/MinecraftBedrockServer/master/SetupMinecraft.sh | bash
to install and followed the instructions.Start Minecraft server at startup automatically (y/n)?y
Your time zone is currently set to Europe/London. Current system time: Thu 8 Jul 21:19:37 BST 2021
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)?y
Daily restart scheduled. To change time or remove automatic restart type crontab -e
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.
Failed to start Aldrich.service: Unit Aldrich.service is not loaded properly: Exec format error.
See system logs and 'systemctl status Aldrich.service' for details.
Minecraft server failed to start after 20 seconds.
Hey Jonathan,
Exec format error, haven’t seen this one for a while! Does this happen to be a 32 bit system as well? The issue is the official Minecraft Bedrock dedicated server is compiled for the x86_64 architecture.
Exec format error is likely because this is a 32 bit system and it doesn’t understand the 64 bit instructions. I’ve tried emulation with it before for 32 bit but we never got it fully working because there’s so few 32 bit distros out there and none of them had a new enough libc for us to emulate it. It actually does emulate (slowly) on ARM but we’ve never had 32 bit yet.
Can you give the output of this command:
uname -a
Linux JON-Server 4.16.0-041600-generic #201804012230 SMP Sun Apr 1 22:31:39 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
should be 64, which i can see from that output, i have the previous version you supplied on here running.
thanks for the quick reply
Hey Jonathan,
That’s strange, it doesn’t look like it likes the service, but the service hasn’t changed for a long time, and you’re the first person who has ever reported this issue. When was the last time you updated by chance (before this)? Maybe really old versions of systemd don’t like my ExecStartPre line but I know lots of people have been using it on Ubuntu 18.04.
Does it just start using normal start.sh? That’s very strange that it doesn’t recognize the service format. Is the system up to date with sudo apt update && sudo apt dist-upgrade? Have you tried running SetupMinecraft.sh and letting it replace the scripts again? Are you using the live SetupMinecraft.sh from the site (and not an old copy) because old SetupMinecraft.sh’s probably wouldn’t set up the service correctly. Let me know what you find!
server should be uptodate as i regually apt update and upgrade.
I havent used SetupMinecraft.sh, thats not a script i can see.
I had used your previous script to install prior to clifs and caves, i recentlt saved my world and cleared the dir, and used your new script line.
it wasnt working a month ago either with the clifs and caves update.
I will try and update and upgrade as well as a restart and try again.
same issue
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 Aldrich server. To view the console use the command screen -r or check the logs folder if the server fails to start
Failed to start Aldrich.service: Unit Aldrich.service is not loaded properly: Exec format error.
See system logs and 'systemctl status Aldrich.service' for details.
crooklar@JON-Server:~/minecraftbe/Aldrich$
yes, using SetupMinecraft.sh as shown above.
Hey Jonathan,
Perfect! We’ve ruled a ton of stuff out. Let’s try removing the service:
sudo rm -f /etc/systemd/system/Aldrich.service
sudo systemctl daemon-reload
Now try installing again.
I didn’t see if you said start.sh would work. I would go to your server folder and try running start.sh. I know several people have been using Ubuntu 18.04 that have been working with it in the past week so there’s something different about yours that isn’t “normal” 18.04 or your configuration and I’m trying to figure out what that is here.
It looks like you are running a kernel from 2018 according to this:
Linux JON-Server 4.16.0-041600-generic #201804012230 SMP Sun Apr 1 22:31:39 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
That should not be possible, you’re missing literally years of critical security updates and that may indeed be old enough that systemd can’t understand the service. This must be it. Is this a custom kernel and it’s that way on purpose? sudo apt update && sudo apt dist-upgrade should not leave you with a 2018 kernel basically. Watch the output carefully and if it looks like it’s giving errors the output would help for sure.
It might even just need a:
sudo apt --fix-broken install
sudo apt dist-upgrade -y
Let’s see what you get from those!
Did the last two commands anyway
crooklar@JON-Server:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 4 not to upgrade.
crooklar@JON-Server:~$ sudo apt dist-upgrade -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
0 to upgrade, 0 to newly install, 0 to remove and 4 not to upgrade.
crooklar@JON-Server:~$
a re-install still had the same result
Start Minecraft server at startup automatically (y/n)?y^[[3~
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 Aldrich server. To view the console use the command screen -r or check the logs folder if the server fails to start
Failed to start Aldrich.service: Unit Aldrich.service is not loaded properly: Exec format error.
See system logs and 'systemctl status Aldrich.service' for details.
this worked
sudo apt install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04
Linux JON-Server 5.4.0-77-generic #86~18.04.1-Ubuntu SMP Fri Jun 18 01:23:22 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
crooklar@JON-Server:~$
but reinstalling still gives:
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 Aldrich server. To view the console use the command screen -r or check the logs folder if the server fails to start
Failed to start Aldrich.service: Unit Aldrich.service is not loaded properly: Exec format error.
See system logs and 'systemctl status Aldrich.service' for details.
crooklar@JON-Server:~$ uname -a
Linux JON-Server 5.4.0-77-generic #86~18.04.1-Ubuntu SMP Fri Jun 18 01:23:22 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
crooklar@JON-Server:~$ Linux JON-Server 5.4.0-77-generic #86~18.04.1-Ubuntu SMP Fri Jun 18 01:23:22 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
using start.sh gives this….
crooklar@JON-Server:~/minecraftbe/Aldrich$ sudo ./start.sh
./start.sh: line 24: cd: Aldrich/minecraftbe/Aldrich: No such file or directory
chown: cannot access 'Aldrich/minecraftbe/Aldrich': No such file or directory
chmod: cannot access 'Aldrich/minecraftbe/Aldrich/*.sh': No such file or directory
./start.sh: line 62: pushd: Aldrich/minecraftbe/Aldrich/backups: No such file or directory
rm: cannot remove 'definitions': Is a directory
rm: cannot remove 'structures': Is a directory
rm: cannot remove 'resource_packs': Is a directory
./start.sh: line 62: popd: directory stack empty
Checking for the latest version of Minecraft Bedrock server ...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 303k 0 303k 0 0 975k 0 --:--:-- --:--:-- --:--:-- 972k
Minecraft Bedrock server is up to date...
Starting Minecraft server. To view window type screen -r Aldrich
To minimize the window and let the server run in the background, press Ctrl+A then Ctrl+D
crooklar@JON-Server:~/minecraftbe/Aldrich$ screen -r Aldrich
There is no screen to be resumed matching Aldrich.
crooklar@JON-Server:~/minecraftbe/Aldrich$
this also broke my zfs pool, but will try and fix that seperatly
Hey Jonathan,
Frankly your entire setup is broken it looks like. It looks like you manually installed the newer kernel but it isn’t actually updating anything else. Systemd is the application that is too old to run the server.
If you don’t want to fix this broken machine with a reimage then go ahead and edit the /etc/systemd/system/Aldrich.service and delete the ExecuteStartPre. Your system is too old and doesn’t meet the requirements for the server so you’re going to have to start deleting features to match your old broken OS install.
You are also selecting the wrong path. This is not a real path:
Jul 11 10:00:37 JON-Server systemd[1]: /etc/systemd/system/Ald.service:7: Working directory path ‘Aldrich/minecraftbe/Ald’ is not absolute.
Please run SetupMinecraft.sh and choose the default (~) for your installation path. It’s probably /home/crooklar but ~ also means home directory. Do not type Aldrich in the directory path or anything else but ~.
It’s still not going to understand your service. You installed a new kernel but this system is completely broken. I’ve never seen an Ubuntu installation this broken in my life. I don’t even know how it’s booting. I would reimage it. You’ve already spent many hours more troubleshooting this than installing a working copy would take. You’re the only one that has ever seen anything like this and I wouldn’t trust that OS to run anything at this point. Broken ZFS is all the more reason to do this. Who even knows what else at this point. Too much.
You’re already running an impossible/shouldn’t exist configuration now! This is like nearly Ubuntu 16.04 levels of oldness of systemd. It has to be Ubuntu 18.04.0 or 18.04.1 or something very very old (near original release of 18.04 or not too long after) like that. I believe we’re actually on a minimum of 18.04.5, and I wouldn’t install anything less than the current LTS of 20.04. Maybe a:
sudo do-release-upgrade
would be in order to upgrade this OS to a newer release but I would honestly be very surprised if you can do a release upgrade on this broken install without getting a ton of errors but it may be worth a shot especially if you’ve reached the point I’m at with it where troubleshooting this further is a waste of time vs. fixing the growing list of very unusual OS issues that seems to only be limited so far in how many places we look/how many logs are posted here by installing a newer working copy.
Apt isn’t even seeing any updates but for some reason did install the newer kernel when you installed the hwe kernel (that’s the extended hardware support kernel) but is happy leaving everything else at 2018 versions. Baffling. It says mongodb was held back so some packages are being held for some reason but these packages shouldn’t be causing this. Then again, upgrading to a newer kernel shouldn’t break your ZFS either. None of this should be happening. None of it.
It’s also possible your entire system is being held back to keep supporting this old held version of mongo. That could actually explain this:
The following packages have been kept back:
mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
Maybe it can’t update your libc past that without getting a newer mongodb version so it is holding back your entire system to avoid having to upgrade some very important prerequisites that would likely fix the rest of your issues. Having held packages like this will hold the rest of your upgrades back to follow it’s instruction and maintain this old version. You could try removing the hold with:
sudo apt-mark unhold mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
This is definitely your install though. If you reimage it will work and I can assure you this configuration is bad and you’re only going to find more problems the more places you look here.
Let’s see what you get by installing to the home directory (~) or starting to pull newer features out of the service! The service has been the way it is for at least a year, so you must have last upgraded before the ExecStartPre line was added to the service which is not supported in systemd versions from 3-4 years ago basically if that makes sense!
This is probally a result of me having no idea what i am doing, googleing what i want an entering commands others have written to others solutions.
appreciate your attempt at helping.
Hey Jonathan,
No worries at all! Yours is a really tough one but I think we can get it going by removing some holds or it may just be time for a reimage for this one (especially if ZFS still isn’t working after removing the holds and trying a sudo apt dist-upgrade again followed by a reboot).
No question this is one of the toughest ones that has ever been posted here and thanks for sticking with it because I’m sure it’s frustrating. That’s why I started suggesting a reimage at this point if it continues to fight you because if this was at work (for level 3 tech work) I would have probably got in trouble for spending this much time troubleshooting it at this point because when they’re this broken it’s time for a reinstall as long as there’s backups because time is money and once you’re spending 3+ hours troubleshooting a single issue you could have reimaged the entire environment in perfect condition by then and restored everything.
It’s just using your time most efficiently even though there is an answer to why it’s broken. You can even find the answer after 20+ hours, but if it would have taken 2 hours to reimage it and restore a backup you actually wasted 18 hours finding a fix that you’ll never need to use again most likely.
Definitely let us know how it turns out!
New drive, clean install
and it works, Zfs too
just need all my docker images/configs back up, this should be a cleaner image as i know more about what i am doing!
Hey Jonathan,
That sounds fantastic, I’m thrilled! I’m guessing you will notice a positive difference on performance too as on that old image a lot of packages (like the systemd one we went through) were either being held back or having some kind of apt error (could have been apt’s cache being stuck/corrupt, that’s one of the few things I’ve ever seen do anything like this, or the holds through a dependency chain somehow, something like that) where it doesn’t want to update them / doesn’t even seem to think it needs to update them yet we could still install a 2021 HWE kernel from the repository and it came right through. What a crazy ride!
If this is a configured Docker server I definitely understand why you tried so hard to fix it! I have a couple of VMware ESXI servers that run all of my testing machines / configurations / etc. and if I had to redo that it would take a very long time. Much longer than just the 2 hours reimaging / restoring a backup etc. since some of that configuration can’t just be bulk restored from a backup in a lot of these products and trying to get them to work in a way to do so requires planning and constant vigilance that I have definitely not kept up with on my servers and would have a lot of work to do if they suffered a similar fate.
I think this was the best course of action regardless because I expect you will see performance increases from the years of additional fixes as well as not-so-easy to see security patches that you only realize aren’t working once you get hacked and the server is wrecked. Thanks for sticking through this and coming back and letting us know how it turned out! I’m guessing it’s probably less than 1% of readers who comment here (which is still 100 times higher than the comment rate on most sites that aren’t reddit or Facebook etc. and a big reason the site does well) and that our conversation will benefit others who may be dealing with a similar situation. I completely understand that the comments are more valuable than the content a lot of the time and think this would be one of those situations for someone dealing with a malfunctioning server. Cheers and enjoy now that Minecraft is finally working again!
Also logs:
Failed to start Ald.service: Unit Ald.service is not loaded properly: Exec format error.
See system logs and 'systemctl status Ald.service' for details.
See system logs and 'systemctl statusMinecraft server failed to start after 20 seconds.
crooklar@JON-Server:~$ journalctl -u Ald.service
-- Logs begin at Sat 2021-05-22 14:17:01 BST, end at Sun 2021-07-11 10:01:03 BST. --
Jul 11 10:00:37 JON-Server systemd[1]: /etc/systemd/system/Ald.service:7: Working directory path 'Aldrich/minecraftbe/Ald' is not absolute.
Jul 11 10:00:42 JON-Server systemd[1]: /etc/systemd/system/Ald.service:7: Working directory path 'Aldrich/minecraftbe/Ald' is not absolute.
Hello,
My knowledge of this is very basic so please delete is not allowed, as your guide has worked amazingly so far.
I’m running my minecraft bedrock server on Unbuntu 20.04.2 LTS (ethernet PC-Router) with no problems with people joining on my wifi but when my family, after adding the the server address and the port on their device, on their wifi it doesn’t work.
I’ve port forwarded IPv4-19132 TCP/UDP and I tried IPv6-19133 on my router for the PC my servers on, but with netcat it shows the port connection refused. I’ve also disabled the Linux firewall UFW.
I was just asking as I’m unsure of what the problem is or solution.
Hey RickyH,
Welcome! You actually gave a really good description of what you’ve tried and actually have troubleshooted this pretty well. I have a few things to try based on experience from the years of comments here for sure.
For a test are you able to disconnect your working PC/setups from Ethernet and join the WiFi yourself? The reason I ask this is I have actually seen this be issues on the client side.
For example, several people have had it end up being the Windows firewall. You know how you run an application and it does a popup the first time and lets you select to allow for public/private/etc. A lot of the times they needed to go into the Windows Firewall and open up all these ports to “Public”. Why? Because UDP is a connectionless protocol unlike TCP and Bedrock uses UDP extensively. Since it’s connectionless, UDP traffic is *always* public.
Now you stated that you used netcat to do some of these tests. That would have most likely been from Linux so even though testing and configuring for this is good I think at the very least there’s more going on here too. Is your wireless router separate from your normal router or are they combined? Are we maybe dealing with double NAT here (where a device is behind 2 different NAT routers)? Is this two networks by chance (like if they join on WiFi will their IP be 10.0.0.1 instead of 192.168.0.1 as an example)?
If you’ve set up port forwarding you could try by public IP address. You can find that by just typing “whats my ip” in Google and whatever it says is your actual public IP address. This will be different than 192.168.x.x or 10.x.x.x. If you know these parts already sorry I’m trying not to leave anything out in case someone else is reading this later they can understand what I’m talking about here. If you’re already using your public IP address I would try just the opposite and have them try by private IP address.
How about your server configuration? Did you set an IP address in your server.properties or did you leave it the default? If you set an IP address it may only be listening on that IP address and the traffic may not be getting routed the way you expect. If you haven’t set an IP address you may want to try setting it and see if that actually fixes it as well. Let us know what you find!
Hey,
Thank you, changing the connection from Ethernet to WiFi has sorted it, though I had to change the Router port forwarding as it showed up as a different device but with the same PC name from when on Ethernet to now WiFi.
But it works now on WiFi thank you so much.
Excellent, glad to hear it! I’m not sure why it works, it kind of annoys me because it shouldn’t work, but when mine was stuck switching connection types helped get mine going too. Thanks for letting us know!
Hello, I have “not directly” a problem with the server. The server runs in the LAN as I want it and it should!!!
But since here are people who definitely have more idea than me, I write the whole thing times here purely, if this is not desired, I ask to delete the post again!
Here is my problem:
I was at a colleague’s house yesterday,
who has a PS4 and also a Microsoft account, now you can create a connection via cell phone to my server, which is at my place via cell phone (MineProxy-Droid).
There we the server via IP pinned and we then in the home network, with the one where one is just, as LAN game displayed!
I have Minecraft also on the cell phone, there it worked wonderfully and I could log in with my phone also on the server! However, the game was not displayed on the LAN for my colleague on the PS4. As already written, the server has communicated wonderfully with the mobile, so it has been accessible!
Question: does anyone know or know the mobile app and can tell me what I or the colleague did wrong?
This is the first where I do not know what to do!
The second is, you can invite friends yet in the game when you are in the play. If I invite my colleague, he doesn’t get an invitation when I’m connected to the server! I see him online, but the invitation itself does not go out!
If I go down from the server and make a “normal” map that I have newly created and then invite the colleague, then he also gets the invitation!
Question: Is this because of the server? That the colleague gets no invitation, or is that perhaps the Microsoft account?
That the server also runs for the PS4, I know, because I also have a PS4 at home, which I’m always gaming with my son! My son via PS4 and I on the PC!
This works wonderfully and we have never had major problems!
I know, many questions and yet I’m honestly at a loss!
I hope you can help me further!?
Marcel
Hey Marcel,
Great questions! No worries, you’re more than welcome to ask anything about Minecraft Bedrock or the server here for sure!
Are you able to add servers by IP address on the PS4 like you can on Android/iPhone? I’ve definitely seen issues where the server browser isn’t happy but once you try to connect it goes right through and joins. I don’t have the PS4 version so I am not sure if this is available.
Bedrock uses both TCP and UDP. I *think* on the Bedrock one the port used by the server browser is actually the TCP port and then for in-game and almost everything else Bedrock is purely UDP which is the exact opposite of the Java edition. I’m not familiar with this specific app but make sure if there’s any forwarding rules or anything like that that the ports are open for both UDP and TCP to have the best chance of the server browser working properly.
Sometimes setting an IP in server.properties helps. It may not be listening on the interface you expect/think it is. It’s hard to tell how the traffic is routed sometimes. Like was your cell phone also joined to the WiFi? Are you sure it went through MineProxy-Droid? It might not even be listening on that interface if it has a different IP so this may be worth a try!
For your second question you’re right, this is absolutely related to Microsoft accounts. There’s an option in server.properties called “online-mode” that controls whether it integrates with Microsoft’s online services like Xbox Live. If it doesn’t some features are unavailable like the invitations. Here’s the option for it in server.properties:
online-mode=true
# If true then all connected players must be authenticated to Xbox Live.
# Clients connecting to remote (non-LAN) servers will always require Xbox Live authentication regardless of this setting.
# If the server accepts connections from the Internet, then it's highly recommended to enable online-mode.
# Allowed values: "true" or "false"
This is the most important option to control this behavior for sure. If you have it configured how you want and it’s still not working it then people in the past here have had it end up being their server’s connection was being blocked to Xbox Live, etc. so it couldn’t authenticate people’s logins. This ended up being for a lot of different reasons like firewalls or even as simple as their router needed a reboot. That’s a few things to check at least!
Hello, I’m having a problem, whenever I try to start the server or create a new one, the script stucks trying to connect to minecraft.net , I think it happens when it verifies if I have the latest version of minecraft.
Just saw the same – the startup script halts at “Checking for the latest version of Minecraft Bedrock server …”; if I try to
wget https://minecraft.net/en-us/download/server/bedrock/
, it just times out on “HTTP request sent, awaiting response…”. Seems Microsoft might have changed how they show version.html or something.I can still download the most recent server build from
https://minecraft.azureedge.net/bin-linux/bedrock-server-1.17.2.01.zip
, so will for now try to by-pass the step in the server startup script.I’m on thin ice here 😉
Yup – got it running just by-passing the whole upgrade/check in start.sh.
(took a copy of start.sh, edited my copy and removed all lines between “Retrieve latest version of Minecraft Bedrock dedicated server” and “echo “Starting Minecraft server…
That got us going for the short-term 🙂
Hey Henrik,
The script no longer uses wget in any way. This must be an old version and I recommend upgrading as there are dozens of other problems with that version that have been fixed. The new version should require none of these changes!
Thanks, I solve my problem by running the SetupMinecraft.sh script and naming the new instance as my actual server
Hey Alejandro,
Excellent, glad to hear it, thanks for following up and enjoy and have fun!
Indeed – had a super-old version of the script. Updated that and now everything runs smoothly! Thanks 🙂
No problem at all, glad to hear you’re up and running!
Hello, I am getting an issue whenever I attempt to start the server.
Here is the server log:
[2021-07-05 18:45:33] NO LOG FILE! – setting up server logging…
[2021-07-05 18:45:33] [2021-07-05 18:45:33 INFO] Starting Server
[2021-07-05 18:45:33] [2021-07-05 18:45:33 INFO] Version 1.17.2.01
[2021-07-05 18:45:33] [2021-07-05 18:45:33 INFO] Session ID 8dc7beb4-e3f0-4940-bd60-b38ea7832016
[2021-07-05 18:45:33] [2021-07-05 18:45:33 INFO] Level Name: Bedrock level
[2021-07-05 18:45:33] [2021-07-05 18:45:33 INFO] Game mode: 0 Survival
[2021-07-05 18:45:33] [2021-07-05 18:45:33 INFO] Difficulty: 1 EASY
[2021-07-05 18:45:33] [INFO] opening worlds/Bedrock level/db
[2021-07-05 18:45:34] [INFO] IPv4 supported, port: 0
[2021-07-05 18:45:34] [INFO] IPv6 supported, port: 0
[2021-07-05 18:45:34] [INFO] Package: com.mojang.minecraft.dedicatedserver
[2021-07-05 18:45:34] Version: 1.17.2.01
[2021-07-05 18:45:34] OS: Linux
[2021-07-05 18:45:34] Server start: 2021-07-05 18:45:33 CDT
[2021-07-05 18:45:34] Dmp timestamp: 2021-07-05 18:45:34 CDT
[2021-07-05 18:45:34] Upload Date: 2021-07-05 18:45:34 CDT
[2021-07-05 18:45:34] Session ID: 8dc7beb4-e3f0-4940-bd60-b38ea7832016
[2021-07-05 18:45:34] Commit hash: 3084a928c81220bbdfaebd1bb929aa99193ec1de
[2021-07-05 18:45:34] Build id: 6415979
[2021-07-05 18:45:34] CrashReporter Key: 8c4937c1-64cb-3532-a8dc-1deb28f67293
[2021-07-05 18:45:34]
[2021-07-05 18:45:34] Crash
[2021-07-05 18:45:34] [INFO]
Failed to open curl lib from binary, use libcurl.so instead
[2021-07-05 18:45:34] 509bb797-9f34-4290-9d57-a5c129d207ca
Hey Nick,
Can you run the fixpermissions script with:
sudo ./fixpermissions.sh
from your Minecraft server folder? You can also try a sudo apt-get install libcurl4 but that looks like it may be a permissions error. Let me know what you find!
I ended up figuring it out, the port where it should say 19132 was mistyped. Thank you anyways!
Awesome you beat me to it, thanks Nick!