Using Your Own Relay Server
Set up and run your own Exposr relay server.
Server requirements
- Python 3.10+
- Linux server, VPS, or cloud VM (e.g., Azure, AWS, DigitalOcean)
- Public IP address
- Open inbound TCP ports: 9000, 9001, 25565, and 20000–30000
Install Exposr on the server
bash
git clone https://github.com/Hrick-08/Exposr.git
cd Exposr
python3 -m pip install .Configure the agent token
On your local machine, run:
bash
exposr config set-server YOUR_SERVER_IPThis generates a random token in ~/.exposr/agent_token.txt. Copy the token and initialize the server:
bash
# On the relay server:
exposr server init-token PASTE_TOKEN_HEREStart the server
bash
exposr server startThe server starts listening on ports 9000 (control) and 9001 (data).
Firewall configuration
| Port / Range | Protocol | Purpose |
|---|---|---|
| 9000 | TCP | Control channel |
| 9001 | TCP | Data channel |
| 20000–30000 | TCP | Dynamic public tunnel ports |
Warning
Without allowing the
20000–30000 range, Exposr may register a tunnel internally while external users cannot reach it.Connect a client
From your local machine:
bash
exposr expose 3000