Take down a public DSH deployment: proxy, TLS and ports
Taking a public DeepSeek Harness deployment offline is not “stop the dsh process”. If the proxy is still configured, DNS still points, or the GitHub webhook still delivers, the entry remains. Stop the external traffic first, then stop the service, then clean credentials and residual files.
DeepSeek Harness: Inventory the entry points
Write down every door before closing them; otherwise one gets missed. The list:(source)
| Entry | Common location | Teardown action |
|---|---|---|
| DNS / domain | DNS provider | Delete or repoint |
| Reverse proxy | Nginx, Caddy, cloud LB | Disable site or delete route |
| Tunnel | Tunnel client or vendor panel | Stop tunnel, delete mapping |
| DSH listener | Local port 3080 or custom | Stop process, confirm port released |
| GitHub webhook | Repository Settings → Webhooks | Delete subscription |
| GitHub review listener | Local port 3081 | Stop overlay, confirm port released |
| TLS certificate | Proxy or DSH flags | Move out of read path or delete |
Tunnels and webhooks are missed most often. A stopped tunnel can reconnect if the vendor mapping remains; an undeleted webhook makes GitHub keep retrying.
DeepSeek Harness: Four verification commands
Do not rely on memory; verify each entry is gone. Four checks:(source)
- Listening ports —
lsof -i :3080andlsof -i :3081. Expected: no DSH process. - External reachability — from a non-local network,
curl -I https://app.example/. Expected: connection failure or unknown domain, not 502. - Proxy and tunnel — inspect site config, tunnel panel, and system services. Expected: no upstream or autostart pointing at DSH.
- Webhook — check GitHub repository Settings → Webhooks. Expected: the subscription is gone.
Only after these pass should you delete certificates and credentials. Doing it earlier removes the evidence you need to debug an entry that is still open.
DeepSeek Harness: Teardown order
The order matters: cut external traffic, stop the service, then revoke credentials. Steps:(source)
- Cut external traffic — remove DNS, stop the proxy site, or close the tunnel mapping. Expected: the domain fails instead of returning 502.
- Stop DSH — stop
dsh webnormally and confirm port 3080 is free. Expected:lsof -i :3080is empty. - Revoke credentials — clear or rotate the credential that signs session cookies and remove unused provider keys. Expected: old browser cookies cannot validate.
- Clean TLS files — move the certificate and key out of the DSH read path or delete them. Expected: the next start cannot accidentally reuse them.
Be careful with step 3: the credential file may also hold model provider keys. If you still need the model, rotate only the Web-session part or follow the official credential structure instead of deleting the whole file.
DeepSeek Harness: Three deployment shapes, three teardowns
Proxy-terminated TLS, tunnel access, and native TLS need different actions. Compare:(source)
- Proxy-terminated TLS — stop the proxy site, then DSH. Watch: remove the upstream pointing at 3080 along with the site.
- Tunnel access — stop the tunnel client, delete the vendor mapping, then stop DSH. Watch: tunnels often autostart as a system service.
- Native TLS in dsh web — stopping the process closes the listener, but certificate files remain. Watch: remove or move the files referenced by
--tls-certand--tls-key.
If both proxy and native TLS are used, close the outer layer first, then the inner one.
DeepSeek Harness: The GitHub review endpoint
GitHub review is a second listener on 3081 with only POST /github; it does not disappear just because the main UI is closed. Teardown:(source)
- Delete the GitHub subscription — repository Settings → Webhooks. Expected: GitHub stops delivering.
- Stop the overlay process — do not load the github-review patch. Expected: 3081 is no longer listening.
- Remove the experimental packages —
dsh plugin --profile web removethe webhook and GitHub adapter. Expected: they disappear from the profile dependencies. - Clear environment variables — remove
DSH_GITHUB_WEBHOOK_SECRET,DSH_GITHUB_REVIEW_WORKSPACE, and related settings. Expected: a restart does not re-enable the old configuration.
The webhook secret only validates inbound GitHub data; it does not grant the rule or the agent outbound GitHub access. Removing the secret is not the same as revoking the agent’s GitHub permissions.
DeepSeek Harness: Residual checks
After teardown, check from outside and inside; “I stopped it” is not evidence. Checklist:(source)
- External access — domain, IP, and old port from a non-local network. Expected: all unreachable.
- Local listeners —
lsof -i :3080andlsof -i :3081. Expected: no DSH process. - Proxy and tunnel — site configs, vendor panel, system services. Expected: no DSH upstream or autostart.
- Webhook — GitHub subscription gone. Expected: no recent deliveries.
- Certificates and backups — private key not in temp or download folders. Expected: sensitive files cleaned or archived in a controlled location.
If step 1 still opens the page, do not continue deleting files; find the missing entry, often DNS cache, a cloud load balancer, or another tunnel.
Re-deploying later
Treat a later deployment as new, not as a copy of the old one. Three points:
- New token and certificate — the old token is retired and the old certificate may be expired or exposed. Expected: regenerate and verify the chain.
- Reconfigure trusted-host — a changed domain or port no longer matches the old list. Expected: use the current authority.
- Reassess the webhook secret — the old secret may be in logs or backups. Expected: generate a new one and update the GitHub subscription.
Before switching production traffic, verify from a test machine that /api does not return 403.
DeepSeek Harness FAQ
If I only stop dsh, is external access gone? No. The entry still exists and returns 502 or a connection error. For a public deployment, that is not offline.
Can I reuse the same domain later?
Yes. Use a new startup token and certificate, and reconfigure --trusted-host and --public-url; do not reuse old cookies or keys.
Does a local-only DSH need this teardown? No. A loopback-only instance with no proxy or webhook only needs the process stopped. This article is for deployments with external entry points.
The short version: public teardown is complete when external traffic cannot reach the host, old credentials no longer validate, and dedicated endpoints no longer deliver—not when the process disappears.
FAQ
DeepSeek Harness: remove the external entry point before stopping the process. Disable DNS, the reverse proxy site, or the tunnel mapping so browsers can no longer reach the listener, then stop dsh. Stopping first leaves the entry in place and only turns it into a 502.
DeepSeek Harness: the startup token changes on every start, but validating the signed session cookie depends on credentials. To invalidate old cookies reliably, stop the process and clear or rotate the relevant credentials; a restart alone may not revoke every session.
DeepSeek Harness: delete or disable the webhook subscription in the GitHub repository first, then stop the process loading the github-review overlay, remove the two experimental packages and environment variables, and confirm port 3081 is no longer listening.
DeepSeek Harness: if another service uses the certificate, keep it but move it out of DSH’s read path. If it is no longer needed, delete the certificate and key and check for leftover renewal jobs. Do not leave the private key in temp directories or backups.
DeepSeek Harness: from an external network, try the domain, IP, and old port and confirm all are unreachable. On the server, check listening ports, proxy configuration, tunnel processes, and the GitHub webhook subscription. All four must be clean.
Related Terms
- public deployment
- A public deployment exposes the DeepSeek Harness Web UI to browsers outside the host through a domain, reverse proxy, or tunnel, and requires extra TLS, trusted-host, and cookie handling.— DeepSeek Harness docs - Publishing the Web UI behind a reverse proxy
- startup token
- A startup token is a per-process credential printed once by dsh and exchanged for a signed session cookie. Stopping the process retires the token, but existing cookies depend on the credential used to sign them.— DeepSeek Harness docs - Publishing the Web UI behind a reverse proxy
- github-review overlay
- The github-review overlay adds a signed GitHub webhook endpoint to dsh web. It listens on 127.0.0.1:3081 in an isolated realm and registers only POST /github.— DeepSeek Harness docs - GitHub review sessions
- trusted-host
- trusted-host is the dsh web trust fence list that decides which browser authorities may call /api. Remove stale entries during teardown so no one assumes an old entry is still controlled.— DeepSeek Harness docs - Publishing the Web UI behind a reverse proxy