SSH Tunnel

Run your app on a remote server — staging, CI, a Docker VM, or any machine you SSH into — and still see payloads in the local Fanar desktop app. The built-in SSH tunnel forwards the Fanar port over SSH with no extra tools required.

How it works

Fanar opens a reverse SSH tunnel from the remote server back to your laptop. Your app sends payloads to localhost:23517 on the server, and they arrive in the desktop app as if the app were running locally.

No VPN, no firewall changes, no ngrok. As long as you can SSH into the server, the tunnel works.

Setup

Open the Fanar desktop app and go to Preferences → SSH Tunnel. Fill in three fields:

FieldExampleDescription
UserubuntuSSH username on the remote server
Hoststaging.myapp.comHostname or IP of the remote server
Remote port23517Port Fanar listens on — the tunnel binds this port on the remote machine

The app generates the equivalent SSH command so you can verify or run it manually:

ssh -R 23517:localhost:23517 ubuntu@staging.myapp.com

Click Connect. The status indicator turns green when the tunnel is live.

Authentication

Fanar uses your system SSH agent and ~/.ssh/config. If you can run ssh user@host in a terminal without a password prompt, the tunnel will connect without one too.

If your key requires a passphrase, add it to the SSH agent first:

ssh-add ~/.ssh/id_ed25519

Client configuration

Your app on the remote server sends payloads to localhost:23517 — the default — so no client configuration change is needed. The tunnel makes the remote localhost:23517 point back to your laptop.

Docker and containers

If your app runs inside a Docker container on the remote host, the container needs to reach the host's localhost. Use host.docker.internal on Docker Desktop, or the host gateway IP on Linux:

# docker-compose.yml
services:
  app:
    extra_hosts:
      - "host.docker.internal:host-gateway"
    environment:
      FANAR_HOST: host.docker.internal

Troubleshooting

  • Status stays "Disconnected" — confirm you can SSH to the host without a password from the terminal. Check that your SSH agent is running (ssh-add -l).
  • Port already in use — another process on the remote server is using port 23517. Either stop it or change the Fanar port in Preferences → Port and update the remote port field to match.
  • Payloads not arriving — verify the client is sending to the correct host/port. Run curl -s http://localhost:23517/api/payloads on the remote server to confirm the tunnel endpoint is reachable.