Skip to Content

Quick Start

This guide walks you through deploying your first application with Jiji.

1. Create Configuration

jiji init

Edit .jiji/deploy.yml:

project: myapp builder: engine: docker ssh: user: deploy servers: web1: host: server1.example.com services: web: build: context: . dockerfile: Dockerfile servers: - web1 proxy: port: 3000 hosts: - myapp.example.com ssl: true healthcheck: path: /health interval: 10s timeout: 5s

2. Set Up Servers

jiji server setup

Installs the container engine and the complete private network (WireGuard, bridge and project agent) for this project on each server.

3. Authenticate the Registry

Only needed for a remote registry (GHCR, Docker Hub, custom) - a local registry needs no credentials:

jiji registry login

4. Build and Deploy

jiji deploy --build # Or as two steps jiji build jiji deploy

5. Verify Deployment

jiji service logs -S web jiji server exec "docker ps" -H web1

What Happens During Deployment

  1. Build - the image is built locally or on a remote builder
  2. Push - pushed to the configured registry
  3. Deploy - the new container starts at a freshly leased address, the old one keeps serving traffic until the new one passes its health check, then the catalog and proxy routes admit it and the old deployment drains

Old images aren’t pruned automatically as part of this flow - run jiji service prune yourself (or on a schedule) to remove old image tags beyond each service’s configured retain count.

Environment-Specific Deployments

Create environment-specific config files alongside .jiji/deploy.yml:

# .jiji/deploy.yml - base config # jiji.staging.yml - staging overrides # jiji.production.yml - production overrides
jiji deploy -e staging jiji deploy -e production

Next Steps

Last updated on