Port Configuration and Firewall Setup
Factorio dedicated server port requirements, UDP-only networking, RCON port setup, and multi-instance port assignment.
Overview
Factorio uses a single UDP port for all game traffic. Understanding the port layout is necessary for firewall rules, multi-instance hosting, and enabling RCON.
Default Port
UDP 34197
This is the only port required for a functional Factorio server. There is no separate query port, status port, or TCP game port. Factorio uses UDP exclusively for game traffic.
Setting a Custom Port
Use the --port flag at startup:
./factorio/bin/x64/factorio --start-server saves/save.zip --port 34197
On WISP/Pterodactyl, the port is set via the PORT startup variable and injected into the startup command automatically. You should not need to set this manually unless your egg is misconfigured.
Verifying the Port Is Listening
On Linux, check UDP listeners with:
ss -u -l
Look for a line with *:34197 or 0.0.0.0:34197 in the output. If the port is absent, the server is not running or failed to bind.
Firewall Rules
Allow inbound UDP on the game port. Example with ufw:
ufw allow 34197/udp
Example with iptables:
iptables -A INPUT -p udp --dport 34197 -j ACCEPT
On a WISP/Pterodactyl panel, port allocation is managed by the panel. Each server is allocated a port from the node's port pool. You do not need to configure the host firewall manually — contact your host if the allocated port is not reachable.
RCON Port
RCON uses a separate TCP port. Enable it with:
./factorio/bin/x64/factorio --start-server saves/save.zip \
--rcon-port 27015 \
--rcon-password "yoursecretpassword"
RCON traffic is TCP. You must open the RCON port separately if you need external RCON access. On WISP/Pterodactyl, the RCON port is typically a second allocated port, and RCON_PORT and RCON_PASSWORD are standard egg startup variables. See Remote Administration with RCON.
Multi-Instance Port Assignment
Each Factorio server instance requires a unique UDP port. Assign sequentially:
Server 1: UDP 34197
Server 2: UDP 34198
Server 3: UDP 34199
On WISP/Pterodactyl, each server allocation gets its own port. Confirm there are no port conflicts by checking the node's port allocation list in the admin panel.
Public Matchmaking Requirement
For a server to appear on factorio.com matchmaking, UDP 34197 (or your custom port) must be reachable from the internet. The matchmaking server will probe your port during registration. If the probe fails, the listing will be absent or marked offline. See Configuring Public, LAN, and Hidden Server Visibility.