Skip to content
Public template

About

VibeBuildy SaaS edition template: Git is the control plane (control-plane deploy, ADR 0004)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

VibeBuildy edition template (SaaS and private)

Your edition of VibeChat as a Git repository: the repository is the control of your install (ADR 0004). Change edition.json (or VERSION), push, and the deploy workflow runs control-plane deploy: it checks the edition and the license, downloads the releases and verifies SHA256SUMS, uploads everything over SSH, snapshots the data, restarts, checks health and rolls back on failure. All the logic is in the binary; the workflow only installs it and passes the Secrets, so on another forge (GitVerse, GitLab, Forgejo) you run the same command with the same variables.

Edition (profile in edition.json) What is deployed Server
saas-ru, saas-eu (license extended) the control plane (accounts, billing, cells) from the control-plane release Debian 13, Incus, a service user vibebuildy; daily operations in the cabinet at /_cp/
private-browser (license regular or extended) the vibechat-server package (it carries the Cursor SDK bridge) and Caddy for your domain Debian 13 amd64; your domain's A record points at it; ports 80 and 443
private-server the vibechat-server package Debian 13 amd64; reached over an SSH tunnel by the desktop app, no domain

Start

  1. Use this template (GitHub) to create your own private repository.
  2. Make edition.json in the configurator and commit it (replace the one here; editions/private-browser.example.json is a private-browser example). Check it locally: control-plane edition check --license license.json edition.json.
  3. Prepare the server once (below, by edition).
  4. Set the repository Secrets (Settings, Secrets and variables, Actions): see the table below.
  5. Run the deploy workflow with dry run first, then without.

Prepare the server

SaaS: curl -fsSL https://github.com/buildytech/control-plane/releases/latest/download/install.sh -o install.sh && sh install.sh --edition ./edition.json installs the binary and lays out /opt/vibebuildy and the systemd unit (User=vibebuildy: create that user). Let the deploy user run sudo systemctl stop|start control-plane without a password.

Private (private-browser, private-server): a fresh Debian 13 (trixie) amd64 server, nothing else to install.

  • A deploy user with an SSH key (a key used only for this) and passwordless sudo (deploy ALL=(ALL) NOPASSWD:ALL in /etc/sudoers.d/deploy), or deploy as root. The deploy installs the package with apt-get, writes a systemd drop-in, and restarts the service, so it needs root.
  • private-browser: the A record of your domain (branding.appDomain) points at the server and ports 80 and 443 are open. Caddy is installed by the deploy and gets the certificate by itself (set DEPLOY_TLS=none in deploy.env to use your own proxy: it must forward the domain to 127.0.0.1:18120, keeping the Host header).
  • Pin the server's key: ssh-keyscan -t ed25519 <host> goes to VPS_KNOWN_HOSTS.

Secrets

Secret Required What
VPS_HOST yes Server host name or IP. Without it the workflow runs as a dry run.
VPS_USER yes SSH user on the server.
SSH_KEY yes Private SSH key of that user (a deploy key used only here).
VPS_KNOWN_HOSTS recommended The server's line from ssh-keyscan <host>: pins the server key (else accepted on first use).
LICENSE_FILE recommended The content of your license.json (its host must be the edition's appDomain). Without a valid license the server runs in base mode.
each providers[].keyEnv when pi is a runtime For example VIBECHAT_OPENROUTER_KEY, VIBECHAT_XAI_KEY, VIBECHAT_CLOUDRU_KEY, VIBECHAT_YANDEX_KEY. A provider without its key stays off. The ones above are already wired in deploy.yml; a keyEnv with another name needs one more env: line there.
CURSOR_API_KEY private editions with cursor-sdk Your Cursor API key. The deploy stores it in the server's secrets file (secrets/cursor-key, mode 0600) and removes it from the env file. Optional: leave it unset and paste the key in Studio, Settings, Models and keys; when the Secret is set, every deploy stores it again. SaaS editions cannot use the Cursor SDK.
CP_YOOKASSA_SHOP_ID, CP_YOOKASSA_SECRET_KEY or CP_ROBOKASSA_LOGIN, CP_ROBOKASSA_PASSWORD1, CP_ROBOKASSA_PASSWORD2 SaaS with live billing Payment gateway keys.
CP_MASTER_KEY SaaS openssl rand -base64 32; encrypts login provider secrets in the database.
SECRETS_AGE optional An env file encrypted with age -r <server recipient> -a (ASCII armor), decrypted on the server with /etc/vibebuildy/age.key. Instead of the raw secrets above.

Private editions need only VPS_HOST, VPS_USER, SSH_KEY, VPS_KNOWN_HOSTS, LICENSE_FILE, CURSOR_API_KEY (with cursor-sdk) and the provider keys of the edition; no CP_* secret exists for them.

Secrets travel over SSH stdin into a root-only file on the server (/opt/vibebuildy/control-plane.env for SaaS, /opt/vibebuildy/vibechat-server.env for private editions, mode 0600); they never appear in the logs or in a command line.

First sign-in (private editions)

On the first deploy a sign-in token is written to /opt/vibebuildy/first-login-token (root only; it is not printed in the job log). Read it once: ssh <user>@<host> sudo cat /opt/vibebuildy/first-login-token, open https://<your domain>/ (private-browser), paste the token in the sign-in form, then delete the file (sudo rm /opt/vibebuildy/first-login-token). A new token later: sudo -u vibechat env VIBECHAT_DATA_DIR=/var/lib/vibechat vibechat-server token new (the old one stops working). Then open Settings, Agents: the Cursor agent shows Ready when its key is set.

Updates and backups

  • VERSION is the control-plane release the workflow installs; check-update reports a newer one weekly. Change it, push, and the deploy runs again. DEPLOY_SERVER_VERSION in deploy.env pins the vibechat-server package (default: latest; the license's updates period still applies). The package also has a daily self-update timer (vibechat-update.timer); sudo systemctl disable --now vibechat-update.timer leaves updates to the deploy only.
  • Every deploy snapshots the replaced files and, for private editions, the server's settings and secrets (contour.json, agents.json, secrets/, auth/) in /opt/vibebuildy/backups/ (newest 5 kept) and keeps the previous package for a rollback. Projects live in /var/lib/vibechat/projects: back that folder up yourself (a provider snapshot, or sudo tar -C /var/lib/vibechat -czf projects.tgz projects).

Files

File What
edition.json Your edition (schema: schemas/edition.schema.json).
VERSION The control-plane release to deploy. The check-update workflow tells you when a newer one exists in your channel (channel in edition.json: stable or edge).
deploy.env Non-secret deploy settings: install folder, SSH port, package version, TLS mode (SaaS: stop and start commands, health URL, server settings).
allowed_signers SSH keys that may sign edition.json changes. Checked when security is hardware or max (FIDO2 ed25519-sk keys recommended; max needs two).
editions/ Example editions (private-browser with Pi and the Cursor SDK).

Security levels

security in edition.json: basic (password + TOTP for critical actions), hardware (FIDO2 keys; edition changes must be signed commits), max (two hardware keys + TPM). With hardware or max, sign your commits: git config gpg.format ssh && git config user.signingkey ~/.ssh/id_ed25519_sk.pub && git commit -S.

Other forges

The workflow is thin on purpose: on another forge (GitVerse, GitLab, Forgejo) install the binary the same way and run control-plane deploy with the same variables. Secrets are environment variables (or one JSON object in DEPLOY_SECRETS_JSON, which another forge can build from its own secret store); the SSH key and known_hosts are files passed with --ssh-key and --known-hosts.

About

VibeBuildy SaaS edition template: Git is the control plane (control-plane deploy, ADR 0004)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors