Upgrading Your Self-Hosted Minecraft PE Server – Ubuntu Linux 16.04 LTS

Post Updated: 29 May 2017

The easiest way to upgrade your Minecraft PE server, if you followed my guide “Hosting Your Own Minecraft PE Server – Ubuntu Linux 16.04 LTS“, is to simply back up the critical server game files and reinstall the server.

Quick backstory: I tried finding the PHAR file, JAR file, whatever files needed to just do an in-place upgrade and failed to find the correct files since this is a development project and the files are all over the internet. If you know of a better way to upgrade, and have tested your theory in a real environment and it can be replicated, feel free to drop me a line below.

  1. Stop your Minecraft server by issuing a “stop” command at the console. If you are using crontab to auto-start your server, edit your crontab to comment out the auto start line then reboot your server.
    1. console method: stop
    2. crontab method (log in with minecraftsvc user): crontab -e
      1. add a hashtag/pound sign in front of your job task: #@reboot /etc/minecraftpe/start.sh
      2. CTRL+X (which literally is CTRL X)
      3. Press Y [enter]
      4. [Press enter]
      5. shutdown -r now
  2. Log back in at console. cd /etc
  3. cp -R minecraftpe minecraftpe_bak
  4. cd minecraftpe
  5. rm -R *  (THIS WILL DELETE ALL FILES IN YOUR MINECRAFTPE FOLDER. Make sure you made a backup using step 3 above!)
  6. Steps from the install guide (and displayed below): http://www.johndball.com/hosting-your-own-minecraft-pe-server-ubuntu-linux-16-04-lts/
  7. Login as your minecraft user: su minecraftsvc
  8. Old: Clone the GitHub repo (because the install script is now working at the time of this writing): git clone --recursive https://github.com/pmmp/pocketmine-mp.git pocketmine-mp.git
    1. Use this command: wget -q -O - http://get.pocketmine.net/ | bash
  9. Old: Move files from the git folder to your directory: mv /etc/minecraftpe/pocketmine-mp.git/* /etc/minecraftpe/
  10. Download PHP 7.0.6 64 bit: wget https://bintray.com/pocketmine/PocketMine/download_file?file_path=PHP_7.0.6_x86-64_Linux.tar.gz
  11. Extract the php binary: tar xzvf download [press tab key to auto fill]
  12. Make the start.sh executable by running: chmod +x start.sh
  13. Run the start script as root once to create necessary directories and files: ./start.sh
  14. Answer the questions during the first-run. Once finished and server is running, press CTRL+C (which literally is CTRL C).
  15. Reset directory permissions for any new directories. NOTE: you should be in the /etc/minecraftpe directory: chown minecraftsvc:minecraftsvc * -R
  16. This will remove the newly downloaded files in the minecraftpe folder:
    1. rm -R worlds/
    2. rm server.properties
    3. rm white-list.txt
    4. rm banned-ips.txt
    5. rm banned-players.txt
  17. Change directories to your backup folder: cd /etc/minecraftpe_bak
  18. Move your backed up copies of your world and other important server files:
    1. mv worlds/ /etc/minecraftpe
    2. mv server.properties /etc/minecraftpe
    3. mv white-list.txt /etc/minecraftpe
    4. mv banned-ips.txt /etc/minecraftpe
    5. mv banned-players.txt /etc/minecraftpe
  19. Change directories to your working minecraftpe folder: cd /etc/minecraftpe
  20. Start the server to make sure it is functioning properly (and log in with the latest iOS or Android client) : ./start.sh
  21. Stop the server: stop
  22. Reset directory permissions for any new directories. NOTE: you should be in the /etc/minecraftpe directory: chown minecraftsvc:minecraftsvc * -R
  23. Enable your autostart command (log in with minecraftsvc user): crontab -e
    1. remove a hashtag/pound sign in front of your job task: @reboot /etc/minecraftpe/start.sh
    2. CTRL+X (which literally is CTRL X)
    3. Press Y [enter]
    4. [Press enter]
  24. Restart the server to auto-start minecraft: shutdown -r now

One thought on “Upgrading Your Self-Hosted Minecraft PE Server – Ubuntu Linux 16.04 LTS”

  1. For PHP issues related to “float” error, nano start.sh, press “ctrl /” type php7 and press enter, type php5 and press enter. Save start.sh and relaunch.
    We are simply telling the startup script to use php5 instead of php7 at launch to workaround the float error until a working php7 version is available.
    https://github.com/PocketMine/PocketMine-MP/issues/4241

Leave a Reply

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

twenty − five =