Table of Contents

How to host a Forge Server

Share on facebook
Share on twitter
Share on telegram
Share on linkedin
Share on whatsapp
Share on reddit
Share on email

Do you want to host your own Minecraft Server on Docker with Mods?

Looking for a Forge or Fabric Minecraft Server on Docker?

Look at itzg’s Minecraft Server for Docker: GitHub, DockerHub.

You will need a Minecraft Java Version installed on your device.

As well as a Forge installation.


1. Hosting a Minecraft Server on Docker

You need Traefik set up!

Create a new Directory and cd into it.

mkdir minecraft && cd minecraft

As always make sure, you have an A record pointed at the Server.

In there we’ll have to set up the docker-compose.yml.

nano docker-compose.yml

Paste this: (For newcomers: This is a Traefik setup, if you haven’t set Traefik up, take a look at this Post)

Replace with your domain.

If you want to use more environment variables, take a look at this.

version: '3'

    image: "itzg/minecraft-server"
    container_name: "minecraftserver"
      - "./data:/data"
      - "./plugins:/plugins"
      EULA: "TRUE"
      TYPE: "FORGE"
      VERSION: "1.16.4"
      FORGE_INSTALLER: installer.jar
    tty: true
    stdin_open: true
    restart: always
      - 25565:25565
      - "traefik.enable=true"
      - "``)"
      - ""
      - ""
      - "``)"
      - ""
      - ""

    external: true
    external: false

Now you’ll have to download the Forge Installer file:

sudo curl -o data/installer.jar

And then spin up the Stack.

docker-compose up -d

You’ll have to wait a few minutes. You can look at the progress in Portainer.

To connect to your server, just join in Minecraft.


Minecraft Server on Docker Ingame


2. Add mods

To add mods we just have to download them and put them into the data/mods folder.

I’m going to download mods from CurseForge. In this example I’ll be using the JustEnoughItems Mod.

curl -o data/mods/jei.jar

Technically you can just curl any mod from the internet, however I couldn’t find the .jar link anywhere, so I’ll instead download the files to my computer, which I have to do anyway, and then upload them via FTP. Want to know how to install FTP? Click here.

Every Client who wants to play needs the same Mods, with the same version.

To figure out what Mods you are running, join any server and type in the command:

/forge mods

And it’ll give you a list of all the mods.

I haven’t found a command to figure out what Mods the server is running, they’ll have to ask you, the admin.


Minecraft Server on Docker with Mods


3. Errors

3.1 Can’t find the Server.jar

If you get an Error saying it can’t find the Server jar, you’ll have to download it manually.

First stop the Stack:

docker-compose down

Now download the Server:

sudo curl -o data/minecraft_server.1.16.4.jar

Now spin up the Stack again, and it should work:

docker-compose up -d
Related Post

First steps on an external Server

Setting up your Server for the upcoming Tutorials.


0 0 vote
Article Rating
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x