Sets up a Minecraft Bedrock dedicated server on Ubuntu / Debian with options for automatic updates, backups and running automatically at startup
View installation instructions at: https://jamesachambers.com/minecraft-bedrock-edition-ubuntu-dedicated-server-guide/
- 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 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
UPDATE 7/2/2021 - Multiple instances are currently broken due to the Minecraft Bedrock Edition dedicated server opening up a set of ports it is not supposed to. Official bug is here on Mojang's official website here: https://bugs.mojang.com/browse/BDS-3989.
There is one workaround by not using the default ports on any of your server instances (use custom ports for IPv4 and IPv6 on every different server) and don't use the "default" ports 19132 or 19133 in any of your servers (leave them open). Single instances of the server are still fine and not impacted by any of this.
curl https://raw.githubusercontent.com/TheRemote/MinecraftBedrockServer/master/SetupMinecraft.sh | bashMinecraft Bedrock Dedicated Server Script Installation / Configuration Guide
- Ubuntu / Ubuntu Server 20.04
- Ubuntu / Ubuntu Server 18.04
- Debian Stretch / Buster
- All PC X86_64 (WORKING)
- Udoo X86 (WORKING)
- Intel Compute Stick (WORKING)
- Other X86_64 platforms (WORKING)
- ARM 64bit (WORKING -- needs linker and other binaries used for emulation to be updated)
- Raspberry Pi (WORKING, SLOW)
- Tinkerboard (WORKING, SLOW)
RTX has been released into normal Minecraft. If you had the RTX beta version you need to downgrade your Minecraft to the "normal" version for the dedicated server to work. Go into the "Xbox Insider" app and change back to the normal version of Minecraft and then uninstall your beta version and install the normal version.
For instructions on how to install resource packs (including optional RTX support) view my step by step Minecraft Bedrock Dedicated Server Resource Packs / Optional RTX guide here.
- July 4th 2021
- Added missing sudo line to some prerequistes and removed apt-get install sudo as the script no longer runs as root (install sudo if missing) - thanks Rick Horn
- July 3rd 2021
- Added Accept-Encoding: Identity header to curl as a very small % of users are getting an "Access Denied" error without this header (thanks titiscan, pull request #95
- Added default language header to curl as non-english computers were getting an Access Denied error
- Script now checks for gawk being present in start.sh. If it's not installed (likely due to reusing old SetupMinecraft.sh files) timestamps will be disabled. This will prevent the server from failing to start. This is avoided by not running an old copy of SetupMinecraft.sh!
- Removed broken screen -r command at the end of SetupMinecraft.sh as fixing it actually causes lockups -- instead now gives the command (screen -r) to pull up the Minecraft console. Press Ctrl+A then Ctrl+D to hide the console once you're inside it.
- Added code to prevent SetupMinecraft.sh from being ran as a local file (please use the new method of curl https://raw.githubusercontent.com/TheRemote/MinecraftBedrockServer/master/SetupMinecraft.sh | bash)
- July 2nd 2021
- Improved dependency detection and installation
- Removed wget dependency
- Added gawk dependency -- this should not have any impact on most systems but on systems that use mawk by default this will fix server startup issues related to timestamps since mawk doesn't support strftime
- Fixed stop.sh's -t countdown option (thanks da99Beast, issue #76)
- Fixed a nasty issue where the installation of libcurl3 over the top of libcurl4 was allowed in some configurations (like Ubuntu 18.04) and was clobbering curl (thanks Goretech)
- Fixed an issue where empty folders could be created in the wrong location if start.sh was not ran from the server folder (thanks CobraBitYou, issue #93
- July 1st 2021
- Changed from wget to curl as wget is freezing (but curl works)
- Added randomization to user agent
- June 19th 2021
- Fixed timestamps to display on every line (thanks murkyl)
- Added chmod command after unzip line to make bedrock_server executable for issue #22 (thanks murkyl)
- Merged pull request #91 from starkey-01 to add prompt for an alternate installation directory. This has been requested for a while so thanks starkey-01!
- Merged pull request #88 clarifying instructions to run script as non-root user (thanks sparagi!)
- May 23nd 2021
- The fixpermissions.sh script now displays the last 5 lines from the latest log file to aid in troubleshooting. If your server won't start this script often will take care of it and the logs can give useful information otherwise!
- May 22nd 2021
- Added setting the path variable to each script to prevent service from failing to start due to not being able to find the right path.
- Please redownload SetupMinecraft.sh for this update. The script will give you a warning each time you start up that it couldn't set the path variable without the new SetupMinecraft.sh script
- Added user agent to wget string to prevent update check from failing
- Added automatic update to SetupMinecraft.sh if it has not been modified for more than 7 days
- Updated Raspberry Pi dependencies
- April 22nd 2021
- Added a safety check to prevent installing on 32 bit (i386 or i686) operating systems. The official Bedrock dedicated server has only been released as a 64 bit (x86_64) binary and attempts at emulation on 32 bit have failed to yield any successful results!
- Added chmod +x bedrock_server to start.sh as updates seem to be removing executable permissions sometimes
- Fix removing old backup directory context (thanks murkyl, issue #76)
- April 20th 2021
- Fully qualified route command with /sbin/route to alleviate network check breaking some servers
- Added safety check to prevent using the server label 'minecraftbe' which can break the scripts
- Added libc6 dependency check as several people have reported libns1.so.1 missing
- Added curl and libcurl3 dependency as a fallback for older distros to avoid missing libcurl.so errors
- Added libcrypt1 dependency check
- April 7th 2021
- If you are updating from an old version make sure you remove the old SetupMinecraft.sh and redownload the new version from scratch. If you are seeing something like userxname in the systemd service you're using an old version of SetupMinecraft.sh and need to download the latest
- Updated fixpermissions.sh -- can fix issues with permissions if you are seeing them!
- Fixed a bug with userxname appearing in start.sh and not being updated to the correct username
- Fixed an issue that could trigger PAM authentication in start.sh
- March 16th 2021
- Fixed a incomplete sudo line in start.sh that was throwing an error (thanks /u/zfa from reddit!)
- February 1st 2021
- Added fixpermissions.sh utility script to take ownership of Minecraft server files manually (the systemd startup service does this automatically for you if you are using it)
- January 31st 2021
- Added .\ in front of the screen -q checks to prevent similar usernames from tripping up window detection
- Server now takes ownership of server files on each start to prevent folks a whole heap of trouble and heartache when restoring backups/moving files/etc.
- December 20th 2020
- Added experimental QEMU support for 32 bit (i386, i686) similar to how the ARM support works
- December 18th 2020
- Added safety check to prevent the script from being ran as root or sudo. This would cause the script to be installed to the /root folder.
- If you know what you are doing and want to override just edit the check out of SetupMinecraft.sh but otherwise just run it as ./SetupMinecraft.sh normally.
- Fixed a nasty bug that could cause start.sh and stop.sh to disapper (thanks Paul and James). This was related to log pruning and not having a hard path. If you downloaded the SetupMinecraft script in the past 3 days update and try again here and you'll be set!
- December 15th 2020
- Resource packs (including ones that optionally enable RTX support) are working
- Guide available at https://jamesachambers.com/minecraft-bedrock-server-resource-pack-guide/
- Added automatic backup rotation -- server keeps last 10 backups - thanks aghadjip Issue 33
- Added valid_known_packs to unzip whitelist to prevent resource packs from getting overwritten - thanks kmpoppe - Pull Request 53
- Create logs directory if it doesn't exist - thanks omkhar - Pull Request 39
- December 13th 2020
- RTX beta is now supported as long as you aren't on the "beta" channel anymore. Unenroll from the RTX beta and downgrade to normal Minecraft. RTX is in normal Minecraft now.
- Fixed ARM support for Raspberry Pi, Tinkerboard, and others. Be warned, it's still very slow on ARM!
- Updated depends.zip
- December 10th 2020
- Cleaned up documentation
- Added notice that the RTX beta version of Minecraft's dedicated server has not been released yet. Support will be added the moment it is!
- Added alpha software notice for Bedrock dedicated server per issue 34
- November 17th 2020
- Fixed server autoupdating in start.sh
- Minecraft.net had made a change where the "--spider" parameter would return a 503 -- removed this to fix automatic updates
- July 24th 2019
- Fixed Raspberry Pi support
- July 10th 2019
- Fixed OpenSSL error in 1.12 (thanks obviator!)
- Fixed ports not choosing defaultS if nothing is entered (thanks sweavo!)
- July 2nd 2019
- Added libcurl4 Bedrock server dependency to installer script to prevent server startup from failing
- July 1st 2019
- Added support for multiple servers
- Choose the folder name and port for the server in SetupMinecraft.sh (must be unique per server instance)
- May 23rd 2019
- Fixed typo in restart.sh where there was a space after stop command preventing the server from closing cleanly
- Added 10 second sleep after a force close to give the server time to fully close before calling start.sh
- Fixed server not restarting after scheduled nightly reboot (related to restart.sh bug)
- Removed some direct (for example paths like /bin/sleep) that were harming cross platform compatibility
- April 26th 2019
- Tested new Bedrock dedicated server 1.11.1.2
- Added startup counter to server instead of waiting a flat 4s to reduce unnecessary waiting
- Fixed ARM support (64 bit required)
- April 18th 2019
- Changed StopChecks++ to StopChecks=$((StopChecks+1)) to improve portability (thanks Jason B.)
- Added TimeoutStartSec=600 to server to prevent it being killed if taking longer than usual to download server
- March 7th 2019
- Added Armbian support
- Tested with Tinkerboard
- Fixed portability issue with route vs /sbin/route
- March 2nd 2019
- Running the SetupMinecraft.sh script after already installing now updates all scripts and reconfigures the minecraftbe service
- Script now works on any Debian based distribution (Ubuntu, Debian, Raspbian, etc.)
- Added *very slow* support for ARM platforms such as Raspberry Pi with QEMU emulation of x86_64
- Renamed service to minecraftbe to avoid confusion with Java version
- February 15th 2019
- Backups now compress into .tar.gz format (saved in backups folder)
- Startup service waits up to 20 seconds for an internet connection to allow time for DHCP to retrieve an IP address
- Removed unnecessary sleep time on stop.sh script so it returns as soon as the minecraft server closes
- February 8th 2019
- Initial release