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.
| Use | Protocol | Port | What to do |
|---|---|---|---|
| Factorio game traffic | UDP | 34197 | Forward and allow this port |
| Custom game port | UDP | Your --port value | Use the same number everywhere |
| RCON (optional) | TCP | Your configured RCON port | Keep separate from game traffic |
Start Factorio before judging the rule
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.
| Path | Best fit | Concrete value | Address friends use |
|---|---|---|---|
| Home port forwarding | A short session on a connection with public IPv4 | No hosting bill; keep the current save and machine | Home public IP:34197 |
| VPS dedicated server | A world that should stay online for the group | Stable public IP, automatic restarts, backups, and no home-router dependency | VPS public IP:34197 |
| Port-forwarding VPN | Occasional hosting behind CGNAT or a locked router | A reachable inbound port while the save remains on the current PC | VPN 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.
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.
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.
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.
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.
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.
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.50Windows firewall
Run in an elevated PowerShell.
New-NetFirewallRule -DisplayName "Factorio UDP 34197" -Direction Inbound -Protocol UDP -LocalPort 34197 -Action AllowUbuntu firewall
Allow only the game transport.
sudo ufw allow 34197/udpFactorio 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.
Direct IP is the clean first test
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.
| World | Starting CPU | Starting memory | Planning note |
|---|---|---|---|
| Small vanilla group | 2 fast vCPUs | 2 GB RAM | Good starting point for a new or modest factory |
| Space Age or a moderate mod list | 2–4 fast vCPUs | 4 GB RAM | Extra headroom for saves, mods, and simultaneous players |
| Large late-game or heavily modded map | 4 fast vCPUs | 8 GB RAM | Monitor update time, CPU saturation, memory, and save duration |
Minimal launch path
Bring a save, allow UDP 34197, and run the process persistently.
- Deploy Ubuntu or Debian in a region near the group.
- Download the official Linux headless package and extract it under a dedicated service user.
- Upload an existing save or create one with
--create. - Allow UDP 34197 in both the provider firewall and UFW.
- 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 34197Keep 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.
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
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.
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
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
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