Skip to content

Getting Started

Prerequisites

ToolVersionPurpose
Go1.25+API and CLI
pnpm10+UI dependencies
Node.js22+UI build
PostgreSQL16+Application database
Docker24+Container builds
Nomad1.9+Job scheduling
Consul1.20+Service discovery
sops3.9+Secret encryption
age1.2+Encryption keys

Installation

bash
git clone git@github.com:antiartificial/norn.git
cd norn/v2
make build

This produces two binaries in bin/:

  • bin/norn-api — the API server
  • bin/norn — the CLI

Install the CLI to your PATH:

bash
make install   # copies bin/norn to ~/go/bin/

Database Setup

Create the database (Norn runs auto-migrations on startup):

bash
createdb norn_v2

The default connection string is postgres://norn:norn@localhost:5432/norn_v2?sslmode=disable. Override with NORN_DATABASE_URL.

Development Mode

bash
make dev   # starts API (:8800) + UI (:5173)

The API serves at http://localhost:8800 and the UI at http://localhost:5173.

Configuration

All configuration is via environment variables:

VariableDefaultDescription
NORN_PORT8800API listen port
NORN_BIND_ADDR127.0.0.1API bind address
NORN_DATABASE_URLpostgres://norn:norn@localhost:5432/norn_v2?sslmode=disablePostgreSQL connection string
NORN_UI_DIRPath to built UI assets (for embedded serving)
NORN_APPS_DIR~/projectsDirectory to scan for infraspec.yaml files
NORN_GIT_TOKENGitHub token for cloning private repos
NORN_GIT_SSH_KEYSSH key path for git operations
NORN_API_TOKENBearer token for API authentication
NORN_REGISTRY_URLContainer registry URL (e.g. ghcr.io/username)
NORN_NOMAD_ADDRhttp://localhost:4646Nomad API address
NORN_CONSUL_ADDRhttp://localhost:8500Consul API address
NORN_S3_ENDPOINTS3-compatible storage endpoint
NORN_S3_ACCESS_KEYS3 access key
NORN_S3_SECRET_KEYS3 secret key
NORN_S3_REGIONautoS3 region
NORN_S3_USE_SSLtrueUse SSL for S3 (set false to disable)
NORN_ALLOWED_ORIGINSComma-separated additional CORS origins
NORN_CF_ACCESS_TEAM_DOMAINCloudflare Access team domain
NORN_CF_ACCESS_AUDCloudflare Access AUD tag
NORN_WEBHOOK_SECRETShared secret for GitHub webhook validation

First Deploy

  1. Create an infraspec.yaml in your app directory (must be under NORN_APPS_DIR):
yaml
name: hello-world
repo:
  url: git@github.com:you/hello-world.git
  autoDeploy: true
build:
  dockerfile: Dockerfile
processes:
  web:
    port: 3000
    command: ./server
    health:
      path: /health
    scaling:
      min: 1
  1. Open the dashboard at http://localhost:5173 — your app should appear automatically.

  2. Deploy from the CLI:

bash
norn deploy hello-world HEAD

The pipeline runs 9 steps with real-time progress: clone, build, test, snapshot, migrate, submit, healthy, forge, cleanup.

Next Steps