Quickstart
Get up and running with Unkey development quickly. Choose your development path based on what you're working on.
Getting Started
Universal Prerequisites
You'll need these tools regardless of your development path:
Initial Setup
Clone the repository and install dependencies:
This sets up the Go workspace and installs all web dependencies.
Choose Your Development Path
Select the path that matches what you're working on:
Path A: Frontend Development (Dashboard)
Perfect for: Working on the dashboard UI, components, and frontend features.
Setup: Quick and simple - all backend services run automatically in the background.
Start Dashboard Development
Run the local development setup:
This will:
- Start required databases and services with Docker Compose
- Create necessary
.envfiles if they don't exist - Launch the dashboard development server
What you get:
- Dashboard running at
http://localhost:3000 - All backend services running in Docker containers
- Hot reload for frontend code changes
- Simple, minimal setup focused on UI development
Path B: Backend Development (Go Services)
Perfect for: Working on API services, backend logic, database schemas, and infrastructure.
Setup: Full Kubernetes environment with hot reload for Go services.
Additional Prerequisites
In addition to the universal tools, you'll need:
- Go (for Go development)
- Minikube (local Kubernetes cluster)
- Tilt (development orchestrator)
- ctlptl (cluster management)
- mkcert (local TLS certificates)
- Homebrew (recommended for easy tool installation)
Installation Options
Option 1: Automated Installation (Recommended)
This uses Homebrew to install Minikube, Tilt, and ctlptl automatically.
Option 2: Manual Installation Install tools individually using your preferred method if you're not using Homebrew.
System Requirements
The Kubernetes setup requires more resources:
- RAM: At least 8GB recommended
- CPU: 4+ cores recommended
- Storage: 20GB+ free space
- Docker Desktop or similar container runtime
Depot Configuration (Build Service)
Unkey uses Depot as part of the deployment pipeline during development.
Current Setup (Required for now):
Note: We're working on making Depot optional soon.
Start Backend Development
Start Kubernetes Development Environment
Run the full development setup:
This will:
- Configure and start Minikube cluster
- Launch Tilt development interface
- Build and deploy all services to Kubernetes
- Set up hot reload for Go services
What you get:
- Tilt UI at
http://localhost:10350(unified development interface) - Services accessible on localhost ports:
- API:
http://localhost:7070 - Ctrl:
http://localhost:7091 - Krane:
http://localhost:8070 - Dashboard:
http://localhost:3000
- API:
- Hot reload for Go services (automatic rebuild on code changes)
- Production-like Kubernetes environment
Local HTTPS with Frontline (Optional)
To test the full request flow with TLS termination via Frontline, you can enable local HTTPS for *.unkey.local domains.
Prerequisites:
- mkcert - for generating trusted local certificates
- DNS configured to resolve
*.unkey.localto127.0.0.1(viasetup-wildcard-dns.sh)
Setup:
Start the Tunnel
In a separate terminal, start the minikube tunnel to bind ports 80/443:
Keep this running while developing.
How it works:
- Tilt automatically generates trusted TLS certificates using mkcert on first run
- Frontline terminates TLS on port 443 and routes requests based on hostname
- The minikube tunnel binds the LoadBalancer service to your host's ports 80/443
Stop Development Environment
When you're done developing:
This cleanly shuts down the Minikube cluster and cleans up resources.
Environment Configuration
Local Authentication
Unkey has a built-in local auth mode with a permanently logged in user belonging to a single organization. This is perfect for development and testing.
Set this environment variable in your .env file:
Optional Services
WorkOS Authentication (for multi-workspace scenarios):
AUTH_PROVIDER="workos"WORKOS_CLIENT_ID=<your client ID>WORKOS_API_KEY=<your API key>WORKOS_COOKIE_PASSWORD=<your base64 generated password>
Stripe Billing (for multi-user workspaces):
STRIPE_SECRET_KEY=<your Stripe secret key>
Common Development Tasks
Running the Unkey CLI
Use make unkey to run any CLI command with your local .env file loaded:
For commands that need flags with --, use the ARGS variable:
Seeding Local Data
Before running services locally, seed your database with test data:
This creates everything you need to start making API requests locally.