Skip to content

en Deployment

github-actions[bot] edited this page Jul 7, 2026 · 7 revisions

← README · Wiki · 中文

Overview · Features · Tech Stack · Quick Start · Deployment · Project Structure · Architecture · Widgets · API · Database · Settings · Security · Configuration · Roadmap · License

Deploy

Cloudflare Workers

Deploy to Cloudflare

Click the button to connect your GitHub repo and deploy to Cloudflare Workers. The platform auto-detects npm run build and npm run deploy as the build and deploy commands.

Updating

When a new release is available, click the button above again, or trigger a redeploy from Workers Builds in your forked template repo.

When configuring the D1 database, select your existing ternssh database—do not create a new one. This keeps your servers, credentials, dashboards, and other data. npm run deploy runs database migrations automatically.

If Workers Builds is already set up, you usually only need to push the new version or manually trigger a build; you do not need to re-bind the database.

For production auth (Cloudflare Access / Basic Auth), see Security · Authentication.

Docker (self-hosted)

The Docker image runs the full app via Wrangler local mode—good for private networks or a quick trial. Official image: ghcr.io/haradakashiwa/ternssh.

docker run (pre-built image):

docker run -d \
  --name ternssh \
  -p 8787:8787 \
  -v ternssh-data:/app/.wrangler \
  --restart unless-stopped \
  ghcr.io/haradakashiwa/ternssh:latest

docker compose:

docker compose -f docker-compose.ghcr.yml up -d

Pin a version: TERNSSH_TAG=1.0.0 docker compose -f docker-compose.ghcr.yml up -d

Custom port: PORT=8080 docker compose -f docker-compose.ghcr.yml up -d

Build from source: docker compose up -d --build

Open http://localhost:8787 (or your mapped port). Data persists in the /app/.wrangler volume.

Basic Auth setup: Security · HTTP Basic Auth (database credentials).

Clone this wiki locally