exposr expose
Expose a local TCP service through an Exposr relay server.
Usage
bash
exposr expose <local-port> [to <public-port>]Arguments
| Argument | Required | Description |
|---|---|---|
| <local-port> | Yes | The local port to forward traffic to |
| to <public-port> | No | Specific public port to request |
Options
| Option | Default | Description |
|---|---|---|
| --server-host | Saved config | Override the relay server address |
| --control-port | 9000 | Control channel port on the server |
| --data-port | 9001 | Data channel port on the server |
| --local-host | 127.0.0.1 | Local host to forward to |
Port assignment
When no public port is specified, Exposr tries port 25565 first. If unavailable, it picks random ports from 20000-30000 and checks each with the server, up to 100 attempts.
When a public port is explicitly specified with to, Exposr requests that exact port without fallback.
Examples
bash
# Expose local port 3000 with automatic port assignment
exposr expose 3000
# Expose local port 3000 on public port 21342
exposr expose 3000 to 21342
# Expose local port 8080
exposr expose 8080
# Expose Minecraft server
exposr expose 25565
# Override server address for one run
exposr expose 3000 --server-host 10.0.0.5Output
On successful connection, Exposr displays:
exposr
[TRYING] Connecting to Exposr server [CONNECTED] Connected to Exposr control server [TRYING] Registering public port [CONNECTED] Tunnel active Public address: 20.198.81.254:25565 Forwarding to: 127.0.0.1:3000
Errors
If the server is not configured:
text
[ERROR] Server IP is not configured. Run: exposr config set-server <server-ip>Tip
Run
exposr config set-server YOUR_SERVER_IP to save the server address before using expose.