Factorio – One of the greatest games ever created. Here we will go through how to create and setup a server using docker for a quick deployment.
Docker Single Node
When using a single docker node, it can be created using the following docker-compose file. The image can be found at DockerHub and more detailed descriptions on what the image supports and much more. The version should be preferably be the same version of the game. Otherwise the Factorio game will complain it not being compatible.
version: "3.10" services: factorio: image: factoriotools/factorio:latest # Select the version you need, default to the latest volumes: - factorio_data:/factorio # Optionally, create a bind instead for a local simple access to save directory. # - type: bind # source: ./factorio_save # target: /factorio ports: - 34197:34197/udp - 27015:27015/tcp volumes: factorio_data: driver: local
Save the content to a file called factorio-compose-single.yml or whatever you like. After, the server can be created by using the following command. It will create and setup the Factorio, running on the host computer where the command was used.
docker compose -f factorio-compose-single.yml up
Docker Run – Quick Setup
The server can also be setup quickly using the Docker run. Same here, the version may need to changed depending on the version of the Factorio game. But the following are default to the latest version.
docker run -d \ -p 34197:34197/udp \ -p 27015:27015/tcp \ -v /opt/factorio:/factorio \ --name factorio \ --restart=unless-stopped \ factoriotools/factorio:latest

Free/Open software developer, Linux user, Graphic C/C++ software developer, network & hardware enthusiast.