CLI Overview
Overview of the Exposr command-line interface.
The Exposr CLI is installed as the exposr command. It provides commands for exposing local services, configuring the client, and managing the relay server.
Commands
| Command | Description |
|---|---|
| exposr expose <port> | Expose a local TCP service through the relay |
| exposr expose <port> to <public-port> | Expose with a specific public port |
| exposr config set-server <ip> | Configure the relay server address |
| exposr server init-token <token> | Initialize the server with an agent token |
| exposr server start | Start the relay server |
Global options
| Option | Default | Description |
|---|---|---|
| --server-host | Saved config | Override the server address for one run |
| --control-port | 9000 | Control channel port |
| --data-port | 9001 | Data channel port |
| --local-host | 127.0.0.1 | Local host address |
Examples
bash
# Expose a local service on the default public port
exposr expose 3000
# Expose with a specific public port
exposr expose 3000 to 21342
# Use a different server for one run
exposr expose 3000 --server-host 10.0.0.5
# Expose a service on port 8080
exposr expose 8080