Skip to content

Add self-hosting deployment guide and interactive setup script - #2

Merged
JDB321Sailor merged 1 commit into
devfrom
copilot/create-self-hosting-guide
Jul 20, 2026
Merged

JDB321Sailor merged 1 commit into
devfrom
copilot/create-self-hosting-guide

Conversation

Copilot AI commented Jul 20, 2026

Copy link
Copy Markdown

Summary

Adds a complete self-hosting option under deploy/ for running the JetKVM cloud API and dashboard on any Docker host.

Changes

  • deploy/setup-deployment.sh — interactive builder that generates everything needed to run the stack in the deploy/ folder:
    • compose.yaml — Traefik v3 reverse proxy, Postgres 16, a one-shot Prisma migration job, the cloud API (built from the repo Dockerfile), and the dashboard UI built directly from a sibling kvm repository checkout and served by Caddy
    • Caddyfile — static SPA file server config for the built dashboard
    • .env (chmod 600) — generated secrets, domains, and OIDC settings matching .env.example
    • setup-deployment.env (chmod 600) — persistent answers file; AUTORUN=true enables fully non-interactive reruns, AUTORUN=false pre-fills prompts with prior answers
    • Three-tier value precedence: exported env var → answers file → interactive prompt/default
    • TLS modes: Let's Encrypt HTTP-01, Cloudflare DNS-01, or internal self-signed
    • Guided OIDC setup for Google, authentik, or Keycloak with the exact redirect URI (https://<api-domain>/oidc/callback)
    • Reruns preserve POSTGRES_PASSWORD and COOKIE_SECRET, so an initialised Postgres volume keeps working
  • deploy/deployment.md — self-hosting guide covering prerequisites, DNS/TLS, OIDC provider registration, running the setup script, custom JetKVM device build pointing at the self-hosted cloud URL, and troubleshooting

Validation

  • bash -n syntax check passes
  • Full non-interactive (AUTORUN=true) run produces a compose.yaml that passes docker compose config
  • Rerun preserves existing secrets in .env
  • Generated .env keys, /oidc/callback route, and /healthz endpoint verified against src/
  • Secret scanning and CodeQL clean

@JDB321Sailor
JDB321Sailor marked this pull request as ready for review July 20, 2026 06:42
@JDB321Sailor
JDB321Sailor merged commit cb5a703 into dev Jul 20, 2026
2 checks passed
@JDB321Sailor
JDB321Sailor deleted the copilot/create-self-hosting-guide branch July 20, 2026 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants