Menu
 

Factorio Port 34197 (UDP): Default Server Port + Forwarding Guide 2026

Port Configuration for Factorio

Proper port configuration is essential for players to connect to your Factorio server. This guide covers the network requirements and how to open your server to the world. For the full install and launch walkthrough, see our how to host a Factorio dedicated server guide.

Default Port

Factorio uses UDP 34197 by default. Unlike many other games, Factorio does not use TCP for game traffic.

Protocol

Ensure you select UDP when creating rules. Opening TCP 34197 will not allow players to join.

Scalability

If running multiple servers on one IP, increment the port for each instance (e.g., 34198, 34199).

Changing the Server Port

The port is a launch argument, not a field in server-settings.json. Pass --port when you start the server:

./bin/x64/factorio --start-server saves/my-world.zip \
  --server-settings server-settings.json \
  --port 34567

A "port" line added to server-settings.json is ignored in silence. The file has no such field, the reader skips keys it does not recognise, and the server carries on binding 34197 without a warning in the log. That is worth knowing because it looks like it worked: you edit the file, restart, see no error, and players still cannot reach you on the port you chose.

On a Supercraft server the port is set for you and shown in the panel, so there is nothing to edit. If you are self-hosting, remember to update your firewall and router rules to match whatever you pass to --port.

Every network option the headless binary accepts

Run factorio --help and the option parser prints its own registry. It groups the arguments, and the group called Server holds exactly thirteen. These are all of them on 2.0.77, with the parser's own descriptions and the exact shape of each operand:

ArgumentTakesWhat the parser says it does
--portNnetwork port to use
--bindADDRESS[:PORT]IP address (and optionally port) to bind to
--rcon-portNPort to use for RCON
--rcon-bindADDRESS:PORTIP address and port to use for RCON
--rcon-passwordPASSWORDPassword for RCON
--server-settingsFILEPath to file with server settings
--server-adminlistFILEPath to file with server adminlist.
--server-banlistFILEPath to file with server banlist.
--server-whitelistFILEPath to file with server whitelist.
--use-server-whitelistnothingIf the whitelist should be used.
--use-authserver-bansnothingVerify that connecting players are not banned from multiplayer and inform Factorio.com about ban/unban commands.
--server-idFILEPath where server ID will be stored or read from
--console-logFILEPath to file where a copy of the server's log will be stored

Three of those are easy to miss and solve real problems. --bind takes an address and optionally a port, so on a box with several addresses you can pin the listener to one NIC instead of every interface, and you can set the port there instead of with --port. --rcon-bind is the one to reach for if you run RCON at all: bind it to 127.0.0.1 and reach it over an SSH tunnel rather than exposing a remote-console port to the internet. And --use-server-whitelist is separate from --server-whitelist, so pointing at a whitelist file does not by itself switch whitelisting on.

The whole registry is 62 arguments in three groups, General, Running and Server. If you pass one the parser does not know, the server does not start with a warning, it exits: it prints that the option does not exist and stops. That is the opposite of how the settings file behaves, which is exactly the trap described above.

The network settings that are in the file

The port is not a settings-file key, but several genuinely useful network knobs are, and they come with the shipped example's own defaults and comments:

KeyDefaultWhat the file says about it
max_heartbeats_per_second60Network tick rate. Maximum rate game updates packets are sent at before bundling them together. Minimum value is 6, maximum value is 240.
minimum_latency_in_ticks0One tick is 16ms in default speed. 0 means no minimum.
max_upload_in_kilobytes_per_second00 means unlimited.
max_upload_slots50 means unlimited.
minimum_segment_size25Paired with minimum_segment_size_peer_count, default 20.
maximum_segment_size100Paired with maximum_segment_size_peer_count, default 10.

Those last two are the least documented things in the file. The shipped example carries all four keys and those four numbers and no explanation of any of them, so treat the pairing as what it plainly is, a size floor and ceiling each tied to a peer count, and treat any account of the exact mechanism, including ours, as guidance rather than a measured fact. What is measured is that the four keys exist and ship with those values. The example file is Wube's own template, so a key in it is real; a key missing from it is only undocumented, never proven absent, which is the same asymmetry that makes "port" in that file fail silently.

max_upload_slots at 5 is the one that surprises people running a busy public server: it caps how many clients can be downloading the map from you at once, and six people joining after a restart queue behind it.

Firewall Configuration

Linux (UFW)

For most Linux distributions like Ubuntu or Debian:

sudo ufw allow 34197/udp
sudo ufw reload

Linux (firewalld)

For CentOS or RHEL-based systems:

sudo firewall-cmd --permanent --add-port=34197/udp
sudo firewall-cmd --reload

Windows Firewall

  1. Search for "Windows Defender Firewall with Advanced Security".
  2. Select Inbound Rules -> New Rule.
  3. Select Port -> UDP -> Specific local ports: 34197.
  4. Select Allow the connection and ensure all profiles (Domain, Private, Public) are checked.

Router Port Forwarding

If hosting from home, you must forward the port from your router to your server's local IP:

  1. Access your router's admin panel (usually 192.168.1.1).
  2. Find the Port Forwarding or NAT section.
  3. Map External Port 34197 to Internal Port 34197.
  4. Set Protocol to UDP.
  5. Enter your server's internal/static IP address.

Troubleshooting

  • Couldn't establish network communication: Usually means the UDP port is blocked by a firewall or not forwarded.
  • Port already in use: Another process (or a previous instance of Factorio) is using 34197. Check for zombie processes.
  • ISP Restrictions: Some ISPs block common game ports. If 34197 fails, try a high-numbered port like 54197.

One thing port forwarding does not fix: a server that connects fine over direct IP but never appears in the public browser. That is a server-settings.json setting, not a network problem - visibility.public is on but the username and token are missing. The free Factorio Server Settings Generator catches exactly that mismatch while building a complete settings file, so you can rule the config out before hunting for a firewall issue that isn't there.

Security Tip: Only open the specific UDP ports required for your game. Avoid using "DMZ" mode on your router as it exposes your entire machine to the internet.

Bridge the connection. View plans.

Tired of fighting this issue every patch?

Run a managed Factorio server with us. We handle the patches, mod-version pinning, save backups, and DDoS protection. Set up in minutes, multiple datacenter regions, no contract.

See Factorio hosting plans →
Top