Remote access
Last updated on November 18, 2026
The presets require Rev4a 1.29.0 or later. This guide previews managed Caddy Domain mode and the agent panel’s Ports list, which require Rev4a 1.30.0 or later.
Choose how to reach your Rev4a dashboard and your agents’ Control UIs on the Remote access page in Rev4a.
Which mode should I choose?
| Mode | When to use it |
|---|---|
| This computer only | You work on the server itself or connect over SSH. |
| Direct (IP) | A temporary test over plain HTTP. Avoid it for regular access. |
| Domain (Caddy, managed by Rev4a) | Recommended for a VPS with a public domain. Rev4a keeps the HTTPS routes in sync. |
| Domain (your own proxy) | You already run a reverse proxy and can maintain the agent routes yourself. |
| Tailscale | You want a private HTTPS dashboard within your tailnet. |
| If you’re leaving managed Caddy Domain mode, disable it first. Switching presets alone can leave the dashboard and agents publicly reachable through Caddy. | |
This computer only
If you’re leaving managed Caddy Domain mode, disable it first. Switching presets alone can leave the dashboard and agents publicly reachable through Caddy.
Choose This computer only to bind the dashboard and the agents’ published ports to loopback. On Linux the dashboard also listens on the Docker bridge so agents can reach their model. Agent ports bind to 127.0.0.1.
From another computer, open an SSH tunnel to the dashboard’s port. Replace the SSH user and example server IP with your own.
ssh -L 3740:127.0.0.1:3740 user@203.0.113.10Go to http://127.0.0.1:3740 in your browser, then apply the preset in Remote access. Rev4a requires a localhost or loopback dashboard address to apply it. Restart Rev4a and use Recreate for running agents whose bindings need to move.
Forward the host port mapped to the agent’s container port 3000. In Rev4a 1.30.0 and later, you can look up the mapping in the agent panel’s Ports list. Use the host port for both port values below.
ssh -L <port>:127.0.0.1:<port> user@<server>Run the tunnel on your computer and select Open from the loopback dashboard. If you’re viewing the dashboard at a remote URL, the Open dialog supplies the tunnel command for a loopback-only agent and offers Copy tunnel link to open the Control UI on localhost.
Direct (IP)
If you’re leaving managed Caddy Domain mode, disable it first. Switching presets alone can leave the dashboard and agents publicly reachable through Caddy.
Direct (IP) makes the dashboard and agent ports listen on all network interfaces. Open the dashboard at http://203.0.113.10:3740. Restart Rev4a and use Recreate to apply the new bindings to running agents.
Plain HTTP sends the session cookie without transport encryption. Cookies are shared across ports on the same host, so opening an agent on the dashboard’s IP can also send that agent your dashboard session cookie. Docker’s published agent ports can bypass ufw and may be reachable from the internet.
On plain HTTP over a non-loopback address, Open warns you before opening a reachable agent port. The exposure dialog offers an SSH tunnel, Copy tunnel link, Cancel and Open anyway. It asks every time. Use an SSH tunnel or HTTPS for regular access.
Domain (Caddy, managed by Rev4a)
Managed Caddy Domain mode is the recommended public setup for a Linux VPS. Caddy serves the dashboard and gives each running agent with a published Control UI its own HTTPS subdomain.
Point DNS at the server
Create records for rev4a.example.com and *.rev4a.example.com. For each name, add an A record for each public IPv4 address of the server, such as 203.0.113.10, and an AAAA record for each public IPv6 address. Allow public HTTP and HTTPS on ports 80 and 443.
Enter your dashboard hostname in the Domain mode section of Remote access. Rev4a lists the expected records for the hostname and its wildcard. Select Check to compare them with answers from the server’s DNS resolver. If Rev4a detects no public interface address, use the server’s public IP for your records and compare the DNS answers manually.
Preview, apply and restart
Run the dry run on the Linux server to preview the Caddyfile and environment changes. Use the same REV4A_DATA_DIR and dashboard PORT as the running service. The commands on Remote access include any non-default values.
sudo rev4a domain setup rev4a.example.com --dry-run- If the dashboard hostname shares a Caddy site block with other addresses, the dry run stops with “The dashboard hostname shares a Caddy site with other addresses. Move it to its own block before setup.”
- If the global
on_demand_tlsblock already has anaskendpoint for another service, the dry run stops with “Caddy already uses a different global on-demand TLS ask endpoint.” If another site needs it, use Domain (your own proxy). If the endpoint is unused, remove the conflictingasksetting and rerun the dry run.
Review the dry-run output. Once the dry run succeeds, apply the changes.
sudo rev4a domain setup rev4a.example.comSetup installs Caddy if needed. If it changes the main Caddyfile, it backs it up, adopts an existing site block dedicated to the dashboard hostname by preserving it as comments, and adds an import for /etc/caddy/rev4a.caddy if needed. It also configures Caddy’s on-demand TLS permission callback.
Setup sets REV4A_DOMAIN to the dashboard hostname, sets REV4A_LISTEN=local and REV4A_AGENT_PORTS_LISTEN=local, and adds 127.0.0.1 and ::1 to REV4A_TRUSTED_PROXIES.
Restart Rev4a after setup. For a systemd install, run the following command.
sudo systemctl restart rev4aUse Recreate on running agents so Docker republishes their ports on loopback. Until then, any ports already published to all interfaces stay reachable there. When you next select Start for a stopped agent with different bindings, choose Move and start to apply the local setting. Open the HTTPS dashboard and select Check on Remote access.
Dashboard, Control UI and dev ports
- Dashboard at
https://rev4a.example.com. - Control UI for an agent named Atlas at
https://atlas.rev4a.example.com. With an active route, Open goes straight to the subdomain. OpenClaw still handles the token and device pairing. - Published dev ports 3001–3009 use a hostname with the container port appended, such as
https://atlas-3001.rev4a.example.com. Sign in with HTTP Basic authentication asrev4a. In Remote access, select Show under Dev-port credential to see the password once a dev-port route is active.
In the agent panel, Ports lists the published TCP ports 3000–3009, their host mappings, whether a process is listening and any managed HTTPS links. Reopen the panel or select Refresh to update the list.
A dev server must listen on 0.0.0.0 inside its container and accept the public hostname in its Host checks.
Caddy uses one wildcard site for agent subdomains with an explicit route per published name. When an HTTPS connection needs a certificate, Caddy asks Rev4a over loopback at /api/domain/ask. Rev4a permits a Let’s Encrypt certificate request only for a name with a current route. Issuing certificates for every route up front could hit Let’s Encrypt’s limit of 50 new certificates per registered domain per week.
Use the browser’s install action in an agent’s Control UI to install it as a separate app (PWA) with the agent’s name. The Control UI service worker can keep the old OpenClaw name until OpenClaw is updated on that agent. To refresh it sooner, uninstall the old app, clear site data for the agent’s subdomain and install it again.
Disable managed Domain mode
Downgrading to Rev4a 1.29.0 leaves Caddy serving the last imported file, so the dashboard and agent routes can stay public. Follow these steps when switching modes or downgrading.
Keep SSH access available. Restore the timestamped Caddyfile backup if you want its previous configuration. Otherwise, in the main Caddyfile, remove the Rev4a import (or exclude the generated file from its import glob), undo the on-demand TLS callback change and restore the adopted dashboard block if you still want Caddy to serve it. For private access, keep any previous public dashboard block disabled. Validate and reload your main Caddyfile. The commands below use its default path.
sudo caddy validate --config /etc/caddy/Caddyfile --adapter caddyfile &&
sudo caddy reload --config /etc/caddy/Caddyfile --adapter caddyfileClear REV4A_DOMAIN from the configured environment to stop route sync and restart Rev4a. Review both listen settings and REV4A_TRUSTED_PROXIES for your new access method. Agents keep their current Docker bindings until rebuilt.
Domain (your own proxy)
If you’re leaving managed Caddy Domain mode, disable it first. Switching presets alone can leave the dashboard and agents publicly reachable through Caddy.
Set up a reverse proxy and test the dashboard over HTTPS first. Select Domain (your own proxy) in Remote access and confirm the switch. The preset binds the dashboard and agent ports locally and adds loopback addresses to the trusted proxies. Restart Rev4a and use Recreate to move running agents’ ports. Open the configured agent subdomain directly and use its OpenClaw gateway token and device pairing. With only loopback bindings, Rev4a’s Open button can still offer an SSH tunnel.
Point the dashboard hostname and its wildcard DNS records at the server. For HTTPS, use a wildcard certificate obtained through the DNS challenge for the agent subdomains and cover the dashboard hostname too. You can also use individual certificates per name. Let’s Encrypt allows 50 new certificates per registered domain per week.
Agent upstreams must receive none of X-Forwarded-For, X-Forwarded-Proto or X-Forwarded-Host. With the default agent configuration, OpenClaw returns HTTP 403 proxy_attribution_required if these headers reach it. Require HTTP Basic authentication on each published dev-port host and strip the checked Authorization header before proxying it.
Send the real client address in X-Forwarded-For to the dashboard so login throttling can distinguish clients. Set REV4A_TRUSTED_PROXIES to the proxy’s source address. For these same-host examples, use the preset’s loopback addresses.
REV4A_TRUSTED_PROXIES=127.0.0.1,::1Look up the actual host port for each container port in the agent panel’s Ports list. Ordinary Recreate keeps the host port numbers and can move the bind address to loopback. Editing an agent’s ports can change those numbers, and a new agent has its own mappings. Update and reload a static proxy configuration after a mapping changes or you add an agent route. Managed Caddy mode keeps its routes in sync automatically.
Both examples run the proxy directly on the Rev4a host. Atlas uses host port 3710 for container port 3000 (Control UI) and host port 3711 for container port 3001 (dev). Replace the sample host mappings with yours and add an explicit route for each agent and published dev port. Supply your own TLS files and an htpasswd file with a bcrypt entry for the Basic auth user rev4a.
nginx example
Put these directives inside nginx’s http context. The certificate in this example covers both the dashboard and the wildcard. The wildcard server routes known hosts, returns 404 for an unknown host and requires Basic auth on the dev host.
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
map $host $agent_port {
default "";
atlas.rev4a.example.com 3710;
atlas-3001.rev4a.example.com 3711;
}
map $host $dev_auth {
default off;
atlas-3001.rev4a.example.com "Rev4a dev port";
}
map $dev_auth $agent_authorization {
off $http_authorization;
default "";
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name rev4a.example.com;
ssl_certificate /etc/nginx/tls/rev4a-fullchain.pem;
ssl_certificate_key /etc/nginx/tls/rev4a-key.pem;
location / {
proxy_pass http://127.0.0.1:3740;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 1h;
proxy_send_timeout 1h;
proxy_set_header X-Forwarded-For $remote_addr;
}
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name *.rev4a.example.com;
ssl_certificate /etc/nginx/tls/rev4a-fullchain.pem;
ssl_certificate_key /etc/nginx/tls/rev4a-key.pem;
if ($agent_port = "") { return 404; }
location / {
auth_basic $dev_auth;
auth_basic_user_file /etc/nginx/rev4a-dev.htpasswd;
proxy_pass http://127.0.0.1:$agent_port;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 1h;
proxy_send_timeout 1h;
proxy_set_header X-Forwarded-For "";
proxy_set_header X-Forwarded-Proto "";
proxy_set_header X-Forwarded-Host "";
proxy_set_header Authorization $agent_authorization;
}
}Traefik example
This example is written for Traefik v3. Define one HTTPS entry point, websecure, and the file provider in the static configuration.
entryPoints:
websecure:
address: ":443"
providers:
file:
filename: /etc/traefik/rev4a.yml
watch: truePut these routes in /etc/traefik/rev4a.yml. The certificate covers the dashboard and wildcard. HTTP routers match each known hostname exactly. The dashboard keeps Traefik’s default client address forwarding. Both agent routes remove the three forwarded headers, and the dev route also requires Basic auth.
tls:
certificates:
- certFile: /etc/traefik/tls/rev4a-fullchain.pem
keyFile: /etc/traefik/tls/rev4a-key.pem
http:
routers:
dashboard:
entryPoints: [websecure]
rule: Host(`rev4a.example.com`)
tls: {}
service: dashboard
atlas:
entryPoints: [websecure]
rule: Host(`atlas.rev4a.example.com`)
tls: {}
middlewares: [strip-agent-headers]
service: atlas
atlas-3001:
entryPoints: [websecure]
rule: Host(`atlas-3001.rev4a.example.com`)
tls: {}
middlewares: [dev-auth, strip-agent-headers]
service: atlas-3001
middlewares:
strip-agent-headers:
headers:
customRequestHeaders:
X-Forwarded-For: ""
X-Forwarded-Proto: ""
X-Forwarded-Host: ""
dev-auth:
basicAuth:
usersFile: /etc/traefik/rev4a-dev.htpasswd
removeHeader: true
services:
dashboard:
loadBalancer:
servers:
- url: http://127.0.0.1:3740
atlas:
loadBalancer:
servers:
- url: http://127.0.0.1:3710
atlas-3001:
loadBalancer:
servers:
- url: http://127.0.0.1:3711Tailscale
If you’re leaving managed Caddy Domain mode, disable it first. Switching presets alone can leave the dashboard and agents publicly reachable through Caddy.
Install Tailscale on the server and every device you will use, and sign in to the same tailnet. Enable HTTPS certificates in the tailnet, then run this command on the server.
tailscale serve --bg 3740Open the HTTPS .ts.net URL printed by tailscale serve. After testing it, apply Domain (your own proxy), restart Rev4a and use Recreate to bind running agents’ ports to loopback. The dashboard stays reachable over HTTPS in your tailnet without a public dashboard port. On a phone, install Tailscale and open the same URL.
The command serves the dashboard on port 3740. Use the SSH tunnel from Open to reach an agent whose ports are local.
To give someone outside your tailnet access, use Tailscale’s node sharing.
Tailscale has a free plan for personal use. See its pricing page for current terms.
What happens to the session cookie?
In production, Rev4a sets the flags from the request’s Origin. HTTPS or a missing or unusable Origin uses Secure and SameSite=Strict. Plain HTTP uses SameSite=Lax without Secure. This also applies to plain HTTP using a Tailscale IP. The old REV4A_FORCE_INSECURE_COOKIE setting is no longer read.
If you switch from HTTP to HTTPS on the same host, Rev4a upgrades the session cookie. Use one address consistently. An existing Secure cookie can block a later HTTP login on the same host until it expires, up to seven days. Log out over HTTPS to clear it.
The dashboard cookie is scoped to its host, so browsers leave it behind when opening a separate agent subdomain. On loopback, Rev4a similarly opens the agent on a different host name, using 127.0.0.1 for a localhost dashboard and localhost for a loopback IP dashboard.
Harden the server
If Rev4a runs on a VPS, a few generic habits matter more than any Rev4a setting:
- Use SSH keys only, and keep a backup key with a passphrase in a password manager.
- Keep your provider's web console as emergency access in case you lock yourself out of SSH.
- Use the provider's firewall: allow only port 22, and 80/443 when you use a domain.
- Docker can publish ports past
ufw. Bind agent ports to loopback and firewall the dashboard port (3740 by default) on the public interface, including when the dashboard also listens on the Docker bridge. - Turn on unattended security upgrades.
On Debian or Ubuntu, first add your key and test it in a second session, and keep the current session open until the new login works. Then disable password logins in /etc/ssh/sshd_config, check the syntax and reload SSH (the unit is sshd on some distributions). Files in /etc/ssh/sshd_config.d/ (for example 50-cloud-init.conf) can override the main file, so verify the effective value:
# /etc/ssh/sshd_config
PasswordAuthentication no
# check the syntax, then reload (the unit is sshd on some distributions)
sudo sshd -t && sudo systemctl reload ssh
# verify the effective value
sudo sshd -T | grep -i passwordauthenticationUnattended security upgrades on Debian or Ubuntu:
sudo apt install unattended-upgradesRev4A · Revolution for Agents