Skip to content

Commit 0a93489

Browse files
committed
docs: document SSH tunnel access for remote self-hosted instances
Add a generic ProxyJump-based tunnel guide (one-hop and two-hop bastion patterns) covering the common failure modes: local port collisions, firewall/security-group blocks, and unreachable target hosts.
1 parent 8a8483e commit 0a93489

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,54 @@ Upgrading:
277277
git pull && docker compose up -d --build
278278
```
279279

280+
### Accessing a remote self-hosted instance (SSH tunnel)
281+
282+
If DeepSQL runs on a server you only reach through a bastion/jump host — common in
283+
locked-down cloud environments — forward the frontend port locally instead of exposing
284+
it to the internet.
285+
286+
**Direct bastion, one hop:**
287+
288+
```bash
289+
ssh -N -L 3100:localhost:3000 -o ExitOnForwardFailure=yes <user>@<bastion-host>
290+
```
291+
292+
**Target host is itself only reachable from inside the bastion's network (two hops):**
293+
add a `Host` entry per leg in `~/.ssh/config` and let `ProxyJump` chain them — no
294+
manual double-hop command needed.
295+
296+
```sshconfig
297+
Host my-bastion
298+
HostName <bastion-ip-or-dns>
299+
User <bastion-user>
300+
IdentityFile ~/.ssh/<bastion-key>
301+
302+
Host deepsql
303+
HostName <target-host-ip-or-dns>
304+
Port <target-ssh-port>
305+
User <target-user>
306+
IdentityFile ~/.ssh/<target-key>
307+
ProxyJump my-bastion
308+
LocalForward 3100 localhost:3000
309+
ServerAliveInterval 30
310+
ExitOnForwardFailure yes
311+
```
312+
313+
```bash
314+
ssh -N deepsql
315+
```
316+
317+
Then open **http://localhost:3100**. Use a non-3000 local port if something on your
318+
machine (often a local Docker container) already binds 3000 — `ExitOnForwardFailure=yes`
319+
makes a port collision fail loudly instead of silently handing you a dead tunnel that
320+
looks connected while your browser actually talks to the wrong service.
321+
322+
If the connection hangs at the TCP handshake rather than failing immediately, check, in
323+
order: the target's firewall/security-group rules for the SSH port, whether the target
324+
host is actually reachable from the bastion (`ssh <bastion> "nc -zv <target> <port>"`),
325+
and only then your local tunnel config — a hung handshake almost always means the
326+
network path is blocked somewhere upstream of your laptop, not a misconfigured tunnel.
327+
280328
### Ports
281329

282330
| Service | Port | Override |

0 commit comments

Comments
 (0)