Self-host the DSH Mobile Relay

Deploy the MIT-licensed Relay behind HTTPS, persist its SQLite data, and point both the Android app and computer to one origin.

A private Relay gives you control over the server, storage, logs, and account boundary. Public mobile builds can switch Relay origins without recompilation.

Requirements

Runtime

Docker Compose, or Node.js 18 or newer with the release source package.

Public edge

A stable HTTPS origin with WebSocket support and a reverse proxy to port 8787.

Persistence

Durable storage and backups for the SQLite data under /data.

Deployment shape

One Relay instance for the MVP. Multi-instance coordination is not implemented.

Start the release package

Download dsh-relay-v*.tar.gz from the latest Suite release, extract it, and configure a long random JWT secret.

cp .env.example .env
# Edit .env and replace JWT_SECRET with a long random value.
docker compose up -d --build
curl http://127.0.0.1:8787/health

Put HTTPS in front

Route an HTTPS hostname to port 8787 and allow WebSocket upgrades. Do not publish the raw development HTTP port as the production endpoint. Back up the persistent data directory.

Point both ends to the same Relay

Start DSH with the private origin:

DSH_RELAY=https://relay.example.com npx @deepseek-ai/dsh web

On the mobile login screen, tap Relay. After login, the same control is underSettings > Relay Server. Enter the exact HTTPS origin used by the computer.

Changing Relay logs out the current account because accounts and tokens are isolated between Relay instances. Read the full Relay README for environment variables, storage details, and resource limits.

Security boundary

Version 0.1.4 keeps DSH session content end-to-end encrypted with either the hosted or a private Relay. Self-hosting additionally gives you control over account data, traffic metadata, TLS termination, storage, and logs. Review the current security model before exposing the service to users.