Factorio Dedicated Server: Headless Setup, Requirements, Ports and Settings (2.1 and Space Age)

A Factorio dedicated server is the game running headless, with no graphics and no character of its own, hosting one map that your group can join at any hour. To run a dedicated server for Factorio you need the free headless build from factorio.com (Linux x64 or arm64; on Windows the regular game does the job), 4–8 GB of RAM for most maps, a save file to load, a server-settings.json and UDP port 34197 open. The current stable release is 2.1.23 and the headless download already includes Space Age. Below: setup on Linux, Windows and Docker, every setting worth changing, admins, mods, updates and the errors people actually hit.

Dedicated server vs. hosting from the game

Factorio can host multiplayer straight from the main menu, and that is fine for one evening. A dedicated (headless) server is the better fit when the map should stay up while the host is offline, when more than a handful of people play, or when your group plays at different times. It also gives you the full config files instead of the in-game dialog.

Host from the game Dedicated / headless server
Host must be playing Yes: the game ends when they quit No: the map runs on its own
Server has a character Yes, the host’s No
When nobody is online Nothing runs Pauses by default; auto_pause can keep it running
Visibility Public, Steam or LAN, set when hosting visibility in server-settings.json
Saves On the host’s PC Autosaves on the server, plus a save on exit

Every player still needs exactly the same game version and mods as the server. That rule causes most join problems, so it comes up again below.

Factorio server requirements: how much RAM, CPU and network

A Factorio server needs 4–8 GB of RAM for most maps, a CPU with strong single-core speed, a 64-bit Linux system (or Windows with the full game) and a stable upload. RAM grows with the size of the factory, not with player count: the whole map is simulated every tick, so a megabase with tens of thousands of entities can outgrow 8 GB. Players barely move the needle.

Your map RAM to start with
New map, a few friends 4 GB
Mid-game: trains, oil, a handful of mods 6 GB
Space Age across several planets, or a large mod pack 8 GB
Megabase 8 GB and up, watch the usage
  • CPU: Factorio aims for 60 updates per second (UPS), which gives it 16.667 ms per tick. Single-thread speed decides how big the factory can get before the game slows down, so a fast core beats many slow ones.
  • OS: the headless build is for Linux x64 and Linux arm64. It needs glibc 2.31 or newer, so very old distros such as CentOS 7 won’t run it. Any current Ubuntu or Debian is fine.
  • Network: Factorio uses UDP only. Each joining player downloads the whole map from the server, so upload speed sets how fast big maps load for newcomers.
  • Disk: small. A save is one .zip, and the server keeps 5 rotating autosaves by default.

Raspberry Pi and other ARM boards: Wube ships an official headless build for Linux arm64, so a Pi on a 64-bit OS can run it. Keep expectations modest for big maps; the popular factoriotools Docker image calls its own ARM support experimental and warns about lag on a Raspberry Pi.

How to set up a Factorio headless server on Linux (Ubuntu or Debian)

On Linux, setup is a download, an extract and two commands: create a map, then start the server with your settings file. You don’t need Steam or SteamCMD, because the headless build is a direct download that always points at the latest stable version. The paths in this tutorial match the official wiki’s: everything lives in /opt/factorio and runs as its own user, never root.

  1. Create a user for the server and download the headless build:
    sudo useradd -m factorio
    wget -O /tmp/factorio-headless.tar.xz https://factorio.com/get-download/stable/headless/linux64

    On a Raspberry Pi or other arm64 machine, take the Linux (arm64) headless file from the factorio.com download page instead.

  2. Extract it to /opt (the archive contains a factorio folder) and hand it to that user:
    sudo tar -xJf /tmp/factorio-headless.tar.xz -C /opt
    sudo chown -R factorio:factorio /opt/factorio
  3. Create a map. The server can’t start without a save, and --create makes one as if you clicked New Game:
    sudo -u factorio /opt/factorio/bin/x64/factorio --create /opt/factorio/saves/my-map.zip

    Already have a world? Copy its .zip into /opt/factorio/saves instead.

  4. Copy the example settings file and edit the copy (the next section covers what to change):
    sudo -u factorio cp /opt/factorio/data/server-settings.example.json /opt/factorio/data/server-settings.json
  5. Open the port and start the server:
    sudo ufw allow 34197/udp
    sudo -u factorio /opt/factorio/bin/x64/factorio --start-server-load-latest --server-settings /opt/factorio/data/server-settings.json

    --start-server-load-latest loads the newest save in saves; use --start-server /opt/factorio/saves/my-map.zip to pick one.

The same steps work on any Linux VPS or cloud instance, AWS included. Only the firewall step changes: open UDP 34197 in the provider’s security rules as well.

Start the server automatically with systemd

To make the server start at boot and come back after a crash, save this as /etc/systemd/system/factorio.service:

[Unit]
Description=Factorio headless server
After=network-online.target
Wants=network-online.target

[Service]
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
KillSignal=SIGINT

[Install]
WantedBy=multi-user.target

Then run sudo systemctl daemon-reload and sudo systemctl enable --now factorio. Stopping the service sends the same signal as Ctrl+C, so the server saves the map before it exits.

Running a Factorio dedicated server on Windows

There is no headless download for Windows, but you don’t need one: any copy of Factorio can run as a dedicated server with --start-server, including the Steam version. You point the game’s own executable at a save and a settings file, usually from a small .bat file, and it runs without opening the game window.

  1. Find the install folder: C:\Program Files (x86)\Steam\steamapps\common\Factorio for Steam, or C:\Program Files\Factorio for the standalone version.
  2. Create a map with .\bin\x64\factorio.exe --create .\saves\my-map.zip, or copy an existing save from %appdata%\Factorio\saves.
  3. Copy data\server-settings.example.json to data\server-settings.json and edit it.
  4. Create start-server.bat in the install folder with the line the wiki recommends:
    start /wait .\bin\x64\factorio.exe --start-server-load-latest --server-settings .\data\server-settings.json
  5. Allow the port through Windows Firewall (run as administrator), then forward UDP 34197 on your router:
    netsh advfirewall firewall add rule name="Factorio server" dir=in action=allow protocol=UDP localport=34197

Factorio server in Docker

The community image factoriotools/factorio is the usual way to run a Factorio server in Docker. It keeps saves, mods and config in one mounted folder, creates a map on first start and loads the newest save after that. It is the quickest route on a home server or NAS that already runs containers.

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=unless-stopped \
  factoriotools/factorio
  • The container runs as user ID 845, which is why the folder is handed to 845:845.
  • After the first start, edit /opt/factorio/config/server-settings.json and restart with docker restart factorio.
  • The first map is called _autosave1.zip and uses map-gen-settings.json and map-settings.json from the same config folder.
  • Port 27015/tcp is RCON, the image’s choice. Leave that -p line out if you don’t want RCON reachable from outside; docker exec factorio rcon /players still works locally.
  • Set -e DLC_SPACE_AGE=false for a vanilla server (more on Space Age below). The same options work in a docker compose file.

Configure server-settings.json

server-settings.json is the main Factorio server config file: name, password, player limit, visibility, autosaves and pausing all live there. Its location is up to you, because the server reads whatever path you pass with --server-settings. The headless download ships an example at data/server-settings.example.json. Copy it and edit the copy, so updates never overwrite your settings.

A typical private server for friends looks like this (keys you don’t list keep their defaults):

{
  "name": "Belts and Biters",
  "description": "Friends only. Main bus is sacred.",
  "visibility": { "public": false, "lan": false },
  "game_password": "pick-something",
  "max_players": 0,
  "require_user_verification": true,
  "allow_commands": "admins-only",
  "autosave_interval": 10,
  "autosave_slots": 5,
  "auto_pause": true,
  "only_admins_can_pause_the_game": true
}
Setting Default What to know
visibility.public true Lists the game in the public server browser. Needs username plus token (your factorio.com profile token; safer than putting your password in the file).
visibility.lan true Shows the game under Play on LAN.
game_password empty Factorio server password. Empty means anyone with the address can join.
max_players 0 0 means no limit. Admins can join even when it is full.
auto_pause true Pauses the dedicated server when no players are connected. Set false to keep production running, and remember biters evolve with time too.
autosave_interval / autosave_slots 10 / 5 Minutes between autosaves and how many rotate.
allow_commands admins-only true, false or admins-only. Lua commands disable achievements on that save.
afk_autokick_interval 0 Minutes before idle players are kicked; 0 is never.
max_upload_in_kilobytes_per_second 0 Caps upload bandwidth; 0 is unlimited. Useful on a home connection.
non_blocking_saving false Lets a Linux server save in the background. Wube labels it highly experimental and warns about lost saves.

Admins can change several of these while the game runs with /config set, for example /config set max-players 12.

Map settings for a new map

Ore richness, biters, cliffs and water belong to the map, not the server. Set them once, when the map is created, with two more JSON files (examples ship next to the server settings example):

./bin/x64/factorio --create saves/rail-world.zip --map-gen-settings map-gen-settings.json --map-settings map-settings.json

Add --map-gen-seed 123 to fix the seed, use --preset rail-world (or death-world, rich-resources, marathon) for a built-in preset, or --exchange-string to copy a map someone shared. Editing these files later does nothing to a map that already exists.

Space Age on a dedicated server: with or without it

The headless server includes Space Age content, and Space Age runs as a set of built-in mods: space-age, quality, elevated-rails and, since 2.1, recycler. Which ones load is decided by mods/mod-list.json when the server starts. Choose before you create the map, because a Space Age save needs the expansion to load and every player needs it to join.

For a vanilla server without Space Age, set them to false in mods/mod-list.json before running --create:

{
  "mods": [
    { "name": "base", "enabled": true },
    { "name": "elevated-rails", "enabled": false },
    { "name": "quality", "enabled": false },
    { "name": "recycler", "enabled": false },
    { "name": "space-age", "enabled": false }
  ]
}
  • Since 2.1, Quality is optional: Space Age can stay on with quality off.
  • Elevated Rails can run on its own in a vanilla game, which some groups like for rail-heavy maps.
  • In the factoriotools Docker image, use DLC_SPACE_AGE=false instead: its startup script edits mod-list.json for you, and a hand edit can get overwritten.

Factorio server port and port forwarding

The Factorio server port is 34197, UDP only. That single port is all players need. On your router, point UDP 34197 at the server machine, then let the same port through that machine’s firewall. Change it with --port on the command line or in config.ini. RCON, if you turn it on, uses a separate TCP port that you pick.

Port Protocol Used for
34197 UDP Game traffic (default; change with --port)
your choice TCP RCON, only with --rcon-port and --rcon-password (the Docker image uses 27015)
  • Some routers randomize the source port of outgoing UDP packets. The wiki flags this as a cause of failed connections; turn on static port mapping for 34197 if your router does it.
  • Several servers on one IP? Since 1.1.67 Factorio follows DNS SRV records (_factorio._udp), so each server can have its own subdomain instead of a port number.
  • Can’t forward ports at all? Everyone needs to reach the server directly. A virtual LAN tool such as Hamachi works around that, or use Factorio server hosting, where the server already has a public address.

How to join a Factorio dedicated server

To connect to a Factorio server, open Multiplayer and choose Connect to address, then enter the server’s IP, adding :port if it isn’t 34197. Public servers also appear under Browse public games, and servers on your network under Browse LAN games. If the server runs mods, the game offers to sync them before you join.

  1. Players outside your home use your public IP, for example 203.0.113.25 or 203.0.113.25:34198.
  2. Anyone at home with you connects to the server’s LAN address instead.
  3. Enter the game_password when asked.

Admins, the whitelist and Factorio server commands

Admins on a Factorio dedicated server come from server-adminlist.json. The easiest way to add the first admin is to type /promote YourName in the server console (the terminal running the server), which creates that file for you. After that, admins can promote others in game, kick, ban, whitelist and save with the commands below.

The admin list is a plain JSON array of player names, kept next to the server log (factorio-current.log), or wherever --server-adminlist points:

[ "YourName", "FriendName" ]

The whitelist works the same way: /whitelist add Name in game, or a server-whitelist.json loaded with --use-server-whitelist=true --server-whitelist server-whitelist.json. Only listed players can join, and an empty whitelist lets everyone in.

Command What it does
/promote <player> / /demote <player> Adds or removes an admin
/admins Admin list
/players online Who is online right now (/players count for just the number)
/kick <player> <reason> Kicks a player
/ban <player> <reason> / /unban <player> Bans or unbans; /bans lists bans
/whitelist add|remove|get|clear Manages the whitelist
/server-save Saves the map on the server immediately (the Factorio server save command)
/config set <option> <value> Changes password, max-players, autosave-interval, afk-auto-kick and more while running
/mute <player> / /unmute Silences a player in chat

RCON: add --rcon-port 27015 --rcon-password something-long to the start command and any RCON client can send these commands remotely. Don’t expose the RCON port to the internet unless you need to.

Mods on a Factorio dedicated server

Server mods go in the mods folder as the .zip files the mod portal gives you, not unzipped. mod-list.json in the same folder decides which ones are enabled. Players don’t install anything by hand: when they join, Factorio offers to sync and downloads the exact mod versions the server runs, startup settings included.

  1. Stop the server and back up saves.
  2. Copy the mod .zip files (and their required dependencies) into mods.
  3. Startup mod settings live in mods/mod-settings.dat. The easy way to get one is to set the mods up in your own game and copy that file over; startup settings must be identical for everyone.
  4. Start the server and read the log. A mod that doesn’t match the game version stops the server at boot, and the log names it.

To match a server’s mods to an existing save automatically, start it once with --sync-mods saves/my-map.zip. On a headless server that needs service-username and service-token (your factorio.com login and token) in player-data.json for any mod it has to download. Map-wide mod settings can be changed in game later, but only by admins.

How to update a Factorio headless server

To update a Factorio headless server, stop it, back up the saves folder, download the new headless archive and extract it over the old one. The archive only contains bin, data and config-path.cfg, so your saves, mods and config are left alone. Then update your mods for the new version and start the server again.

sudo systemctl stop factorio
sudo cp -r /opt/factorio/saves /opt/factorio-saves-backup
wget -O /tmp/factorio-headless.tar.xz https://factorio.com/get-download/stable/headless/linux64
sudo tar -xJf /tmp/factorio-headless.tar.xz -C /opt
sudo chown -R factorio:factorio /opt/factorio
sudo systemctl start factorio

Players and server must run exactly the same Factorio version. New 2.x releases go to the experimental branch first; the stable link above always gives you the current stable version. On Docker, docker pull factoriotools/factorio and recreate the container; the stable tag follows the stable branch.

Factorio Server Manager and other tools

Factorio Server Manager is a community tool with a web interface for starting and stopping the server, uploading saves, managing mods and reading logs. It began as majormjr’s factorio-server-manager on GitHub and now lives at OpenFactorioServerManager. It runs next to your Factorio install and serves its web interface on port 80 by default; change it with --port.

  • Factorio Server Manager password: on first start it creates the user admin with a random password and prints both in its log. Old versions shipped with the password factorio; current ones replace it automatically. Change the password after you log in.
  • Linux and Windows builds are on the GitHub releases page, and a Docker image is published as ofsm/ofsm.
  • The newest tagged release is 0.10.1 from March 2021, so test it against your Factorio version before relying on it.

Common Factorio server problems and fixes

Problem Most likely cause Fix
“Could not establish network communication with server” UDP 34197 isn’t reaching the server: not forwarded, blocked by a firewall or antivirus, or the router rewrites the source port Forward and allow UDP 34197, test from outside your network, try another connection; some ISPs filter bursts of UDP while the map transfers
Couldn’t connect to the server at all Wrong address or port, or the server isn’t running Check the log for the port it bound to and join with IP:port
Server not showing up in the public list visibility.public without username and token Add the credentials, or join by address
Server won’t start after an update A mod built for the old version The log names the mod; update or remove it
Server not loading mods Mod disabled in mod-list.json, a missing dependency, or the zip was extracted Keep mods zipped, enable them, add dependencies
“Server not responding” or freezes for a few seconds An autosave: saving pauses the game for everyone, and big maps take longer Raise autosave_interval, or give the server faster storage
Lag: the whole game runs in slow motion The server can’t hold 60 UPS for the size of the factory Press F5 and turn on show-fps to see UPS; a faster CPU or a leaner build fixes it, more RAM doesn’t
Fails with “cannot find/open” the save No save at the path you gave Run --create first or fix the path
Players stuck waiting while joining A big map is downloading to them Normal on megabases; more server upload speeds it up
Map paused when nobody is on auto_pause is true by default Set it to false if production should continue

Lag works differently in Factorio than in most games. Every client simulates the same ticks as the server, so if the server can’t keep up, everyone’s game slows down together. A slow player’s PC, on the other hand, doesn’t slow the server.

Skip the setup: rent a Factorio server

Self-hosting means a machine that stays on, a forwarded UDP port, JSON files and a manual update every time Wube ships a patch. If you’d rather spend that time on the factory, Factorio server hosting on GameTeam is running in minutes: upload your save or start a new map, pay per GB of RAM (from $0.49/GB a week), with no port forwarding and no slot limits. The built-in AI copilot does the fiddly parts. Tell it “password-protect it, cap it at 10 players and keep the factory running when we log off” and it rewrites server-settings.json and restarts; ask “why won’t the server start since the update?” and it reads factorio-current.log and names the mod that broke it.

FAQ

Is a Factorio dedicated server free?

The software is: the headless server is a free download, and the regular game can run as a server too. Running it costs a machine that stays on, or a hosting fee. Every player needs their own copy of Factorio.

How much RAM does a Factorio server need?

4–8 GB for most maps. Start with 4 GB for a new map, plan on 8 GB for Space Age across several planets or a big mod pack, and more only for a true megabase.

Does a Factorio server pause when no players are online?

Yes, by default. Set "auto_pause": false in server-settings.json to keep it running. auto_pause_when_players_connect separately controls whether the game pauses while someone is joining.

How do I add an admin on a Factorio server?

Type /promote PlayerName in the server console, or have an existing admin run it in game. It’s saved to server-adminlist.json, which you can also edit by hand while the server is stopped.

Can I run a Factorio server on a Raspberry Pi?

Yes, with the official Linux arm64 headless build on a 64-bit OS. It suits small maps; for a megabase, a fast x86 CPU will hold 60 UPS much longer.

Do players need Space Age to join my server?

Only if the server has Space Age enabled. Everyone must run the same mods as the server, and Space Age is a set of built-in mods. Turn it off in mod-list.json before creating the map if some players don’t own it.

What port does a Factorio server use?

UDP 34197 by default. There’s no TCP game port; the only TCP port is RCON, and only if you enable it.

Can I host a Factorio server through Steam?

Yes. The Steam version can host from the Multiplayer menu (with Steam visibility, friends join through Steam), or run as a dedicated server with --start-server from its install folder. Linux servers usually use the headless download instead, which needs no Steam account.

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *