Installing PufferPanel using Docker¶
The Docker image is currently X86_64 only due to limitations in the Github Actions infrastructure.
PufferPanel offers several images that include dependencies needed to run game servers. We recommend using latest as it contains everything you will need to get servers running quickly.
Warning
Be aware that if you are running a Linux distribution that enforces SELinux by default, you will run into issues when creating a server that runs in its own docker container, as opposed to running on the PufferPanel container.
In these situations, you can:
Disable SELinux.
Configure SELinux to allow the PufferPanel container to spawn other containers.
Avoid using game servers running on their own containers, (e.g., use the
minecraft-vanillatemplate instead ofminecraft-vanilla-docker).
Creating mounting points¶
Before creating the container, you need to create mounting points to ensure your PufferPanel configuration and game server data are preserved even if the container is recreated or updated.
With them, your settings, game servers, and files persist across upgrades and restarts.
To create the config and data mounting points use the following commands:
$ sudo mkdir -p /var/lib/pufferpanel
$ sudo docker volume create pufferpanel-config
Creating the container¶
Once the mounting points are ready, create your container.
Keep in mind that if you want your servers to be accessible from outside the host machine, you must bind the ports
to the host using the -p host_port:container_port option.
$ sudo docker create --name pufferpanel \
-p 8080:8080 -p 5657:5657 \
-v pufferpanel-config:/etc/pufferpanel \
-v /var/lib/pufferpanel:/var/lib/pufferpanel:z \
-v /var/run/docker.sock:/var/run/docker.sock \
--restart=on-failure \
pufferpanel/pufferpanel:latest
8080:8080 → exposes the PufferPanel web UI (required, so you can access the web UI)
5657:5657 → SFTP port used by PufferPanel (required, to allow file transfers, such as for example, when Import Minecraft Servers)
Add more
-p host:containerpairs for any game server ports you want reachable from outside
Note
If you later need to open more ports for other game server, you can remove the container using
sudo docker container rm pufferpanel and create a new one using the previous command with the new port configurations.
Start the container¶
Once the container is created you can start it by running the following command:
$ sudo docker start pufferpanel
Add user to the container¶
Finally, create an admin user to manage PufferPanel:
$ sudo docker exec -it pufferpanel /pufferpanel/pufferpanel user add
Congratulations! 🎉
Your PufferPanel instance is now up and running.
You can access the web interface at: http://localhost:8080
Understanding the config¶
With the usage of Docker, we move the configuration options to be environment variables. This means you don’t have to override the config.json to apply changes. You can use the following to get all of the environment variables on the container.
docker inspect pufferpanel --format='{{range .Config.Env}}{{println .}}{{end}}'
The variables follow the format of the JSON config, just using _ to handle children instead of {}.