Remote Access
Connect to Remi from any network using a short connection code, without port forwarding or VPN setup.
How It Works
Remi connects to a signaling server (a Cloudflare Worker) and registers a connection code. When you enter that code in the Remi web app, the signaling server bridges the two connections and relays messages between the daemon and your browser.
Your Phone ──► Signaling Server ◄── Remi Daemon
(relay)
The signaling server only forwards encrypted protocol messages. It does not store or inspect the content.
Rotating Codes (Default)
By default, Remi uses rotating codes. A new random code is generated each time the relay peer disconnects:
remi my-project
In wrapper mode, the code is logged to ~/.remi/remi.log. Use remi code to view it, or check the log:
tail ~/.remi/remi.log | grep "code"
Properties of rotating codes:
- Ephemeral - the code changes when the remote client disconnects
- No authentication required - the code itself acts as a short-lived token
- One client at a time - a new connection drops the previous one
- Logged on rotation - the current code is written to
~/.remi/remi.logwhen it changes
Rotating codes are good for quick, ad-hoc access. You share the code with yourself (e.g., read it from the log) and use it on your phone.
Rotating codes provide convenience, not strong security. The code has limited entropy (~20 bits) and is transmitted to the signaling server. Use them only for quick, low-risk access where the code is shared out-of-band.
Permanent Codes
For persistent remote access, use --permanent-code:
remi --permanent-code my-project
Properties of permanent codes:
- Persistent - stored in
~/.remi/connection-code, survives restarts - Authentication required - full Ed25519 mutual authentication on every connection
- Stable - same code works across sessions
- Manageable - view with
remi code, refresh withremi code --refresh
Permanent codes are good for setting up a reliable monitoring endpoint, like a phone that always connects to the same server.
Managing Permanent Codes
# View the current permanent code
remi code
# Generate a new code (takes effect after restart)
remi code --refresh
When to Use Which
| Scenario | Mode |
|---|---|
| Quick check from phone while at a coffee shop | Rotating (default) |
| Always-on monitoring from a trusted phone | Permanent + auth |
| Sharing access temporarily with a colleague | Rotating |
Running as a service with --install | Permanent + auth |
Code Format
Codes follow the format XXXX-YYYY:
- 4 uppercase letters (excluding I, O, L)
- 4 digits (excluding 0, 1)
This avoids ambiguous characters and makes codes easy to read and type.
Disabling Relay
To disable relay entirely (direct connections only):
remi --no-relay my-project
Custom Signaling Server
To use a self-hosted signaling server:
remi --signaling-url wss://my-signaling.example.com/connect my-project