iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Prefer not to run the server on your own PC? Godlike.Host offers hosted Factorio servers with free DDoS protection and up to three free backups a day.
Factorio’s default dedicated-server port is UDP 34197. Forward that UDP port from your router to the computer running the server, allow it through the host firewall, and make sure the router preserves the server’s source port. Factorio does not accept player traffic through a TCP-only rule: its network protocol is UDP, with reliability and packet-order handling implemented by the game.
The port can be changed, but the setting must be applied using the method supported by your server build. The Factorio Wiki identifies the configuration file as the control point, while a hosting guide documents the --port launch argument and warns that a port entry in server-settings.json is ignored. Because precedence between those methods is not established here, change the port in one place, start the server, and verify the listening port before testing from outside your network.
What port does a Factorio server use?
A standard Factorio dedicated server listens on UDP 34197. This is the value to use when a server has not been assigned a custom port. The Factorio Wiki Multiplayer page is the authoritative reference for the default and for the forwarding requirements.
Factorio uses UDP only for game traffic. UDP does not provide the delivery guarantees associated with TCP by itself, so Factorio adds its own reliable-delivery layer to cope with lost or out-of-order packets. In practical terms, a router rule for TCP 34197, or a rule that forwards both protocols while accidentally blocking UDP, will not make the game reachable.
#1 Best Overall
- System: Intel Core i5-13400F 2.5GHz 10 Cores | Intel B760 Chipset | 16GB DDR5 | 1TB PCIe 4.0 NVMe SSD | Windows 11 Home
- Graphics: NVIDIA GeForce RTX 5060 8GB Graphics | 1x HDMI | 2x DisplayPort
- Connectivity: 1 x USB-C 3.2 | 2 x USB-A 3.2 | 6 x USB-A 2.0 | 1 x LAN | WiFi 6 | Bluetooth 5.3 | 7.1 Channel Audio
- Tempered Side Case Panel | Custom RGB Lighting | Keyboard and Mouse
- 1 Year Parts & Labor Warranty, Free Lifetime Tech Support
The port number is not permanently fixed. Administrators can select another UDP port when the default conflicts with another service or when several servers share one public address. Every client must then connect using that changed port.
How the connection reaches your server
When a player joins from the internet, the connection first reaches your public IP address and the external UDP port. Your router’s port-forwarding rule translates that traffic to the private address of the server computer. The server’s operating-system firewall then decides whether to pass the packet to the Factorio process.
Free tools Windows power users keep installed
One-click scans. No signup required.
Three separate layers must agree:
- Factorio: the process must be listening on the selected UDP port.
- Router/NAT: the external UDP port must be forwarded to the server’s current local IP address.
- Host firewall or security software: inbound UDP packets on that port must be allowed.
A failure at any one layer can look like the same symptom to a player: the server does not appear, or a direct connection times out.
Before you create the forwarding rule
Identify the server computer’s local IP address
Port forwarding targets a private address such as 192.168.x.x or 10.x.x.x, not the public address shown by an internet-speed test. Find the IPv4 address assigned to the machine that runs the dedicated server. Reserve that address in the router’s DHCP settings, or configure a static address using your normal network-administration procedure. If the address changes later, the existing forwarding rule will point at the wrong computer.
Confirm which port Factorio is actually using
If you have never customized the server, begin with UDP 34197. If you changed the port, record the exact value and use it consistently in Factorio, the router, the host firewall and the client’s connection details.
The available documentation is not fully consistent about how a custom port is selected. The Factorio Wiki says the configuration file controls the port. A hosting guide says to supply --port when launching the server and specifically cautions that a port line in server-settings.json is silently ignored. Do not place a value in server-settings.json and assume it took effect. Use the configuration-file method or the launch argument documented for your installed build, then verify the result from the server itself.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Check for upstream NAT
If your router’s internet/WAN address is itself private, another router or carrier-grade NAT (CGNAT) is upstream. In that situation, a rule on your own router may not be sufficient, and you may not be able to accept unsolicited connections without help from the upstream administrator or internet provider. A hosted server is the practical alternative when you cannot obtain a publicly reachable address or cannot manage the upstream router.
Forward UDP 34197 on a typical home router
Router interfaces differ by manufacturer and firmware, but the required values are the same. The menu is commonly named Port Forwarding, NAT, Virtual Server or Port Mapping.
Rank #2
- 【PC Gaming System】This gaming PC is loaded with Intel Core I7 up to 3.9GHz and AMD Radeon RX 550 4G graphics card, allowing you to experience top-notch gaming performance. This system features 16GB of high-speed memory and 512GB SSD Solid State Drive for lightning-fast load times
- 【Superior Gaminig Experience】This high-performance Gaming Computer Desktop is capable of running a wide range of popular PC games for pc gamer, including Fortnite, Call of Duty Warzone, Escape from Tarkov, GTA V, World of Warcraft, LOL, Valorant, Apex Legends, Roblox, Overwatch, CSGO, Battlefield V, Minecraft, Elden Ring, Rocket League, The Division 2, and Hogwarts Legacy with 60+ FPS
- 【Multifunctional Use】This tower computers gaming pc desktop is designed to meet the needs of different people on the computer, powerful performance not only in the game to show quality graphics, the face of the office, design, audio and video can also be comfortable, multi-tasking, fast switching smooth operation
- 【Tower Gaming PC Desktop】The gaming computer desktop is designed for versatile connectivity, featuring 2x USB 3.0 ports, 6x USB 2.0 ports, 1x RJ-45, 1x Serial, and built-in Wi-Fi. The AMD Radeon RX 550 4G GDDR5 Graphics Card supports multiple display options including 1x HDMI, 1x DisplayPort, and 1x DVI, ensuring compatibility with a wide range of monitors
- Sign in to the router’s administration page. Use the management address and credentials supplied for your network. Do this from the local network rather than exposing the administration interface to the internet.
- Create a new forwarding entry. Give it a descriptive name such as
Factorio. - Choose UDP as the protocol. Do not select TCP-only. If the interface offers “TCP/UDP,” UDP traffic must still be included; a TCP-only selection is insufficient.
- Set the external or public port to 34197. For an unchanged server, use the same number internally. If you deliberately chose another server port, substitute that value in every field that refers to the game port.
- Set the internal or private port to 34197 and enter the server computer’s reserved local IP address as the destination.
- Save and apply the rule. Some routers restart their firewall or NAT service when changes are applied. Wait for that operation to finish before testing.
- Prevent source-port rewriting. The Factorio Wiki notes that some routers change the source port on outbound packets from 34197. If your router has a setting for source-port preservation, static NAT, endpoint-independent mapping or similar behavior, configure it so traffic originating from the server’s Factorio port is not rewritten unexpectedly. The exact label is vendor-specific; consult the router’s documentation rather than enabling unrelated options at random.
Port forwarding is not the same as opening every port on the server. Create one narrowly scoped UDP rule for the Factorio port and leave other services closed.
Allow the port through the server’s firewall
The operating-system firewall must permit inbound UDP traffic on the same port. Create an inbound rule restricted to the Factorio server executable or service when your firewall supports application scoping. If you use security software with its own network filter, check that product as well; the Factorio Wiki explicitly warns that a firewall or antivirus can block the UDP packets even when the router rule is correct.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →For a default server, the rule should be:
- Direction: inbound
- Protocol: UDP
- Local port: 34197
- Action: allow
- Scope: the network profiles and application appropriate for the machine running the server
Do not create a TCP-only exception. If you selected a custom port, replace 34197 with that value and remove stale rules that point to a port the server no longer uses.
Start the server and verify the listening port
Start the dedicated server using the same configuration or launch method you selected for the port. Then verify locally before asking friends to test. A local socket-listing tool can show whether a process is listening on UDP 34197 (or your chosen value). On systems that provide them, tools such as ss or netstat can display UDP listeners; select the equivalent diagnostic utility for your operating system.
A successful local check proves only that the process opened the socket. It does not prove that NAT and the public firewall will pass traffic. Record the listening value and compare it with the router rule and the client’s connection entry.
Test from outside your home network
- Use a genuinely external connection. Ask a player on another internet connection to join, or test from a device using cellular data. A phone or computer still connected to the same Wi-Fi may be routed internally and can give a misleading result.
- Provide the public address and port. The joining player needs your current public IP address (or a hostname that resolves to it) and UDP 34197 unless you changed the port.
- Check the result against the server log. A successful attempt should produce a connection event in the Factorio server output. If no packet or connection event appears, investigate the public address, NAT rule and upstream firewall before changing game settings.
- Retest after any port change. Update the router, host firewall and client details together. A test against the old port cannot validate the new configuration.
Generic online “open port” checkers often test TCP by default. Because Factorio is UDP-only, a TCP result is not evidence that the game port is reachable. Use a test that explicitly supports UDP or a real external Factorio connection.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteChanging the Factorio port
A custom port is useful when 34197 is already allocated or when your hosting environment assigns a different value. Pick one unused UDP port, configure Factorio with the method supported by your installed version, and then mirror that value everywhere else.
Configuration-file method
The Factorio Wiki describes the server configuration file as the place that controls the port. Make the change in the configuration file used by your dedicated-server launch, save it, restart the server and confirm the actual listening socket. Do not assume that editing an unrelated settings file changed the network port.
Rank #3
- Compatibility: Designed specifically for the Nintendo Switch 2 Joy-Con controllers, with dedicated left and right grips. It provides a more comfortable and precise control experience for smoother gameplay.
- Ergonomic Design: This comfortable Switch 2 controller grip is designed to fit the shape of your hand, with finger grooves for a stable and secure grip, helping you stay relaxed during long gaming sessions.
- Zero Resistance: The precision-crafted ABS shell and unique Teflon feet provide an ultra-smooth movement experience, making your control more precise. Whether it's shooting, strategy, or simulation games, you can enjoy an intuitive and seamless connection with the game.
- Quick & Easy Setup: Align the "+" and "-" buttons on your Switch 2 Joy-Con with the corresponding markings on the mouse grip, then snap it into place for immediate use, so you’re ready to game in seconds with enhanced precision.
- Lightweight and Portable: Weighing only 34.2g, it’s easy to carry and lets you enjoy a professional-grade gaming experience anytime, anywhere.
Launch-argument method
A hosting guide documents the --port launch argument. If you use this method, place the argument in the command or service definition that starts the dedicated server, restart it and verify the resulting listener. Keep a single source of truth so an old service definition does not silently start the server on 34197 while the router forwards another number.
What not to assume
The hosting guidance warns that a port entry in server-settings.json is silently ignored. Treat that file as unsuitable for changing the network port unless documentation for your exact build says otherwise. Because the available references do not establish precedence between a configuration-file value and --port, do not combine conflicting values. Choose one supported method and validate it with a local listener check and an external connection.
Running more than one server
One public IP address cannot map the same external UDP port to two different internal machines. Each additional instance therefore needs a distinct externally reachable UDP port and a corresponding internal destination. A hosting guide suggests incrementing values such as 34198 and 34199 for additional instances, but that suggestion is not independently verified here; treat it as an operational pattern, not a Factorio rule.
For each instance:
- Assign a stable local IP address or a distinct host.
- Configure a unique Factorio UDP port and verify the process is listening there.
- Create a separate router rule mapping that public port to the correct internal address and port.
- Allow the same UDP port through the host firewall.
- Give players the matching address and port for the intended save.
If your router supports external-to-internal port translation, the two numbers may differ, but the mapping must be documented and tested. Keeping them identical is simpler and reduces troubleshooting errors.
Troubleshooting: players cannot connect
The server is visible locally but not from the internet
- Confirm the router rule says UDP, not TCP only.
- Verify the destination IP still belongs to the server computer; DHCP changes are a common cause of a rule pointing at the wrong device.
- Check that the server is listening on the same port you forwarded. A custom
--portargument or configuration-file value may have replaced 34197. - Temporarily inspect host-firewall logs or rules for dropped UDP packets. Re-enable normal protection after testing; do not leave the machine broadly exposed.
- Compare the router’s WAN address with the public address reported by an external service. If the WAN address is private or belongs to a carrier-grade NAT range, you may be behind upstream NAT.
- Check whether the router rewrites the source port on outbound traffic from 34197, as noted by the Factorio Wiki.
A TCP port test says “closed”
This result is expected from a TCP-only checker. Factorio does not listen for game traffic on TCP. Use a UDP-capable test or an actual external game connection instead.
Players can connect only sometimes
Intermittent access usually indicates changing network state rather than a different Factorio protocol. Check whether the server’s local IP changes, whether the public IP changes, and whether the router’s NAT behavior rewrites source ports. Reconfirm the forwarding rule after every router reboot or network-device replacement.
The server works inside the house but not through the public address
Some routers do not support NAT loopback (also called hairpin NAT). Test with a player on another internet connection before concluding that forwarding is broken. If external players connect successfully, the issue is local loopback behavior rather than the Factorio port.
Self-hosting versus a hosted server
The port question is also a deployment decision. Self-hosting gives direct control of the router, files, mods and saves, but requires a publicly reachable network and ongoing maintenance. A hosted service can avoid home-router and CGNAT constraints, though the provider controls the network environment and service terms.
| Consideration | Self-hosted at home or on your own network | Hosted server |
|---|---|---|
| Router access | Required: you must forward the Factorio UDP port and preserve the server’s source port where necessary. | Usually not required from your home network; the host supplies the public endpoint. |
| CGNAT or upstream restrictions | Can prevent inbound connections when you cannot control the upstream NAT. | Generally avoids your home connection’s inbound-NAT limitation. |
| Cost | Uses hardware and internet service you already operate; no fixed amount is established here. | Pricing varies by provider, capacity and billing period; no universal figure applies. |
| Mods and saves | Full control over files, mods and backups on your own system. | Control depends on the provider’s panel, file access and policy. |
| Uptime | Depends on your power, internet connection, maintenance and router availability. | Depends on the host’s infrastructure and maintenance commitments. |
Choose self-hosting when you can administer the router and want direct file control. Choose hosting when CGNAT, unreliable residential uptime or lack of router access makes inbound forwarding impractical.
Quick Recap
Security and maintenance checklist
- Forward only the required UDP port; do not expose the router’s administration interface.
- Reserve the server’s local IP so the NAT rule does not drift.
- Keep the operating system, Factorio server and firewall definitions maintained.
- Back up saves and server configuration before changing the port or upgrading the server.
- Document the selected port, launch method and router destination so another administrator can reproduce the setup.
- When retiring a server, remove its forwarding and firewall rules.
Quick reference
| Item | Default or required value |
|---|---|
| Factorio game protocol | UDP only |
| Default dedicated-server port | UDP 34197 |
| Router destination | Server computer’s stable local IP address |
| Host firewall | Allow inbound UDP on the selected port |
| Router behavior | Do not rewrite the source port from 34197 when the router requires preservation |
| Custom-port verification | Confirm the listening socket after using the configuration file or --port |
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Recommended Free Tools

