A hassle-free way to deploy your own JetKVM Cloud infrastructure. This repository provides a unified setup including the Cloud UI, API, and a PostgreSQL database, all pre-configured to work together.
- Custom Cloud UI Dockerfile: JetKVM donesn't provide one at the time.
- Unified Docker Compose: Deploys UI, API, and DB in one command.
- Deployment Shell Script: Automates cloning of freshest versions and building with your variables.
- Step-by-step Guide: To get all this working without a headache.
Before running the script, you need to prepare your environment variables and Google Cloud credentials.
To allow users to log in, you need a free Google Cloud project:
- Go to Google Cloud Console.
- Create a "Testing App" under the OAuth consent screen.
- Go to Credentials -> Create Credentials -> OAuth Client ID.
- Select Web Application.
- Authorized JavaScript origins: Add
https://your-ui-domain.comandhttps://your-api-domain.com - Authorized redirect URIs: Add
https://your-api-domain.com/oidc/callback,https://your-api-domain.com/oidc/callback_o,https://your-api-domain.com/oidc/google. - Copy your
Client IDandClient Secret.
Edit two files in the root directory: env-ui and env-api.
env-ui configuration:
# Your Cloud API URL
VITE_CLOUD_API=https://your-api-domain.comenv-api configuration:
PORT=5172
DATABASE_URL="postgresql://jetkvm:jetkvm@api-db:5432/jetkvm?schema=public"
# Google Auth
GOOGLE_CLIENT_ID=your_id
GOOGLE_CLIENT_SECRET=your_secret
# URLs
API_HOSTNAME=https://your-api-domain.com
APP_HOSTNAME=https://your-ui-domain.com
# Storage & Security
COOKIE_SECRET=ChangeThisToSomethingSecureAndLong
CORS_ORIGINS=https://your-ui-domain.com
# Reverse Proxy Header
# =X-Real-IP for Nginx
# =CF-Connecting-IP for Cloudflare
# =X-Forwarded-For for Traefik/Haproxy/Nginx
REAL_IP_HEADER=X-Real-IPThe provided deploy.sh script does the following:
- Cleans up old builds.
- Clones the latest stable versions of jetkvm/kvm and jetkvm/cloud-api.
- Copies UI Dockerfile and your .env files to cloned local repos.
- Spins up the entire stack using Docker Compose.
git clone https://github.com/Cheblan/jetkvm-selfhost.git
cd jetkvm-selfhost
chmod +x deploy.sh
./deploy.sh- Add self-hosted coturn TURN server deployment once support is merged in the API: jetkvm/cloud-api#53
- Add description on email allowlist once it's merged in main: https://github.com/jetkvm/cloud-api/commit/8596c72b29403f99418ddb893a332f1d7ce94432