docs

VaultKit Deployment Guide

This document explains how to deploy VaultKit in production and production-like environments. VaultKit is designed to be easy to deploy for design partners, while remaining flexible enough for advanced infrastructure setups.

Deploy: github.com/vaultkit-inc/deploy

VaultKit consists of four main components:


How It Works

VaultKit uses a single entry point for both the frontend and backend.

The Console container runs nginx internally. nginx serves the React app and automatically proxies all API and auth requests to the Control Plane over Docker’s internal network. This means:

Browser → Console:5173 → nginx (inside console container)
                              ├── /api/*         → Control Plane:3000
                              ├── /auth/oidc/*   → Control Plane:3000
                              ├── /auth/cli/*    → Control Plane:3000
                              └── /*             → React app

Deployment Models

VaultKit supports two deployment models out of the box.

1. Single-Domain Deployment (Default)

Best for:

One URL serves everything — nginx inside the Console handles routing. No external reverse proxy required.

This is the recommended starting point.


2. Multi-Domain Deployment (Advanced)

Best for:

Example:

https://app.acme.com   → Console (frontend + nginx proxy)
https://api.acme.com   → Control Plane (backend)

No VaultKit images need to be rebuilt — only routing and .env changes.


Prerequisites


Quick Start

1. Clone the Deployment Repository

git clone https://github.com/vaultkit-inc/deploy.git
cd deploy

2. Run the Installer

./scripts/install.sh

This does the following:


3. Configure .env

Edit .env and set APP_HOST and FRONTEND_BASE_URL to wherever VaultKit will be accessed from. Pick the option that matches your setup:


Option A — Local machine

RAILS_ENV=production

APP_HOST=http://localhost:5173
FRONTEND_BASE_URL=http://localhost:5173

DATABASE_URL=postgres://vaultkit:<password>@postgres:5432/vaultkit
FUNL_URL=http://funl-runtime:8080
VKIT_PRIVATE_KEY=/secrets/keys/vkit_priv.pem
VKIT_PUBLIC_KEY=/secrets/keys/vkit_pub.pem

Option B — Remote VM or EC2 (no domain)

RAILS_ENV=production

APP_HOST=http://54.123.45.67:5173
FRONTEND_BASE_URL=http://54.123.45.67:5173

DATABASE_URL=postgres://vaultkit:<password>@postgres:5432/vaultkit
FUNL_URL=http://funl-runtime:8080
VKIT_PRIVATE_KEY=/secrets/keys/vkit_priv.pem
VKIT_PUBLIC_KEY=/secrets/keys/vkit_pub.pem

Replace 54.123.45.67 with your server’s public IP. To find it:

curl ifconfig.me

Option C — Custom domain

RAILS_ENV=production

APP_HOST=https://vaultkit.yourdomain.com
FRONTEND_BASE_URL=https://vaultkit.yourdomain.com

DATABASE_URL=postgres://vaultkit:<password>@postgres:5432/vaultkit
FUNL_URL=http://funl-runtime:8080
VKIT_PRIVATE_KEY=/secrets/keys/vkit_priv.pem
VKIT_PUBLIC_KEY=/secrets/keys/vkit_pub.pem

For Option C, point your domain’s A record to your server’s IP address and configure TLS via Cloudflare or Let’s Encrypt before starting VaultKit.


Note: Both APP_HOST and FRONTEND_BASE_URL always point to the same URL because nginx inside the Console unifies frontend and backend behind a single entry point.


4. Start VaultKit

docker compose up -d

Verify services:

docker compose ps

All four containers should be running:

Container Port Purpose
vaultkit-console 5173 Frontend + nginx proxy — your entry point
vaultkit-control-plane 3000 Backend API (internal only)
vaultkit-funl 8080 Query execution engine (internal only)
vaultkit-db Postgres (internal only)

5. Access VaultKit

Open your browser at whichever URL you configured:

# Option A
http://localhost:5173

# Option B
http://54.123.45.67:5173

# Option C
https://vaultkit.yourdomain.com

Health check:

<your-url>/up

OIDC / SSO Configuration

VaultKit supports OIDC providers such as Okta, Auth0, Azure AD, and others.

For browser-based login the redirect URI must be:

<your-url>/auth/oidc/callback

Most OIDC providers require HTTPS for redirect URIs. For local evaluation without OIDC, skip this step and use token-based access instead.


Multi-Domain Deployment

If you want separate frontend and backend domains:

Required Changes

  1. Update .env:
APP_HOST=https://api.acme.com
FRONTEND_BASE_URL=https://app.acme.com
  1. Configure your reverse proxy to route:

VaultKit images remain unchanged.


Using an External Postgres Database

By default, VaultKit runs Postgres inside Docker.

If you already have Postgres:

DATABASE_URL=postgres://vaultkit:<password>@db.acme.internal:5432/vaultkit

Secrets & Security Notes


Updating VaultKit

docker compose pull
docker compose up -d

Database migrations run automatically on container startup.


Troubleshooting

Containers start but UI shows 502

OIDC redirect loops or 404s

Cannot access the Console


After deployment:


Support

If you are a design partner and need help:


VaultKit is designed to deploy cleanly, predictably, and without surprises. If something feels harder than it should be, that’s a signal — and we want to hear about it.