Guide
16 min readAug 05, 2026

Factorio Port Forwarding: UDP 34197 & Server Setup

Forward Factorio UDP port 34197, fix a server friends cannot join, and choose a stable VPS or port-forwarding VPN when the home route is the problem.

Quick answer

Factorio uses UDP port 34197 by default. Forward external UDP 34197 to UDP 34197 on the host PC's reserved local IPv4 address, allow the same UDP port through the host firewall, start the game or headless server, and give friends PUBLIC-IP:34197. If CGNAT, two routers, a changing home IP, limited upload, or an offline host keeps breaking that route, a small VPS is the stronger fix: it provides a stable public IPv4 address, an always-on Factorio process, and a join address that no longer depends on the home router or gaming PC. A port-forwarding VPN is the lighter alternative for occasional sessions because it keeps the save on the current PC while supplying a reachable VPN IP and inbound port.

Factorio port forwarding settings

The official Factorio multiplayer documentation identifies UDP 34197 as the default game port. Factorio builds reliable delivery on top of UDP, so a TCP-only rule will not accept game traffic.

UseProtocolPortWhat to do
Factorio game trafficUDP34197Forward and allow this port
Custom game portUDPYour --port valueUse the same number everywhere
RCON (optional)TCPYour configured RCON portKeep separate from game traffic

Home forwarding, a VPS, or a VPN?

Use home forwarding when the session is occasional and the ISP gives the router a public IPv4 address. Put a VPS first for a shared world: it removes the recurring pain of a sleeping host PC, changing residential IP, limited home upload, CGNAT, and router resets. A port-forwarding VPN is the lighter path when you want to keep the save on the current machine while giving friends a reachable VPN address instead of the home IP.

PathBest fitConcrete valueAddress friends use
Home port forwardingA short session on a connection with public IPv4No hosting bill; keep the current save and machineHome public IP:34197
VPS dedicated serverA world that should stay online for the groupStable public IP, automatic restarts, backups, and no home-router dependencyVPS public IP:34197
Port-forwarding VPNOccasional hosting behind CGNAT or a locked routerA reachable inbound port while the save remains on the current PCVPN IP:assigned port

How to port forward Factorio on a home router

Keep the port number, protocol, destination address, and running process aligned. This order isolates the first broken layer without repeatedly changing unrelated settings.

1

Reserve the host PC address

Create a DHCP reservation in the router for the Factorio host, such as 192.168.1.50. This keeps the rule attached to the correct machine after reboots.

2

Allow UDP 34197 through the host firewall

Create an inbound UDP rule for 34197 or allow the Factorio executable. The operating-system firewall and router rule must both allow the same traffic.

3

Create the router rule

Open Port Forwarding, NAT, or Virtual Server settings. Map external UDP 34197 to internal UDP 34197 at the reserved host address.

4

Start Factorio before testing

Host the save or launch the headless process on UDP 34197. A forwarding rule can exist while a test still looks closed if no process is listening.

5

Test from another internet connection

Ask a friend to connect or use a second connection such as mobile data. Testing the public address from the same Wi-Fi can fail on routers without NAT loopback.

6

Share the public join address

Friends choose Multiplayer, Connect to address, and enter PUBLIC-IP:34197. A private 192.168.x.x address works only inside the same LAN.

Router rule

Replace the example host address.

Name: Factorio Server
External port: 34197
Internal port: 34197
Protocol: UDP
Destination: 192.168.1.50

Windows firewall

Run in an elevated PowerShell.

New-NetFirewallRule -DisplayName "Factorio UDP 34197" -Direction Inbound -Protocol UDP -LocalPort 34197 -Action Allow

Ubuntu firewall

Allow only the game transport.

sudo ufw allow 34197/udp

Factorio server not showing or friends cannot join

A public-list problem, a blocked UDP path, a version mismatch, and slow map transfer feel similar to a player. Match the symptom before changing the setup.

Couldn't establish network communication with server

Confirm the server is listening on UDP 34197, then check the host firewall and the router destination address.

Factorio server not showing up

Try direct IP first. If that works, enable public visibility and add the Factorio username or token in server-settings.json.

Unable to connect to a LAN server

Use the private host address on the same LAN, confirm both devices are on the same subnet, and allow Factorio on the active firewall profile.

Friends take ages to download the map

Measure the host upload path, stop competing uploads, and move the save to a region-near VPS when residential upload is the bottleneck.

A modded client crashes or is rejected

Match the Factorio build, Space Age state, mod list, and exact mod versions between every player and the server.

The rule is correct but nobody can reach it

Compare the router WAN IPv4 with the public IPv4. Different addresses usually point to Double NAT or CGNAT.

Run a Factorio dedicated server on a VPS

Factorio publishes a free Linux headless package without graphics or audio. On a VPS, the same save gains a stable public IPv4 address, an independent always-on process, provider-side networking, remote backups, and repeatable restarts. Friends keep one join address even when the owner closes the game or leaves home.

WorldStarting CPUStarting memoryPlanning note
Small vanilla group2 fast vCPUs2 GB RAMGood starting point for a new or modest factory
Space Age or a moderate mod list2–4 fast vCPUs4 GB RAMExtra headroom for saves, mods, and simultaneous players
Large late-game or heavily modded map4 fast vCPUs8 GB RAMMonitor update time, CPU saturation, memory, and save duration

Minimal launch path

Bring a save, allow UDP 34197, and run the process persistently.

  1. Deploy Ubuntu or Debian in a region near the group.
  2. Download the official Linux headless package and extract it under a dedicated service user.
  3. Upload an existing save or create one with --create.
  4. Allow UDP 34197 in both the provider firewall and UFW.
  5. Run the server through systemd, tmux, or Docker with automatic restart.

Headless launch command

Loads the newest save with server-settings.json.

./bin/x64/factorio --start-server-load-latest --server-settings ./data/server-settings.json --port 34197

Keep visibility.public, the Factorio account token, autosave slots, game password, and mod state in version-controlled configuration while storing the token outside public repositories.

Best Factorio server hosting VPS options

Choose Vultr first for broad region choice and a straightforward general-purpose cloud. Choose DMIT when China and Asia-Pacific routing matters more for the group. Both provide the operating-system access needed for Factorio headless, Space Age, mods, save transfers, UFW, systemd, and Docker.

Best default for most groups
New users get $300

Vultr

  • Founded in 2014 with more than 80 million cloud servers launched
  • 33 global cloud data center regions for placing the world near players
  • SOC 2 Type II and ISO/IEC 27001 compliance artifacts
  • Public platform status page and incident history
Best for China and APAC routes

DMIT

  • Self-operated network with up to 7.6 Tbps of aggregate Tier 1 capacity
  • Direct peering with China Telecom, China Unicom, and China Mobile International
  • Current cloud instances advertise AMD EPYC processors and NVMe storage
  • Los Angeles, Hong Kong, and Tokyo locations support regional deployment

Affiliate disclosure: We may earn a commission when you purchase through links on this page, at no extra cost to you.

Use a port-forwarding VPN for an occasional Factorio host

A VPN with an inbound port creates the missing public route without changing the home router and masks the residential public IP from players. Enable the provider\'s forwarded port, run Factorio with --port ASSIGNED_PORT, allow that UDP port in the host firewall, and share VPN-IP:ASSIGNED_PORT. PureVPN can apply a selected port such as 34197; Proton VPN and Private Internet Access display the active port to use for the session.

Best VPN fallback

Proton VPN

  • 100M+ accounts across the Proton privacy ecosystem
  • Open-source VPN apps with public code
  • Five consecutive annual independent no-logs audits
  • 30-day prorated refund terms for eligible paid plans
Best for choosing 34197

PureVPN

  • 3M+ users and 17+ years in cybersecurity
  • Independent always-on no-log assessment model
  • ISO/IEC 27001-certified information security program
  • 31-day refund window for eligible initial purchases
Open-source alternative

Private Internet Access

  • More than a decade in the VPN market
  • Open-source desktop and mobile applications
  • Three independent Deloitte no-logs reviews
  • 30-day refund window for eligible purchases

Affiliate disclosure: We may earn a commission when you purchase through links on this page, at no extra cost to you.

Factorio port forwarding FAQ

These answers cover the port, protocol, join address, public server list, CGNAT, VPN route, and dedicated-server questions that most often block a working multiplayer world.

Official and technical sources

Port, protocol, headless-server, firewall, and CGNAT statements are grounded in publisher, operating-system, and internet-registry documentation.

Default UDP port, headless commands, public-list settings, and connection methods

Current Linux headless package, stable release, and checksums

Authoritative Windows firewall administration guidance

Technical background from the Asia Pacific internet registry

Share this article