Built-in Relay (No VPN Needed)
RemoteConsole includes a built-in relay system that lets your phone connect to your computer from anywhere -- no VPN, no port forwarding, no network configuration. Just install the companion agent on your computer, scan a QR code with your phone, and you are connected.
How It Works
The relay creates a secure bridge between your phone and your computer through a lightweight server:
Phone App <--> Relay Server (WebSocket) <--> Agent <--> Local SSH Server
Your SSH traffic is encrypted end-to-end by the SSH protocol. The relay server only sees opaque binary data -- it cannot read your commands or output.
Tip
The relay is designed for simplicity. If you already use Tailscale or have direct network access to your computer, you can use direct SSH connections instead. Both methods are supported side by side.
Relay vs. Tailscale vs. Direct SSH
| Method | Setup | Works Everywhere | Extra Software |
|---|---|---|---|
| Built-in Relay | Scan QR code | Yes | Agent on computer |
| Tailscale | Install on both devices | Yes | Tailscale on both |
| Direct SSH | Enter IP address | Same network only | None |
Step 1: Install the Agent on Your Computer
The companion agent runs on your computer and bridges relay connections to your local SSH server.
Requires Node.js 20+.
npm install -g remoteconsole-agentStep 2: Start the Agent
On your first run, provide the relay server URL:
remoteconsole start --relay wss://relay.remoteconsole.appThe agent will:
- Check that SSH is available on your computer
- Connect to the relay server
- Display a QR code for pairing
RemoteConsole Agent
SSH server detected on port 22
Connected to relay server
Registered with relay server
Scan this QR code with the RemoteConsole app:
[QR CODE]
Or enter this code in the app: eyJ2IjoxLCJkIjoi...
Or open this link on your phone: remoteconsole://pair?data=eyJ2Ijox...
This code pairs one phone and expires in 24 hours if unused. Keep it private.
Agent running. Waiting for connections...
Press Ctrl+C to stop
Info
The relay URL is saved after the first run. Future starts only need remoteconsole start.
Warning
Each QR code carries a one-time pairing token for one phone. Treat it like a password: don't post screenshots of it. An unused code expires after 24 hours; run remoteconsole pair for a fresh one.
Step 3: Pair Your Phone
Open RemoteConsole on your phone
Tap "Pair via QR Code" on the home screen or tap the + button and select "Pair via QR Code"
Scan the QR code displayed in your terminal. The app will automatically detect your computer's name and configure the connection.
Enter your SSH credentials -- your username and password or SSH key for the remote computer. These are used for SSH authentication and are stored locally on your phone.
Connect -- tap the connection to start a terminal session.
Run as a Background Service
Instead of keeping a terminal open, install the agent as a background service that auto-starts on login:
remoteconsole installThis uses launchd on macOS and systemd on Linux. The agent will start automatically when you log in and restart if it crashes.
To check status or remove the service:
remoteconsole status # Shows service status (running/stopped)
remoteconsole uninstall # Stops and removes the serviceTip
Once installed as a service, use remoteconsole pair to display the QR code for pairing new devices. The service never writes pairing codes to its log, so the log is safe to share when asking for help.
Paired Phones
Only phones you've paired can open a session on your computer. Each pairing gets its own token, so you can see and remove phones one at a time:
remoteconsole pair --name "iPhone" # Pair a new phone and give it a name
remoteconsole devices # List paired phones and when each last connected
remoteconsole unpair <id> # Remove one phone (id from `devices`)A removed phone is refused the next time it connects, and the app asks you to pair again.
Upgrading from agent 1.5.0 or earlier
Phones paired before agent 1.5.1 have no pairing token. To keep them working, an upgraded agent still accepts phones without a token and prints a reminder. Once each phone runs RemoteConsole 1.13.1 or later:
Run remoteconsole pair --name "<phone name>" on your computer.
In the app, open the ⋮ menu on the existing connection, tap Re-pair via QR and scan the code. Your saved SSH credentials and tmux session are kept.
When remoteconsole devices shows a "last seen" time for every phone, run remoteconsole lock. From then on, phones without a token are refused.
New installs start locked, so this only applies to upgrades. remoteconsole unlock reverts it if a phone gets stuck.
Agent Commands
| Command | Description |
|---|---|
remoteconsole start | Start the agent in the foreground and show QR code |
remoteconsole install | Install as a background service (auto-starts on login) |
remoteconsole uninstall | Stop and remove the background service |
remoteconsole restart | Restart the background service (after an update) |
remoteconsole pair [--name <name>] | Show a one-time QR code to pair a phone |
remoteconsole devices | List paired phones |
remoteconsole unpair <id> | Remove a paired phone |
remoteconsole lock | Only allow phones paired with a token (default for new installs) |
remoteconsole unlock | Also allow phones paired before agent 1.5.1 |
remoteconsole status | Show configuration, paired phones and service status |
remoteconsole reset | Reset all settings and unpair all phones |
Options
| Flag | Description | Default |
|---|---|---|
-p, --port <port> | Local SSH port to bridge | 22 |
--relay <url> | Relay server URL | Saved from first run |
Example with a custom SSH port:
remoteconsole start --port 2222Updating the agent
npm install -g remoteconsole-agent@latest
remoteconsole restart # only if you run it as a background serviceA running agent keeps its old code until it restarts, so restart the service after updating. Your device ID and pairings survive updates. If you're updating from 1.5.0 or earlier, see Upgrading from agent 1.5.0 or earlier under Paired Phones to give your phones pairing tokens.
Uninstall
remoteconsole uninstall # if you installed the background service
npm uninstall -g remoteconsole-agentPrerequisites
Before using the relay, make sure:
- SSH is enabled on your computer -- Enable Remote Login guide
- Node.js 20+ is installed -- Download Node.js
Security
- End-to-end SSH encryption -- The relay transports opaque binary data. It cannot decrypt your SSH traffic.
- Credentials stay on your phone -- SSH username, password, and keys are stored in your phone's secure keychain, never sent to the relay.
- Only your phones get in -- Each phone gets its own pairing token when it scans the QR code. The agent refuses sessions from phones it hasn't paired, so knowing your device ID isn't enough to reach your SSH login.
- Only your agent can answer -- The agent proves itself to the relay with a secret created on your computer. Once it has connected, nobody else can register as your computer.
- Private files -- The agent's config (secret and token hashes) and its service log are readable only by your user account.
- Localhost only -- The agent only bridges connections to
127.0.0.1(your local machine). - Session limits -- Maximum 5 concurrent sessions to prevent resource exhaustion.
Warning
The relay server is operated by RemoteConsole. If you prefer not to route traffic through a third-party server, use Tailscale or direct SSH instead.
Troubleshooting
Agent says "No SSH server found"
SSH is not running on your computer. Enable it:
- macOS: System Settings > General > Sharing > Remote Login
- Linux:
sudo systemctl start sshd
See the Enable Remote Login guide for detailed instructions.
Agent cannot connect to relay
Check your internet connection and firewall settings. The agent connects outbound on port 443 (HTTPS/WSS), which is allowed on most networks.
QR code not scanning
Make sure your phone camera can see the entire QR code. Try increasing your terminal font size or moving your phone closer. You can also enter the manual pairing code shown below the QR code.
App says "This computer no longer recognizes this phone"
The agent refused the phone's pairing token. This happens after remoteconsole unpair, or when an agent is locked and the phone was paired before agent 1.5.1. Run remoteconsole pair on the computer, then use Re-pair via QR on the connection in the app.
Agent says "The relay refused this agent"
Another agent secret has already registered this device ID, usually because the config was copied from another computer or restored from an old backup. Run remoteconsole reset, restart the agent and pair your phone again.
Connection drops frequently
The agent automatically reconnects with exponential backoff (2s, 4s, 8s, up to 30s). If your connection is unstable, consider installing tmux for persistent sessions that survive disconnects.
Next Steps
- Configure SSH keys for password-free login
- Install tmux for persistent terminal sessions
- Learn about SSH connections in the app