Skip to content

serve

Start the web UI server.

clonit serve [flags]
Flag Type Default Description
--host string 127.0.0.1 Host to bind to
--port int 8484 Port to listen on

Starts an HTTP server that serves the Clonit web UI and REST API. The web UI provides a browser-based interface for the full Clonit workflow – managing targets, building and loading snapshots, running sanitization analysis, connecting to Clonit Cloud, and more.

The server binds to 127.0.0.1:8484 by default. Use --host and --port to override, or set server.host and server.port in your config file.

The server handles graceful shutdown on SIGINT and SIGTERM.

The web UI at http://127.0.0.1:8484 includes the following pages:

Overview of your Clonit instance with target, snapshot, and storage profile counts, total snapshot size, and a table of recent snapshots.

Create, edit, and delete database targets. Each target detail page provides:

  • Connection verification – test source, destination, and sanitization database connectivity
  • Tool status – detect local tool versions (pg_dump, pg_restore, psql), query server versions, and check compatibility
  • Snapshots – list snapshots with local/remote sync status indicators
  • Build – trigger a snapshot build directly from the UI
  • Sanitization analysis – run AI-powered column sensitivity analysis using an LLM to detect PII and generate sanitization SQL
  • Query editor – view, edit, and create sanitization queries
  • Ephemeral sanitize – run the full sanitize pipeline in a Docker container with real-time step-by-step progress

View snapshot details including size, checksum, and creation date. Push snapshots to cloud storage or delete them.

Create, edit, delete, and verify S3/R2 storage profiles.

When connected to Clonit Cloud, view and manage:

  • Cloud targets – view, update, and delete targets synced to the cloud
  • Cloud snapshots – view snapshots stored in the cloud, toggle sharing within your organization
  • Shared snapshots – filter to see only snapshots shared within the org
  • Cloud storage profiles – manage cloud-side storage configurations

Configure your Clonit Cloud connection and manage your organization:

  • Cloud configuration – set the cloud URL and API key, test connectivity, register the agent
  • Organization – view org details (name, slug, plan) and member list
  • API keys – create and delete API keys with secure display of newly created keys
  • Registered agents – view and manage agent registrations
  • SSO status – view OIDC/Okta SSO configuration status for your organization

Start the web UI with default settings:

clonit serve

Start on a custom port:

clonit serve --port 9090

Bind to all interfaces:

clonit serve --host 0.0.0.0

The web UI communicates with the backend via a REST API at /api/v1. Key endpoints include:

Method Path Description
GET /api/v1/health Health check
GET /api/v1/stats Dashboard statistics
GET /api/v1/targets List targets
POST /api/v1/targets Create target
PUT /api/v1/targets/{id} Update target
DELETE /api/v1/targets/{id} Delete target
POST /api/v1/targets/{id}/build Build snapshot
POST /api/v1/targets/{id}/verify Verify connectivity
GET /api/v1/targets/{id}/tool-status Tool/server version status
POST /api/v1/targets/{id}/analyze Trigger sanitization analysis
POST /api/v1/targets/{id}/ephemeral-sanitize Start ephemeral sanitize
GET /api/v1/snapshots/{id} Get snapshot
POST /api/v1/snapshots/{id}/push Push snapshot to storage
GET /api/v1/storage-profiles List storage profiles
GET /api/v1/cloud/status Cloud connection status
GET /api/v1/cloud/org Organization info
GET /api/v1/cloud/api-keys List API keys
GET /api/v1/cloud/sso/config SSO configuration status

For frontend development with hot module replacement (HMR), run the Go backend and Bun dev server in parallel:

Terminal window
# Terminal 1: Start the Go API server
go run . serve
# Terminal 2: Start the Bun dev server (proxies /api/* to :8484)
cd ui && bun dev

The Bun dev server runs on port 3000 and proxies API requests to the Go backend on port 8484.

The server settings can also be configured in ~/.config/clonit/config.yaml:

server:
host: "127.0.0.1"
port: 8484

Environment variables are also supported via the CLONIT_ prefix:

Terminal window
CLONIT_SERVER__HOST=0.0.0.0 CLONIT_SERVER__PORT=9090 clonit serve