Skip to content
/SLASHPLAY

How to change the port of a Factorio server

Start the server with --port <port>; the default is 34197 (UDP). On SLASHPLAY the port is set for you and is part of the address on the server page.

--port

The UDP port the server listens on. Factorio's default is 34197.

--port <port>

Examples

--port 34197

The default port.

Arguments

portRequired
UDP port number.

What it does

Players connect to this port, so it's the one to forward on a home router.

Good to know

  • SLASHPLAY sets the ports. Changing them here stops players from connecting.

Run it on your server

Type commands with the leading slash in the Console tab, which runs them as the server; in game, admins type them in chat. Settings go in config/server-settings.json in the Files tab and apply at the next restart. New to this? Start a Factorio server first.

Your own
Factorio server.

From $0.03 an hour, only while it runs. New accounts get 6 free tokens.