With your own Factorio server, your shared factory keeps running whether or not the original host is in the game. You decide on the save, the server rules, the mods, the autosaves and who gets access. On Linux the lean headless package is the right tool for that, while on Windows you run the regular game package in server mode.
You can host on your own hardware or rent a server. When self-hosting, the operating system, port forwarding, reachability and updates are yours to handle. If you would rather not take that on at home, you can rent a Factorio server instead.

What you will learn
- how to install a Factorio dedicated server on Linux and Windows
- why the headless package only exists for Linux
- how to create the save file the server cannot start without
- how to set up
server-settings.json, map parameters, ports and access lists - how to manage mods and Space Age on the server
- how to handle autosaves, backups, updates and the usual errors
Quick summary
- On Linux, go with the free headless package; on Windows, use the regular game package.
- Extract or install the server files and check the
data/,saves/andmods/directories. - Before the first start, create a save with
--create. This step is mandatory. - Adjust
server-settings.json, in particular the server name, visibility, access protection andauto_pause. - Open
34197/UDPin your firewall and, if applicable, your router. - Start the server with
--start-server, or later more conveniently with--start-server-load-latest. - Set up the admin list, whitelist, banlist and mods as needed.
- Keep the server, clients and mods on exactly the same version, and back up the
saves/folder regularly with the server stopped.
--create before the first server start, or provide an existing save.Table of contents
- Requirements and hardware
- Headless or full game? The difference between Linux and Windows
- Installing the server
- On Linux
- On Windows
- Creating a map and starting the server
- Configuring the server (server-settings.json)
- Adjusting the map (map-gen-settings.json and map-settings.json)
- Ports and firewall
- Connecting to the server
- Admins, whitelist and banlist
- Installing mods
- Autosaves and backups
- Updating the server
- Troubleshooting
- Frequently asked questions
- Related articles
- Summary
Requirements and hardware
Factorio does not need a particularly large number of CPU cores to run a server. What matters is how quickly a single core can work through the simulation. The load grows mainly with the size and complexity of your factory, not directly with the number of connected players.
The values below are planning and experience figures, not official hardware requirements from Wube:
| Scenario | RAM for planning | CPU |
|---|---|---|
| Small group, young factory | 2–4 GB | 2 fast cores |
| Medium factory, 4–8 players | 4–8 GB | 2–4 cores, high clock speed |
| Large factory, many hours of playtime | 8–16 GB | 4 cores, very high clock speed |
| Megabase | 16 GB+ | maximum single-core performance |
The Factorio simulation is bound to a single thread at its core. Additional cores therefore only help so much. For large factories, high single-core performance matters far more than a high core count.
That also explains why the player count alone says little about the CPU power you need. Two players with a very large megabase can put more load on the server than ten players with a young, small factory. RAM requirements stay comparatively moderate on a Linux headless server, because no graphics are loaded.
For a server reachable from the internet you also need a suitable network connection. If you host at home, a publicly reachable IPv4 matters for classic IPv4 port forwarding. With DS-Lite or CGNAT there is often no directly reachable public IPv4 for incoming connections.
For a publicly listed server you additionally need Factorio.com credentials in server-settings.json.
Self-hosting or renting a server?
| Option | A good fit if you … | What you have to manage |
|---|---|---|
| Self-hosting | have your own hardware and network access | installation, firewall, router, reachability, autostart, updates and backups |
| Renting a server | want the server to run independently of your own machine | the Factorio configuration, the save, mods and your server settings |
If you would rather not deal with port forwarding and keeping the machine running, renting a Factorio server is the simpler alternative to hosting at home.
Headless or full game? The difference between Linux and Windows
Running a Factorio server differs noticeably between Linux and Windows.
| Operating system | Server package | Notable point |
|---|---|---|
| Linux | official headless package | no graphics or audio, free, no login and no game ownership required for the download |
| Windows | regular game package | no separate headless package, started via factorio.exe --start-server |
On factorio.com/download, Wube provides a dedicated headless package. That package is Linux only and already contains the Space Age content. Downloading it requires neither a Factorio.com login nor ownership of the game.
On a Linux server, the headless package is the better choice over the full game. It ships without graphics and audio components and therefore does not need dependencies like Xlib, libGL or libasound.
For Windows there is no Factorio headless package. There you use the regular game package and start factorio.exe with the server parameters. That is the intended way to run a server on Windows, not a workaround.
Installing the server
On Linux
Download the Linux headless package from factorio.com/download and extract it into the directory you want to run the server from.
These paths matter most for server operation:
bin/x64/factorio
data/
saves/
mods/
The server executable sits at bin/x64/factorio. data/ holds the example configurations. Saves live in saves/, mods in mods/.
A simple start script
If you run Factorio from /opt/factorio, for example, a start script can look like this:
#!/usr/bin/env bash
cd /opt/factorio || exit 1
exec ./bin/x64/factorio --start-server-load-latest --server-settings ./data/server-settings.json
The script changes into the Factorio directory and then starts the most recent save with your server configuration.
--start-server-load-latest only makes sense once at least one save exists. Before the very first start you therefore have to create a map with --create or place an existing save in saves/.Starting Factorio automatically with systemd
For a permanently running Linux server you can start Factorio through systemd. The example below assumes the files live in /opt/factorio and that a system user factorio exists:
[Unit]
Description=Factorio Dedicated Server
After=network.target
[Service]
Type=simple
User=factorio
WorkingDirectory=/opt/factorio
ExecStart=/opt/factorio/bin/x64/factorio --start-server-load-latest --server-settings /opt/factorio/data/server-settings.json
Restart=on-failure
[Install]
WantedBy=multi-user.target
Save the unit as factorio.service. Then reload systemd and enable the service:
sudo systemctl daemon-reload
sudo systemctl enable --now factorio
Restart=on-failure brings Factorio back automatically after a crash. The autostart also makes sure the service comes back up after a system reboot.
On Windows
On Windows you use the regular Factorio game package. There is no separate headless package for Windows.
In the directory containing factorio.exe, create a batch file for launching the server:
@echo off
factorio.exe --start-server-load-latest --server-settings .\data\server-settings.json
pause
The batch file loads the most recent save and uses the configuration from data\server-settings.json.
The same rule applies on Windows: a save has to exist before the first start. Create a map with --create first.
Creating a map and starting the server
For Factorio the save is not an optional extra, it is a precondition for starting the server. Without a save, the dedicated server has no world to load.
Creating a new map on Linux
./bin/x64/factorio --create ./saves/my-factory.zip
--create generates a new Factorio map and stores it as my-factory.zip in the saves/ folder.
Then start exactly that save:
./bin/x64/factorio --start-server ./saves/my-factory.zip --server-settings ./data/server-settings.json
--start-server loads the save you specify. --server-settings additionally points at your server configuration.
If several saves already exist and the newest should always be loaded, use this instead:
./bin/x64/factorio --start-server-load-latest --server-settings ./data/server-settings.json
Creating a new map on Windows
On Windows the same flow runs through factorio.exe:
factorio.exe --create .\saves\my-factory.zip
You can then start the save you created directly:
factorio.exe --start-server .\saves\my-factory.zip --server-settings .\data\server-settings.json
Or load the most recent save from then on:
factorio.exe --start-server-load-latest --server-settings .\data\server-settings.json
--start-server, --start-server-load-latest or a scenario.Important command line parameters
| Parameter | Purpose |
|---|---|
--create FILE | create a new map |
--start-server FILE | start a multiplayer server with this save |
--start-server-load-latest | start a server and load the most recent save |
--start-server-load-scenario [MOD/]NAME | start a server with a scenario |
--server-settings FILE | path to the server configuration |
--map-gen-settings FILE | map generator settings, used together with --create |
--map-settings FILE | map settings, used together with --create |
--server-whitelist FILE | path to the whitelist file |
--server-banlist FILE | path to the banlist file |
--server-adminlist FILE | path to the adminlist file |
--port N | network port, default 34197 |
--bind ADDRESS[:PORT] | IP address and optionally port to bind to |
--rcon-port N | port for RCON |
--rcon-password PASSWORD | password for RCON |
--console-log FILE | write a copy of the server log to a file |
Automatic pausing is not controlled by a launch parameter, but by auto_pause in server-settings.json.
Configuring the server (server-settings.json)
The central server configuration lives in server-settings.json. An example version sits in the data/ subfolder.
That is where you set the server name, visibility, access protection, autosaves and network behaviour.
Verified default values
| Key | Default | Meaning |
|---|---|---|
name | empty | name in the server list |
description | empty | description in the server list |
tags | empty | tags for the server list |
max_players | 0 | maximum number of players; 0 = unlimited, admins can join even a full server |
visibility.public | true | publish the server on the official matching server |
visibility.lan | true | announce the server on the LAN |
username | empty | Factorio.com username, required for public servers |
password | empty | Factorio.com password |
token | empty | authentication token, can be used instead of password |
game_password | empty | join password for the server |
require_user_verification | true | only allow clients with a valid Factorio.com account |
max_upload_in_kilobytes_per_second | 0 | upload limit, 0 = unlimited |
max_upload_slots | 5 | concurrent upload slots, 0 = unlimited |
minimum_latency_in_ticks | 0 | artificial minimum latency |
max_heartbeats_per_second | 60 | network tick rate of the update packets |
ignore_player_limit_for_returning_players | false | returning players may exceed the limit |
allow_commands | "admins-only" | who may use console commands |
autosave_interval | 10 | autosave interval in minutes |
autosave_slots | 5 | number of rotating autosave slots |
afk_autokick_interval | 0 | minutes before idle players are kicked, 0 = off |
auto_pause | true | server pauses when nobody is connected |
auto_pause_when_players_connect | false | pauses while new players are connecting |
only_admins_can_pause_the_game | true | only admins may pause |
autosave_only_on_server | true | write autosaves on the server only |
non_blocking_saving | false | experimental fork-based saving without halting the server |
minimum_segment_size | 25 | network segment size |
minimum_segment_size_peer_count | 20 | peer threshold for the minimum segment size |
maximum_segment_size | 100 | maximum network segment size |
maximum_segment_size_peer_count | 10 | peer threshold for the maximum segment size |
Example server-settings.json
The example below uses only the settings listed above:
{
"name": "My Factorio Factory",
"description": "Shared Factorio server",
"tags": [],
"max_players": 0,
"visibility": {
"public": false,
"lan": true
},
"username": "",
"password": "",
"token": "",
"game_password": "",
"require_user_verification": true,
"max_upload_in_kilobytes_per_second": 0,
"max_upload_slots": 5,
"minimum_latency_in_ticks": 0,
"max_heartbeats_per_second": 60,
"ignore_player_limit_for_returning_players": false,
"allow_commands": "admins-only",
"autosave_interval": 10,
"autosave_slots": 5,
"afk_autokick_interval": 0,
"auto_pause": true,
"auto_pause_when_players_connect": false,
"only_admins_can_pause_the_game": true,
"autosave_only_on_server": true,
"non_blocking_saving": false,
"minimum_segment_size": 25,
"minimum_segment_size_peer_count": 20,
"maximum_segment_size": 100,
"maximum_segment_size_peer_count": 10
}
Adjust the values to suit your group. For a private server you can leave visibility.public at false and set a game_password on top.
Setting up a public Factorio server
If your server should appear in the official server list, visibility.public has to be true.
A public server needs Factorio.com credentials in server-settings.json. The fields for that are username, password and token.
Use a token instead of your plaintext password wherever possible. If you enter password directly, your Factorio.com password sits in the configuration file in the clear.
An excerpt for a public server can look like this:
{
"visibility": {
"public": true,
"lan": true
},
"username": "YOUR_FACTORIO_USERNAME",
"password": "",
"token": "YOUR_TOKEN"
}
require_user_verification = true additionally makes sure only clients with a valid Factorio.com account are admitted.
auto_pause: does the factory keep running without players?
The default value of auto_pause is true.
That means: as soon as nobody is connected to the server, the simulation pauses automatically. The factory does not simply keep producing indefinitely.
If your factory should keep running without connected players, set the value to false deliberately:
{
"auto_pause": false
}
auto_pause = false is the deciding setting. There is no extra launch switch needed for it.Adjusting the map (map-gen-settings.json and map-settings.json)
Alongside the server configuration there are two files for creating a new map. Example versions also live in the data/ subfolder.
| File | Purpose |
|---|---|
map-gen-settings.json | map generator, including size, frequency and size of ore patches |
map-settings.json | pollution, biter expansion and evolution |
You pass these settings together with --create.
Example:
./bin/x64/factorio --create ./saves/my-factory.zip --map-gen-settings ./data/map-gen-settings.json --map-settings ./data/map-settings.json
--map-gen-settings and --map-settings take effect while the map is generated with --create. Configure them before you create the new save.
Ports and firewall
Factorio uses port 34197 over UDP for the actual game traffic by default.
| Purpose | Port | Note |
|---|---|---|
| Factorio game server | 34197/UDP | default port, changeable with --port |
| RCON | choose your own | separate port via --rcon-port, no fixed default number |
Factorio uses UDP only for game traffic. The game brings its own reliable delivery mechanism on top of UDP. You do not need to open an additional TCP game port.
Linux with UFW
For the default game port, UFW needs just this:
sudo ufw allow 34197/udp
If you change the Factorio port with --port, open the UDP port you actually use instead.
Windows firewall
Create an inbound rule for UDP port 34197 in the Windows firewall. If you use a different port via --port, the rule has to point at that UDP port.
Port forwarding on the router
If the server runs behind a router, forward 34197/UDP to the internal IP address of the Factorio server.
Make sure the router does not rewrite source port 34197. Symmetric NAT or port randomisation can leave the server unreachable despite a seemingly correct port forwarding rule.
With DS-Lite or CGNAT, classic incoming IPv4 port forwarding can fail as well, because the line has no directly reachable public IPv4.
Treating RCON separately
RCON uses a separate port that you set yourself via --rcon-port. There is no default RCON port number you should adopt blindly.
If you enable RCON, also set a password with --rcon-password and account for your chosen RCON port separately in your firewall and network rules.
Connecting to the server
If the server is listed publicly, players can find it through the Factorio server browser.
A direct connection via IP address and port also works:
SERVER-IP:34197
If you changed the default port with --port, use the port you set instead.
If a game_password is set in server-settings.json, players have to enter it when joining.
With require_user_verification = true, only clients with a valid Factorio.com account are admitted.
Admins, whitelist and banlist
Factorio uses simple JSON files for admins, the whitelist and the banlist.
| File | Purpose |
|---|---|
server-adminlist.json | users with admin rights |
server-whitelist.json | users allowed in by the whitelist |
server-banlist.json | banned users |
The content is a plain JSON list of Factorio usernames:
["player1", "player2"]
You can point at the files explicitly with the matching launch parameters:
./bin/x64/factorio --start-server-load-latest \
--server-settings ./data/server-settings.json \
--server-adminlist ./server-adminlist.json \
--server-whitelist ./server-whitelist.json \
--server-banlist ./server-banlist.json
The admin list is also written automatically when you promote players to admin through a console command.
With the default value
{
"allow_commands": "admins-only"
}
only admins may use console commands.
Installing mods
Factorio server mods belong in the mods/ folder. Which mods are active is controlled through mod-list.json.
The most important point in multiplayer is version parity: everyone involved needs exactly the same Factorio version and exactly the same mods.
At startup, Factorio calculates checksums of the mod files. That prevents locally modified mod files from quietly leading to diverging game states and desyncs.
For a stable modded server, work through this:
- Place the mods you need in the server's
mods/folder. - Make sure the mods you want are enabled in
mod-list.json. - Keep the server and the clients on exactly the same Factorio version.
- Use exactly the same mods on all sides.
Space Age on the server
Space Age is technically an official mod. The DLC content therefore appears in mod-list.json like any other mod and can be enabled or disabled there individually.
The Linux headless package already contains the Space Age content. You do not need to install a separate server package for the DLC files.
Once Space Age content is active on the server, however, every connecting player has to own the DLC. On joining, the client checks ownership and enables the expansion automatically to match the server.
Autosaves and backups
Factorio ships with several settings for automatic saves.
| Setting | Default | Effect |
|---|---|---|
autosave_interval | 10 | gap between autosaves in minutes |
autosave_slots | 5 | number of rotating autosave slots |
autosave_only_on_server | true | write autosaves on the server only |
non_blocking_saving | false | experimental fork-based saving without halting the server |
With the defaults, the server creates an autosave every ten minutes and keeps five rotating autosave slots.
For real backups, do not rely on the rotating autosaves alone. Back up the entire saves/ folder to a separate location as well.
saves/ folder with the server stopped. That gives you a consistent state, without the server writing to the save while you copy it.Updating the server
The server and the clients have to run the same Factorio version. When you update the server, make sure your players connect with the matching version too.
Before an update:
- Stop the Factorio server.
- Back up the
saves/folder. - Update the server files.
- On a modded server, check the mods in use as well.
- Start the server again and confirm that clients and server are on the same version.
At the time of writing, the current stable version is 2.0.77.
On a modded server it is not enough to bring Factorio itself up to date. The mods have to match exactly on the server and the clients too.
Troubleshooting
| Problem | Typical cause | Fix |
|---|---|---|
| Server does not start | no save specified or present | create a save with --create first, or load an existing one via --start-server or --start-server-load-latest |
| Server unreachable from outside | 34197/UDP not opened | open UDP port 34197 in the firewall and, if applicable, the router |
| Port appears open but the connection still fails | only TCP opened instead of UDP | check that the rule is UDP; Factorio does not use a TCP game port |
| Connection behind the router fails despite forwarding | router rewrites source port 34197 | check for symmetric NAT or port randomisation and make sure the source port stays intact |
| Server does not appear in the public list | visibility.public disabled or Factorio.com credentials missing | set visibility.public to true and enter your Factorio.com username plus, preferably, a token |
| Players are rejected | require_user_verification or game_password blocks the join | check account verification and the server password you set |
| Factory stops as soon as everyone logs off | auto_pause is set to true | set auto_pause to false for a factory that keeps running |
| Desyncs or failed joins | differing Factorio version or different mods | align the game version and mods exactly across the server and all clients |
| Players without the DLC cannot get on the server | Space Age content is active as mods | every connecting player needs the Space Age DLC while that content is enabled |
| Server stutters despite few players | a large factory loads the dominant simulation thread | prioritise high single-core performance; factory size matters more than raw player count |
| Server configuration is not loaded | JSON syntax error in server-settings.json | check the commas, quotes and brackets of the JSON file |
| Port forwarding is not possible on the line | DS-Lite or CGNAT | check whether a directly reachable public IPv4 for incoming connections exists |
| Your own external server IP does not work from the home network | the router does not support NAT loopback | use the internal server address for tests from the same LAN and check external reachability separately |
Frequently asked questions
Do I need to own Factorio to run a server?
On Linux, the official headless package needs neither a login nor ownership of the game. It can be downloaded free of charge from factorio.com/download. For Windows there is no separate headless package; there you use the regular game package in server mode.
Is there a Factorio headless server for Windows?
No, the Factorio headless package is available for Linux only. On Windows you start the regular game package with factorio.exe --start-server or one of the other intended server variants.
Which port does a Factorio server need?
The default game port is 34197/UDP. Factorio uses UDP only for game traffic, so there is no TCP game port to open. The port can be changed with --port.
How much RAM and what CPU does a Factorio server need?
For small groups, 2–4 GB of RAM and two fast cores are a sensible starting point as planning values; larger factories can need 8–16 GB or more. What matters most is high single-core performance, because the simulation is bound to a single thread at its core.
Why does my factory keep running when nobody is online — or not?
That is decided by auto_pause in server-settings.json. With the default value true, the server pauses as soon as nobody is connected. If the factory should keep running permanently, set auto_pause to false.
How do I install mods on a Factorio server?
Place mods in the mods/ folder and control which ones are active through mod-list.json. The server and all clients have to use exactly the same Factorio version and exactly the same mods.
Do all players need the Space Age DLC?
Yes, as soon as Space Age content is active on the server, every connecting player has to own the DLC. Space Age appears technically as an official mod in mod-list.json, and the Linux headless package already contains the content.
Related articles
If you want to run other game servers alongside Factorio, these guides cover the ground:
- How to create a Satisfactory server
- How to create a Valheim server
- How to create a Terraria server
- How to create a Project Zomboid server
- How to create an Enshrouded server
Summary
Running your own Factorio dedicated server works on both Linux and Windows, but the installation path differs. Linux uses the free headless package without graphics and audio. On Windows you use the regular game package and start factorio.exe in server mode.
The most important step comes right after installation: create a save with --create first. Without one, the server will not start. After that you handle the name, visibility, access, autosaves and auto_pause through server-settings.json, open 34197/UDP and start the save you want.
On modded servers, the Factorio version and the mods have to match exactly across all systems. With Space Age, every player needs the DLC as soon as that content is enabled on the server. For large factories, high single-core performance is what counts.
If you would rather not manage the operating system, router, firewall and autostart yourself, you can rent a Factorio server instead.