How to Install a Minecraft Server on OpenMediaVault 5

dbtechdiy, OpenMediaVault, Tutorials, VideoLeave a Comment

How to Install a Minecraft Server on OMV5

In this video we’ll take a look at How to Install a Minecraft Server on OpenMediaVault 5.

Here is the original source material from Docker.com:
https://hub.docker.com/r/itzg/minecraft-server/

There is also a Github page with further information about adding additional configuration options here:
https://github.com/itzg/docker-minecraft-server/blob/master/README.md

I’ve taken information from both places and put together a docker script that will launch a Docker container in less than a minute (for most systems).

Here is the script I put together:

docker run -d -it -e EULA=TRUE -e VERSION=SNAPSHOT -e MEMORY=2G -e ANNOUNCE_PLAYER_ACHIEVEMENTS=true -p 25565:25565 -v /srv/dev-disk-by-label-Files/Minecraft:/data --name Minecraft itzg/minecraft-server

Here is that script broken down in an easier to read format. DO NOT TRY TO RUN THIS. It is just to make the script easier to read.

docker run -d -it 
-e EULA=TRUE
-e VERSION=SNAPSHOT
-e MEMORY=2G
-e ANNOUNCE_PLAYER_ACHIEVEMENTS=true
-p 25565:25565
-v /srv/dev-disk-by-label-Files/Minecraft:/data
--name Minecraft
itzg/minecraft-server

When looking at the original source on hub.docker.com, the itzg team didn’t write a Stack for the server deployment. So I wrote a stack. Here’s the stack I wrote for your Minecraft server:

---
version: "2"
services:
  minecraft-server:
    image: itzg/minecraft-server
    container_name: minecraft
    network_mode: host
    environment:
      - PUID=998
      - PGID=100
      - EULA=TRUE
      - VERSION=SNAPSHOT
      - MEMORY=2G
      - ANNOUNCE_PLAYER_ACHIEVEMENTS=true
    ports:
      - 25565:25565
    volumes:
      - /srv/dev-disk-by-label-Files/Minecraft:/data
    restart: unless-stopped

Now remember that stacks have to have a very specific formatting in order to work. Also, you’ll need to change the PUID and PGID to reflect YOUR PUID and PGID. And make sure you set the absolute path in the stack to YOUR Minecraft server’s absolute path.

You’ll find additional Environmental Variable options here: https://github.com/itzg/docker-minecraft-server/blob/master/README.md

Make sure to set the absolute path under “volumes” to match the absolute path on your server to wherever you placed your Minecraft configuration folder.

If you use the “SNAPSHOT” version like I’ve done, you’ll need to change a setting in your Minecraft application. Open the Minecraft application/shortcut on your desktop. Click on the “Installations” tab and make sure to check the “Snapshots” checkbox under “VERSIONS”.

Then make sure to launch the “Latest Snapshot” option when you want to play on your server.

That should be it. You should have a fully functioning private Minecraft server running on your OpenMediaVault setup!.