Custom Public Ports
Choose your own public port for an exposed service.
Syntax
Add the exact public port after the local port. Use the transport command that matches your service:
bash
exposr tcp <local-port> <public-port>
exposr udp <local-port> <public-port>Examples
bash
# Expose local port 3000 on public port 21342
exposr tcp 3000 21342
# Expose local port 8080 on public port 25000
exposr tcp 8080 25000
# Expose Minecraft on its default port
exposr tcp 25565 25565Considerations
- The requested public port must be available on the server
- The port must be allowed through the server's firewall
- When specifying a custom port, Exposr does not fall back to a random port if it's unavailable
Tip
For ports outside the default
20000–30000 range, make sure the port is also allowed through your server's firewall or cloud security group.