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_IP

This 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_HERE

Start the server

bash
exposr server start

The server starts listening on ports 9000 (control) and 9001 (data).

Firewall configuration

Port / RangeProtocolPurpose
9000TCPControl channel
9001TCPData channel
20000–30000TCPDynamic 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