01
Before you start
Wube Software, the game's publisher, provides a "headless" version of the server: the full game without graphics or sound, designed for a machine with no screen. It can be downloaded freely from factorio.com, without an account. It is the players who need to own the game.
- System: a recent 64-bit Linux VPS (Debian 12, Ubuntu 22.04 or 24.04) with a
sudo user. The official wiki states that Factorio needs glibc 2.31 or later: these versions exceed it.
- Processor: the factory simulation depends mostly on the speed of one core. That is what prevents slowdowns as the base grows.
- Memory: it follows the size of the map, the factory and the mods. A small game among friends needs little, a very large base with many mods needs much more: keep an eye on usage with
htop during the first weeks.
- Version: players must have exactly the same game version as the server.
Do the basic security settings first (SSH key, firewall, updates) with the guide securing a Linux VPS. To choose the VPS size, see which VPS for a game server.
02
Install the headless version and create the game
Download the Linux archive of the stable version, extract it into /opt (it creates the factorio folder), then create a dedicated user: the server should not run as root.
sudo apt update
sudo apt install -y curl xz-utils
cd /tmp
curl -L -o factorio_headless.tar.xz https://factorio.com/get-download/stable/headless/linux64
sudo tar -xJf factorio_headless.tar.xz -C /opt
sudo useradd -r -M -d /opt/factorio -s /usr/sbin/nologin factorio
sudo chown -R factorio:factorio /opt/factorio
Then create the game. The --create option generates a new map and saves it to the file you name:
sudo -u factorio mkdir -p /opt/factorio/saves
sudo -u factorio /opt/factorio/bin/x64/factorio --create /opt/factorio/saves/ma-partie.zip
To choose the seed, resource richness or enemies, copy data/map-gen-settings.example.json and data/map-settings.example.json, edit the copies, then add --map-gen-settings and --map-settings to the --create command: these two options only apply at creation. You can also continue an existing game: upload its .zip file to /opt/factorio/saves (with scp or over SFTP), then give it to the factorio user with chown.
03
Configure server-settings.json
The server settings live in a JSON file. Start from the example provided and put the copy at the root of the folder, so it does not mix with the game files:
sudo -u factorio cp /opt/factorio/data/server-settings.example.json /opt/factorio/server-settings.json
sudo -u factorio nano /opt/factorio/server-settings.json
The lines to look at first:
"name": "Mon serveur Factorio FR",
"description": "Usine en coopération, nouveaux joueurs bienvenus",
"max_players": 0,
"visibility": { "public": true, "lan": false },
"username": "votre_pseudo_factorio",
"token": "le-jeton-de-votre-profil",
"game_password": "",
"require_user_verification": true,
"autosave_interval": 10,
"autosave_slots": 5,
"auto_pause": true,
name and description: what the game's server list shows.
max_players: 0 means "no limit".
visibility: public lists the server in the public list, lan shows it on the local network. For a private server, set public to false and give your friends the IP address.
username and token: the public list requires a factorio.com account. The token is on the website's profile page; use it rather than the password field, which would store your password in plain text.
game_password: the password players are asked for. Left empty, the server is open to everyone.
require_user_verification: only accepts players whose factorio.com account is verified.
autosave_interval (in minutes) and autosave_slots: how often autosaves are made and how many are kept.
auto_pause: pauses the game when nobody is connected.
The file is JSON: a missing or extra comma prevents it from being read. The server reports it in its log at startup.
04
Start the server, open the port and update it
Do a first test by hand, then stop it with Ctrl+C:
sudo -u factorio /opt/factorio/bin/x64/factorio --start-server /opt/factorio/saves/ma-partie.zip --server-settings /opt/factorio/server-settings.json
From then on, create the service /etc/systemd/system/factorio.service. The --start-server-load-latest option resumes the most recent save in the saves folder, autosaves included, and the SIGINT signal (the equivalent of Ctrl+C) stops the server cleanly: the official wiki states that it saves the game when quitting.
[Unit]
Description=Serveur Factorio
Wants=network-online.target
After=network-online.target
[Service]
User=factorio
WorkingDirectory=/opt/factorio
ExecStart=/opt/factorio/bin/x64/factorio --start-server-load-latest --server-settings /opt/factorio/server-settings.json --port 34197
KillSignal=SIGINT
TimeoutStopSec=120
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now factorio
sudo journalctl -u factorio -f
The port. Factorio uses a single port, 34197 over UDP, which the --port option can change. With UFW, allow SSH before enabling the firewall:
sudo ufw allow OpenSSH
sudo ufw allow 34197/udp
sudo ufw enable
For a second server on the same VPS, give it another folder and another port (34198, for example): the logic is explained in game server ports.
Updates. Download the new archive and extract it over the old one: it replaces the game files without touching saves, mods or your settings files. Make a backup first (see below).
sudo systemctl stop factorio
cd /tmp
curl -L -o factorio_headless.tar.xz https://factorio.com/get-download/stable/headless/linux64
sudo tar -xJf factorio_headless.tar.xz -C /opt
sudo chown -R factorio:factorio /opt/factorio
sudo systemctl start factorio
05
Admins, mods and backups
Admins. Create the file /opt/factorio/server-adminlist.json, in the same folder as the factorio-current.log log, with the factorio.com usernames of the admins:
[
"votre_pseudo",
"pseudo_d_un_ami"
]
Give it to the factorio user and restart the server. After that, an admin can appoint others from the chat with /promote username (the file is then updated) and remove the role with /demote username. /admins shows the list, /kick and /ban remove a player.
Mods. They go, as .zip files, into /opt/factorio/mods, and the mod-list.json file in the same folder says which ones are enabled (true) or not (false). Download them from the official mod portal on your computer, upload them to the VPS (scp or SFTP), give them to the factorio user, then restart the service. Two rules:
- players must have exactly the same mods, in the same versions, as the server, except purely visual mods that do not change the game;
- the Space Age expansion content appears as official mods (
space-age, quality, elevated-rails): if they are enabled on the server, your players must own the expansion.
Add one mod at a time and test it: a mod can change the save, and it is not always possible to remove it afterwards.
Backups. Games and autosaves are in /opt/factorio/saves. An admin can force a save with /server-save; for a complete, consistent copy, stop the service:
sudo systemctl stop factorio
sudo tar -czf /root/factorio-$(date +%F).tar.gz -C /opt/factorio saves mods server-settings.json server-adminlist.json
sudo systemctl start factorio
Remove from the command anything you have not created (no mods, no admin list), then copy the archive off the VPS. The same method applies to another building game such as a Satisfactory server.
06
On CloudFive
CloudFive has no ready-made Factorio plan: the server is installed on a VPS, as in this guide. The Ryzen VPS, from €5.99 per month, is well suited:
- an AMD Ryzen 9 9950X, with DDR5 memory and NVMe storage: a fast core for the simulation, a fast disk for the saves of a large factory;
- root access and a dedicated IP address;
- basic anti-DDoS protection included. The game-specific filter is part of Premium Protection, a paid option (see protecting a game server against DDoS).
The servers are in France, on our own AS218808 network, monthly with no commitment, with support in French 7 days a week (tickets, Discord, phone). Gaming uses of the VPS are summed up on the gaming VPS page; to run several servers on the same machine, see hosting several game servers.
07
Frequently asked questions
How do I create a Factorio dedicated server on Linux?
Download the headless archive from factorio.com and extract it, create a game with --create, then start the server with --start-server and --server-settings. Open UDP port 34197, and put the command in a systemd service so it restarts with the VPS.
Which port should I open for a Factorio server?
Just one: 34197 over UDP, the default port. The --port option lets you choose another, for example for a second server on the same machine. The RCON port, over TCP, is only needed if you enable remote administration.
How do I show a Factorio server in the public list?
In server-settings.json, set public to true under visibility, then fill in username and token with your factorio.com account. The token is on the website's profile page, and it is better to use it than the account password.
How do I become an admin on a Factorio server?
Write your factorio.com username in the server-adminlist.json file, placed next to the factorio-current.log log, then restart the server. An admin can then appoint others in game with /promote followed by the username.
Do players need the same mods as the Factorio server?
Yes. Players must have the same game version and the same mods, in the same versions, except purely visual mods. If the Space Age expansion is enabled on the server, they must own it too.