Running a Minecraft Server on DigitalOcean Droplet

Minecraft Logo

My daughters play this game from time to time, and as a geek I wanted to see what was involved and what could be done when you host your own Minecraft Server. I took a semi-lazy approach and used the Droplet Marketplace to install a pre-configured Minecraft Server on Ubuntu 18.04

After that I had to figure out how to configure Minecraft (this was all brand new to me…). There is an options files that seems to have a lot of general game options that can be seen from:

cat /opt/minecraft/survival/ 

If you want to configure Minecraft, you need to use the Minecraft Commands:

I used the whitelist command to only allow certain players to join….I’m still figuring out the rest of the commands. To get to the Minecraft command prompt you need to attach to the ‘screen’ process that is running. This is running under a user called minecraft, so you need to su in as that user. The following is how I attach to the screen session from an ssh session to the droplet:

  • su minecraft
  • screen -list
    • Use this to see what screen sessions are running
  • screen -R
    • Reattaches to the running screen
  • From here, run whatever command you want…for example I had to turn whitelist on and add players so I done the following:
    • /whitelist on
    • /whitelist add <username>
  • Once complete, do the following to exit back to your normal ssh session:
    • ctrl+a d
      • Detaches from the screen session back to the minecraft user prompt
    • ctrl+d
      • Returns to the normal user account on your droplet

I noticed that the firewall was not turned on, so I enabled the ufw firewall and gave access to the Minecraft port for additional security.

About the author


View all posts

Leave a Reply

Your email address will not be published.