How to Make a Factorio Server (Headless, 2026 Guide)

Set up a Factorio dedicated server step by step. The headless download, server-settings.json, --start-server, port 34197 UDP and mods.

Updated Sep 30, 2026 · 6 min read

On this page

A Factorio dedicated server keeps your factory running so friends can join and build whenever they like, without the host keeping the game open. Wube Software makes an official headless server for exactly this, and this guide walks through setting it up from the download to your first friend connecting. At the end there is a quicker option if you would rather skip the setup.

Short on time? A hosted Factorio server is online in about 60 seconds from $4.99 a month, with nothing to download and no ports to open. Our quick start guide shows how.

What you need

  • A PC or server that stays on while people play. If you do not want a machine humming in your room all night, a small hosted server is the usual alternative. The headless build is for Linux. On Windows you can run the normal game install with the same server flags.
  • 2 GB of free RAM for a small vanilla map, 4 GB for Space Age or a growing base, and 8 GB for megabases or large overhaul mods.
  • A fast CPU core. Factorio is deterministic, so every player simulates the whole map, but the server still has to keep up.
  • The same Factorio version as your players.
  • Access to your router settings, so friends outside your home can connect.

Step 1: Download the headless server

The headless server is the game without graphics and sound, which keeps it small. Download it from the Factorio download page, under the headless section, or straight from a Linux terminal:

wget -O factorio-headless.tar.xz https://www.factorio.com/get-download/stable/headless/linux64
tar -xJf factorio-headless.tar.xz
cd factorio

This creates a factorio folder with the server binary at bin/x64/factorio. Repeat the download after every Factorio update, because players cannot join a server on a different version (see Factorio version mismatch fix). You do not need a Factorio login to download or run the headless build.

On Windows, use your normal Factorio install instead. The executable is bin\x64\factorio.exe inside the game folder, and every command below works the same way.

Step 2: Create a save

A Factorio server always runs a save file. Create a fresh map:

./bin/x64/factorio --create ./saves/my-save.zip

Already have a single player factory you want to continue? Copy its zip from your Factorio saves folder into the server's saves folder and use that name instead. Mods from that game have to be installed on the server too, see Step 6.

Step 3: Configure server-settings.json

The server reads its settings from a JSON file. Copy the example that ships with the server:

cp ./data/server-settings.example.json ./data/server-settings.json

Open server-settings.json in a text editor. The settings most people change:

  • name: the name shown in the server browser.
  • description: a short line about your server.
  • visibility: set public to true to list it in the in game browser, or false to keep it private. lan controls listing on your local network.
  • username and token: your factorio.com username and token, only needed if the server is public. Find the token on your profile at factorio.com.
  • game_password: set one so only your friends can get in.
  • require_user_verification: leave on true so players must log in with a real Factorio account.
  • max_players: 0 means no limit.
  • autosave_interval and autosave_slots: how often it saves, in minutes, and how many autosaves it keeps.
  • auto_pause: pauses the game when nobody is online, which most private servers want.

Keep the JSON valid. A missing comma or quote stops the server from starting, and the error in the console points to the line.

Step 4: Start the server

Launch it with your save and settings:

./bin/x64/factorio --start-server ./saves/my-save.zip --server-settings ./data/server-settings.json

To always load the newest save, including autosaves, use --start-server-load-latest instead of --start-server and a file name. When the console shows the server is hosting the game, it is ready.

Stop the server with Ctrl+C. It saves before it shuts down. On Linux you will want to run it inside screen, tmux or a systemd service so it keeps running after you close the terminal.

To give yourself admin rights, type /promote YourName in the server console, or list admin names in a server-adminlist.json file.

Step 5: Open port 34197 UDP

Factorio uses UDP port 34197 by default and nothing else. TCP is not needed.

  1. Allow UDP 34197 through the firewall on the server machine. On Ubuntu that is sudo ufw allow 34197/udp.
  2. Log into your router and forward UDP 34197 to the server's local IP address.
  3. If friends still cannot connect, check that your router is not randomising source ports on UDP, which Factorio's wiki lists as a known cause of failed connections.

Need to run a second server? Add --port 34198 to the launch command and forward that port as well. Our port forwarding guide covers the router side in more detail. If your ISP uses CGNAT or your router randomises UDP ports, a hosted server with its own public address avoids the problem altogether.

Step 6: Add mods

Mods live in the mods folder next to the server binary. Download mod zip files from the Factorio mod portal, drop them into mods, and restart the server. The file mods/mod-list.json controls which mods are enabled, and it is also where the expansion mods (space-age, quality and elevated-rails) are switched on or off.

Players do not have to match the mod list by hand. When they join a modded server, Factorio offers to sync their mods and downloads the exact versions the server runs from the mod portal. This only works for mods published on the portal, so keep private or edited mods off public servers. Everyone joining a Space Age map needs to own Space Age.

How friends connect

Send friends your public IP address, which you can find by searching "what is my IP". Then they:

  1. Open Factorio on the same version as the server.
  2. Click Play, then Multiplayer, then Connect to address.
  3. Enter your IP and port, for example 203.0.113.10:34197, and connect.
  4. Enter the game password if you set one.

If you made the server public, they can also find it by name in the Browse public games list.

Common problems

  • Timed out while connecting: UDP 34197 is not forwarded, the firewall is blocking it, or the router is changing the source port. Test from outside your network, some routers cannot loop back to your own public IP. More in Factorio can't connect to server.
  • Version mismatch: the player and server run different Factorio versions. Update both, or pin the server to the version your group uses.
  • Mod mismatch: a mod on the server is missing from the portal or has a different version. Let the game sync mods, and update the server's mods after a big release.
  • Server does not start after editing settings: the JSON is broken. Check commas and quotes around the line the error mentions.
  • Late game slowdown: this is usually UPS, the game simulation itself, not the network. Every player runs the full map, so a slow client can hold everyone back.
  • Public server rejected: username and token are missing or wrong in server-settings.json.

For more on sizing memory, read how much RAM a game server needs.

The easy way

Running the headless server yourself is a good project, but it comes with chores: a machine that stays on so the night shift can keep building, JSON edited by hand, UDP 34197 forwarded on your router, your home IP shared with every player, and a fresh download every time Wube ships a patch.

A GamezServers Factorio server takes care of the hosting. Pick a plan from 2 GB at $4.99 a month, pay, and your factory is live in about 60 seconds with its own address, server-settings.json and mod-list.json editable in the browser, save uploads over SFTP and one click backups. Split the cost with up to 9 friends, and new customers get 50% off the first month. See the Factorio quick start guide for the steps.

Skip the setup. Your Factorio server, live in 60 seconds.

Plans first month from $2.49. No command line, cancel any time.

Deploy Factorio

Keep reading