Skip to main content

Deploy

Yard ships with Fabric-style scripts: cross-compile locally, install a systemd unit on the host, verify /healthz.

One command​

./scripts/ship sus@HOST # quick redeploy
./scripts/ship sus@HOST --full # first install + firewall
./scripts/ship sus@HOST --with-sim # also start yard-simulator
./scripts/ship sus@HOST --dry-run
./scripts/ship sus@HOST --port 18080
Default port

Default lab listen port is 18080 (8080 is often occupied). Override with --port or reuse .deploy-last.

Demo login after bootstrap (demo mode only):

admin@yard.local / yard-admin

Production mode​

Set YARD_MODE=production together with:

VariablePurpose
YARD_PUBLIC_URLAbsolute public base URL (required)
YARD_SECRET_KEY32-byte master key for connector secrets
YARD_BOOTSTRAP_EMAIL / YARD_BOOTSTRAP_PASSWORDFirst admin on an empty database
YARD_CORS_ORIGINSComma-separated browser origins
YARD_EGRESS_ALLOWLISTHosts allowed for private-network connector calls
YARD_SMTP_*Required for invite and password-reset delivery

Production never seeds sample assets and refuses the public demo password.

What gets installed​

PathRole
/usr/local/bin/yardAPI + embedded console
/etc/yard/yard.envListen address, DSN, token files
/var/lib/yard/SQLite DB + ingest/simulator tokens
yard.servicesystemd unit
yard-simulator.serviceOptional included simulator

On hosts that previously ran the Estate rename, ship disables estate.service so Yard can bind the listen port.

Verify​

YARD_URL=http://HOST:18080 ./scripts/verify-remote.sh

Checks health, login, overview, assets, connectors, and (when a simulator token is available) the temperature → incident gate (severity policy + runbook attached).

Compose​

docker compose up --build
docker compose --profile postgres up --build

Helm (Kubernetes)​

A starter chart lives at deploy/helm/yard:

helm upgrade --install yard ./deploy/helm/yard \
--set listen=":8080" \
--set oidc.enabled=false
ValuePurpose
listen / databaseUrlProcess bind address and SQLite/Postgres DSN
mode / publicUrl / secretKey / corsOriginsRuntime mode and production hardening
persistence.*PVC for SQLite when not using an external DB
oidc.enabled + oidc.issuer / clientId / clientSecretSets YARD_OIDC_* for discovery, start, and callback login

For remote hosts, prefer make deploy-remote H=<host> U=sus (./scripts/deploy-remote.sh USER@HOST, or ./scripts/ship). Set YARD_URL to a loopback URL inside the process (http://127.0.0.1:<port>) when connectors sync into the same Yard — using the public IP can hairpin-NAT and stall ingest.

Backups​

Auto-detects SQLite vs. Postgres from YARD_DATABASE_URL:

./scripts/backup.sh # snapshot to backups/yard-<timestamp>.db|.dump
./scripts/restore.sh backups/yard-....db # saves the current file as *.before-restore first

SQLite uses sqlite3 ... VACUUM INTO — a live, consistent snapshot that doesn't lock out the running server. Postgres uses pg_dump -Fc / pg_restore --clean --if-exists. Every backup run writes a new timestamped file; nothing is ever overwritten.

Logging​

Every request is logged as one structured line (method, path, status, duration). Set YARD_LOG_FORMAT=json for machine-parseable output in production; the default is plain text, easier to read in a terminal.

After deploy, useful console paths: Assets (bulk CSV/JSON), Map (clustering), Administration (users, API keys, severity policies). See Console features.