How to change the server port in Rust
Add +server.port 28015 to the server's launch options to set the UDP game port players connect to.
server.port
Sets the UDP game port that players connect to.
+server.port <port> Examples
+server.port 28015 Standard Rust game port.
Arguments
portRequired- UDP port number.
What it does
This is the port in the connect address players use. Rust's usual default is 28015. It is read at startup, so set it on the launch line, and make sure the port is open for UDP in any firewall in front of the server.
The game's own description: UDP port the server listens on for player connections
Good to know
- Launch-line setting. Each server on the same IP needs its own port.
Run it on your server
Type it in the server console or send it over RCON; admins can also use the F1 console in game. To keep a setting, run server.writecfg after changing it, or put it on the launch line as +name value.
Your own
game server.
CS2, Minecraft, Palworld and more, from $0.03 an hour.