0.17.75
,0.17
,latest
(0.17/Dockerfile)0.17.75
stable
(0.17/Dockerfile)0.16.51
,0.16
(0.16/Dockerfile)0.15.40
,0.15
(0.15/Dockerfile)0.14.23
,0.14
(0.14/Dockerfile)
Tag descriptions
latest
- most up-to-date version (may be experimental).stable
- version declared stable on factorio.com.0.x
- latest version in a branch.0.x.y
- a specific version.0.x-z
- incremental fix for that version.
Factorio is a game in which you build and maintain factories.
You will be mining resources, researching technologies, building infrastructure, automating production and fighting enemies. Use your imagination to design your factory, combine simple elements into ingenious structures, apply management skills to keep it working and finally protect it from the creatures who don't really like you.
The game is very stable and optimized for building massive factories. You can create your own maps, write mods in Lua or play with friends via Multiplayer.
NOTE: This is only the server. The full game is available at Factorio.com, Steam, GOG.com and Humble Bundle.
Run the server to create the necessary folder structure and configuration files. For this example data is stored in /opt/factorio
.
sudo mkdir -p /opt/factorio
sudo chown 845:845 /opt/factorio
sudo docker run -d \
-p 34197:34197/udp \
-p 27015:27015/tcp \
-v /opt/factorio:/factorio \
--name factorio \
--restart=always \
factoriotools/factorio
For those new to Docker, here is an explanation of the options:
-d
- Run as a daemon ("detached").-p
- Expose ports.-v
- Mount/opt/factorio
on the local file system to/factorio
in the container.--restart
- Restart the server if it crashes and at system start--name
- Name the container "factorio" (otherwise it has a funny random name).
The chown
command is needed because in 0.16+, we no longer run the game server as root for security reasons, but rather as a 'factorio' user with user id 845. The host must therefore allow these files to be written by that user.
Check the logs to see what happened:
docker logs factorio
Stop the server:
docker stop factorio
Now there's a server-settings.json
file in the folder /opt/factorio/config
. Modify this to your liking and restart the server:
docker start factorio
Try to connect to the server. Check the logs if it isn't working.
To issue console commands to the server, start the server in interactive mode with -it
. Open the console with docker attach
and then type commands.
docker run -d -it \
--name factorio \
factoriotools/factorio
docker attach factorio
Before upgrading backup the save. It's easy to make a save in the client.
Ensure -v
was used to run the server so the save is outside of the Docker container. The docker rm
command completely destroys the container, which includes the save if it isn't stored in an data volume.
Delete the container and refresh the image:
docker stop factorio
docker rm factorio
docker pull factoriotools/factorio
Now run the server as before. In about a minute the new version of Factorio should be up and running, complete with saves and config!
A new map named _autosave1.zip
is generated the first time the server is started. The map-gen-settings.json
and map-settings.json
files in /opt/factorio/config
are used for the map settings. On subsequent runs the newest save is used.
To load an old save stop the server and run the command touch oldsave.zip
. This resets the date. Then restart the server. Another option is to delete all saves except one.
To generate a new map stop the server, delete all of the saves and restart the server.
Copy mods into the mods folder and restart the server.
As of 0.17 a new environment variable was added UPDATE_MODS_ON_START
which if set to true
will cause the mods get to updated on server start. If set a valid Factorio Username and Token must be supplied or else the server will not start. They can either be set as docker secrets, environment variables, or pulled from the server-settings.json file.
If you want to launch a scenario from a clean start (not from a saved map) you'll need to start the docker image from an alternate entrypoint. To do this, use the example entrypoint file stored in the /factorio/entrypoints directory in the volume, and launch the image with the following syntax. Note that this is the normal syntax with the addition of the --entrypoint setting AND the additional argument at the end, which is the name of the Scenario in the Scenarios folder.
docker run -d \
-p 34197:34197/udp \
-p 27015:27015/tcp \
-v /opt/factorio:/factorio \
--name factorio \
--restart=always \
--entrypoint "/scenario.sh" \
factoriotools/factorio \
MyScenarioName