SSD Nodes Learn Hosting plans →
Guides Matt ConnorBy Matt Connor

Reach the DSH web UI on your VPS

The DSH web UI binds to 127.0.0.1:3080, so the URL your VPS prints will not open on your laptop. Three safe ways to reach it, and one you should avoid.

Why the DSH web UI will not open from your laptop

The DSH web UI binds to the loopback interface, so the URL your terminal printed only works on the machine that printed it. npx @deepseek-ai/dsh web reports a launch URL of the form http://127.0.0.1:3080/?token=..., and 127.0.0.1 means "the computer reading this address" to whatever computer reads it. Your laptop reads it, looks at its own loopback interface, and finds nothing listening there. If the address itself is the confusing part, why dsh prints http://127.0.0.1:3080 in the first place unpacks it at more length. Do not change what DSH binds to. Build an authenticated path from your laptop to the VPS loopback address instead.

The loopback default is correct, and every method on this page keeps it. What sits behind port 3080 is an agent that runs shell commands on your server, and the web UI ships no login page. DSH does authenticate the browser now, with a launch token: each process start mints a fresh token, the printed URL carries it, and the first visit swaps it for a session cookie. That token is a single bearer credential sitting in a URL, so loopback is still the layer that matters most: direct connections to the socket must originate on the VPS, including connections forwarded by SSH or a proxy.

What DSH binds to, and how to check yours

Checked on 4 November 2026, the DeepSeek Harness README says npx @deepseek-ai/dsh web "starts the Web UI at http://127.0.0.1:3080 by default". The CLI reference in the same repository says the default port stays 3080, that --host "must name one concrete local address, not a wildcard", and that --host 0.0.0.0 exits with a usage error. DSH is a developer preview, and the README warns in capitals that there will be compatibility-breaking changes. Confirm both values on your own install rather than trusting any page, including this one.

dsh --profile web --dump-config
ss -ltnp | grep 3080

--dump-config prints the composed configuration tree without booting the agent, but leaves expressions unevaluated and does not resolve app arguments, so it is not a dump of the final runtime host and port. ss shows what is actually listening right now. A healthy line looks like this:

LISTEN 0  511  127.0.0.1:3080  0.0.0.0:*  users:(("node",pid=8123,fd=24))

Read the local listening address, not the peer address. 127.0.0.1:3080 is loopback only, which is what you want. Other addresses in 127/8, ::1, and their loopback mapped forms also keep DSH local; a non-loopback address serves the network that address belongs to, which may be the public one. If ss prints no line at all, nothing is listening on port 3080; check whether DSH stopped or uses another port before setting up a tunnel. Getting to that point is covered in installing and running DeepSeek Harness on a VPS.

Flags apply to one run. To make a value stick, edit the profile patch layer instead. dsh --profile <name> boots the profile at $DSH_HOME/profiles/<name>, and the layers stack in this order: bundle patches, the profile's own cordis.patch.yml, the home-level $DSH_HOME/cordis.patch.yml, then any --patch overlay. The listen settings live under the @deepseek-ai/dsh-host-webserver plugin as host and port. Read your own composed tree with --dump-config before editing, because the web profile writes itself from a shipped template on first boot and the preview keeps changing that template's shape.

The startup line is also where your credential comes from. DSH prints the root URL with the process token in a token query, and the browser can present it only as GET /?token=..., never in an Authorization header. A separate GET /connect?token=... exchange exists for API callers, not for the browser. The root request sets a signed, host-only, HttpOnly, SameSite=Strict cookie and redirects to a clean URL. Each process start mints a new token, and the cookie expires after 30 days by default, a value set by cookieMaxAgeDays. A request for the document or an API without valid credentials gets a 401; static assets remain public. Copy the whole printed URL, token included, because every method below ends with you opening it.

The second gate: the /api trust fence

Getting packets to port 3080 is half the problem. DSH has a second check, and it produces the confusing failure where the page loads, the layout appears, and then nothing works.

The @deepseek-ai/dsh-client-connection plugin holds a trustedHosts setting. Its README gives the rule: the Host header must be loopback, the listener's own bind address on any port, or a match for a trustedHosts entry, and when the browser sends an Origin header it must name the same authority. The fence runs before authentication on every request, and it refuses any /api request that fails it. The browser reports the refusal like this:

transport failure for /api/host.describe: HTTP 403

So any proxy you put in front of DSH must declare the name the browser types. The CLI takes --trusted-host <authority>, and it is repeatable:

dsh web --trusted-host dsh.example.com

The fence matches authorities, host plus port, and normalizes default ports for the listener's scheme. A port-less entry such as dsh.example.com matches that name on any port, so it also covers dsh.example.com:8443. An entry that carries a port, such as dsh.example.com:8443, matches that exact host and port and nothing else. Loopback needs no entry, so localhost:3080 and 127.0.0.1:3080 both pass. A 403 you cannot explain is almost always a difference between the name in your URL bar and the names in your trusted list. A 401 is a different problem: the fence let you through, and the browser has no valid session cookie for that authority.

The fence is an origin check. It is not authentication. A browser is forbidden by the browser itself from setting a Host header, so the check does stop a page on some other site from driving your agent. Any client that is not a browser writes that header freely. Treat trustedHosts as a compatibility setting for proxies and a browser request defense, never as authentication or a restriction on who can reach the port.

Option 1: an SSH local forward

Reach for this first, because it adds nothing to the server at all.

ssh -N -L 127.0.0.1:3080:127.0.0.1:3080 you@your-vps

-L opens a listener on your laptop and forwards each connection to 127.0.0.1:3080 as resolved on the VPS. -N means "run no remote command", so the session carries the forward and nothing else. Writing the local side as 127.0.0.1:3080 rather than a bare 3080 is deliberate: it pins the laptop-side listener to loopback, so a GatewayPorts setting in your SSH client config cannot quietly republish the agent to the network you are sitting on.

Now open the launch URL DSH printed, token and all, in your laptop's browser. Because the forward listens on 127.0.0.1:3080, the printed http://127.0.0.1:3080/?token=... works unchanged. The bare http://localhost:3080 is not enough in a fresh browser session: without the cookie, DSH answers with a 401. After the first visit the cookie carries you, but it is host-only, so keep using the name you first opened, because a cookie set for 127.0.0.1 is not sent to localhost. The Host header is a loopback authority, so the /api fence passes with no configuration at all. The current DSH UUID implementation uses crypto.getRandomValues(), so it no longer depends on the secure-context-only crypto.randomUUID() to boot.

Add -f so ssh moves itself to the background once authentication completes:

ssh -f -N -L 127.0.0.1:3080:127.0.0.1:3080 you@your-vps

The honest trade-off. Nothing new listens on a public address and no firewall rule changes, so this is the smallest possible increase in exposure. Your whole access control is your SSH configuration, which makes key-only SSH with password login disabled a prerequisite rather than a nice extra. The cost is that the tunnel belongs to one client session. It dies when the laptop sleeps, you restart it by hand, and it gives you nothing on a phone.

Option 2: Tailscale serve on the VPS

Tailscale builds a private network between your own devices. Installing it on the VPS gives that machine a 100.x.y.z address reachable through Tailscale, and your access control policies decide which devices may connect. Sharing the machine extends that access to an outside user's devices.

Joining that network is not enough, and this is where people get stuck. DSH is not listening on the 100.x.y.z address, because it is listening on loopback. A browser pointed at http://100.x.y.z:3080 gets a connection refused, since no socket is bound to that address. --host does accept that concrete address, but a non-loopback bind serves plain HTTP unless you configure TLS. DSH warns about a non-loopback HTTP bind at startup; the loopback listener used here does not trigger that warning. The current UUID implementation works without a secure context, but plain HTTP still exposes the launch token and cookie on that HTTP leg.

tailscale serve is the piece that connects the two. It runs on the VPS, accepts traffic from your private network, and proxies it to a local address:

curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
sudo tailscale serve --bg --https=443 localhost:3080
tailscale serve status

tailscale serve status prints the URL, in the form https://<machine>.<tailnet>.ts.net/. Start DSH with that name trusted, or /api returns 403 exactly as described above:

dsh web --public-url https://your-vps.your-tailnet.ts.net/ --trusted-host your-vps.your-tailnet.ts.net

--public-url sets the printed and opened startup URL, DSH_WEB_URL, and the Web GUI URL in the agent's runtime context, so the launch URL comes out under the tailnet name and opens on your phone as it is. It admits nothing by itself, which is why --trusted-host is still there. The printed URL carries a live credential, so paste it only into your own devices.

Tailscale terminates real HTTPS with a certificate issued for that name, protecting the launch token and session cookie between your browser and the VPS. The service is not exposed to the public internet: serve accepts Tailscale traffic, including access granted through machine sharing.

Do not substitute tailscale funnel here. It is the same command family aimed at the public internet, and it would put an agent with shell access on a hostname anyone can resolve. Read how serve keeps traffic inside your tailnet while funnel publishes it before typing either one. For the phone-shaped version of this whole setup, see reaching a self-hosted agent from your phone.

The trade-off is a dependency. Every device that needs the UI must use Tailscale with access to the VPS, through your tailnet or machine sharing, and a coordination server you do not run manages network membership. If that is unacceptable, a self-hosted Headscale control server speaks the same protocol on hardware you own.

Option 3: an authenticated TLS reverse proxy

Use this when the browser cannot join a private network, for example a machine you do not administer. You are publishing a hostname to the internet now, so the authentication has to be real and it has to come from the proxy. DSH's launch token is one bearer credential in a URL, shared by everyone who holds it, so it does not count as that layer.

TLS means transport layer security, the encryption behind https://. Point nginx at the loopback port and put a password in front. The map block belongs in the http context, so give it its own file under /etc/nginx/conf.d/:

map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}

Then the site itself:

server {
    listen 443 ssl;
    server_name dsh.example.com;

    ssl_certificate     /etc/letsencrypt/live/dsh.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/dsh.example.com/privkey.pem;

    auth_basic           "dsh";
    auth_basic_user_file /etc/nginx/dsh.htpasswd;

    location / {
        proxy_pass http://127.0.0.1:3080;
        proxy_http_version 1.1;
        proxy_set_header Host              $host;
        proxy_set_header Upgrade           $http_upgrade;
        proxy_set_header Connection        $connection_upgrade;
        proxy_set_header X-Forwarded-For   $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_cookie_flags ~ secure;
        proxy_read_timeout 3600s;
        proxy_buffering    off;
    }
}

Create the password file, test, and reload:

sudo apt install -y apache2-utils
sudo htpasswd -c /etc/nginx/dsh.htpasswd you
sudo nginx -t && sudo systemctl reload nginx

nginx -t should print syntax is ok and test is successful. If it prints an error instead, nginx keeps serving the old configuration, so nothing is broken yet. Then start DSH with the public name trusted, because proxy_set_header Host $host forwards dsh.example.com and the fence rejects it otherwise. --public-url makes the printed launch URL use that name, so you can open it directly:

dsh web --public-url https://dsh.example.com/ --trusted-host dsh.example.com

Three directives there are load-bearing. The Upgrade and Connection headers let the UI establish its WebSocket connection; without them the upgrade fails. proxy_read_timeout 3600s raises the allowed gap between upstream reads from the 60-second default to one hour; it is not a limit on the total agent run. proxy_cookie_flags ~ secure marks DSH's session cookie Secure on the HTTPS leg, which DSH's public deployment guide asks the proxy to do, because a plain-HTTP backend issues the cookie without it. DSH can also serve HTTPS itself with --tls-cert and --tls-key, but it never obtains or renews certificates and adds no password, so it does not replace the proxy here. The reasoning behind the rest is in an nginx reverse proxy config explained directive by directive, and the choice of proxy itself in nginx compared against Caddy and Traefik.

Be clear about what basic auth buys you. It stops drive-by scanners, and it is far better than an open port. It is also one shared password in front of a shell, with no second factor and no way to revoke one person while everyone uses the same login. Anyone who learns it and holds a launch URL or session cookie can run commands as the user DSH runs as. If several people need access, put a real identity proxy in front instead, and read the safety rules for running a coding agent on a VPS before widening it further.

What happens if you bind to 0.0.0.0 and open the port

The obvious shortcut is to rebind and open the firewall. DSH blocks the wildcard half. --host refuses 0.0.0.0, and the @deepseek-ai/dsh-host-webserver plugin rejects the unspecified address in every spelling when its configuration loads, 0.0.0.0, :: and the IPv4-mapped forms included. What host does accept is one concrete IPv4 or IPv6 address literal, so naming your public IP is a setting DSH will take. Community plugins exist that replace the webserver row to bypass its wildcard rejection. They ship with warnings, and the warnings are accurate. The same plugin layer is far more useful pointed the other way, where spend caps and tool permission rules narrow what the agent may do instead of widening where it listens.

Here is what a public bind without TLS actually gives you. Port 3080 answers on your public IP address over plain HTTP. DSH does print a warning at startup when a non-loopback bind serves plain HTTP, but a warning is all it is: the listener still opens. There is no login page. The launch token is the only lock, and it crosses the internet in cleartext inside the URL, as does the session cookie after it. The /api fence inspects a Host header that any non-browser client writes for itself, and it admits the bind address on any port anyway, so listing your address in trustedHosts changes nothing for an attacker holding curl. DSH's own deployment guide says that neither the advertised URL nor the fence protects the listening port itself. Behind that port is an agent that runs shell commands as your user, together with the credentials under $DSH_HOME, which is where DSH keeps profiles and API keys. One sniffed token or cookie is remote code execution on your server with your provider bill attached. Scanners sweep the whole address space continuously, so an unlisted IP is not a control. Every secret the agent can read leaves with the shell.

Every method above exists so that you never have to do this. The SSH forward is the right default for one person on one laptop. Move to tailscale serve when a phone is involved or when you want a real certificate, and keep the public reverse proxy for the case where a browser you do not administer has to reach the UI, with real authentication in front of it.

FAQ

Why does http://127.0.0.1:3080 not open from my laptop?

Because 127.0.0.1 means "the machine reading this address". DSH prints it on the VPS, where it is correct. Your laptop reads the same string and looks at its own loopback interface, where nothing is listening. Check the server side with ss -ltnp | grep 3080 on the VPS. A line showing 127.0.0.1:3080 means DSH is running and bound to loopback on purpose. What you need is a tunnel or a proxy, not a different bind address, and then the full launch URL with its token.

Can I run dsh web with --host 0.0.0.0?

No. The repository CLI reference, checked on 4 November 2026, says --host must name one concrete local address, not a wildcard, and that --host 0.0.0.0 exits with a usage error. The webserver plugin rejects the same address when its configuration loads. A concrete address such as your public IP is accepted, but without TLS it serves plain HTTP, which DSH warns about at startup, so the launch token that guards a shell crosses the network in cleartext. Community plugins bypass the wildcard check. If you use one, the firewall and the transport security become your responsibility.

Why do all /api calls return HTTP 403 behind my reverse proxy?

The /api trust fence refuses any request whose Host header is neither a loopback address, the listener's bind address, nor listed in trustedHosts. Behind a proxy that header carries your public name, so the fence rejects it and the browser logs transport failure for /api/host.describe: HTTP 403. Start DSH with --trusted-host <your name> and make it match the name in your URL bar. A port-less entry matches that name on any port, while an entry with a port must match host and port exactly. If the calls return 401 instead, the fence passed and the browser has no valid session for that authority, so open the printed launch URL with its token.

Why does the DSH UI load but never finish starting over plain HTTP?

The current DSH UUID implementation uses crypto.getRandomValues(), which works outside secure contexts, so the former crypto.randomUUID() boot failure no longer explains this symptom. Check the browser's failed requests: 403 points to the Host/Origin fence, while 401 points to missing or invalid credentials. Open the full launch URL with its token and check --trusted-host against the browser-visible authority. Keep HTTPS or an SSH forward for remote access, because plain HTTP still exposes the launch token and session cookie on that leg.

Which method should a single developer use?

The SSH local forward. It adds nothing to the server, changes no firewall rule, and reuses the SSH key you already trust. Run ssh -f -N -L 127.0.0.1:3080:127.0.0.1:3080 you@your-vps, then open the launch URL DSH printed, http://127.0.0.1:3080/?token=..., with its token intact. Move to tailscale serve once you want the UI on a phone, or want access that survives the laptop going to sleep.

Was this article useful?