MeridianDocsSign in
Operate

Deploying to your servers

One command to build, ship and start Meridian on infrastructure you own — like git push heroku.

Add a remote

shell
meridian remote add production ssh://deploy@203.0.113.10:22/opt/meridian \
  --domain trust.acme.eu
OptionMeaning
ssh://user@host:port/pathSSH target and the folder Meridian lives in on the host (default /opt/meridian)
--domainPublic hostname. Enables automatic HTTPS through Caddy
--no-shadowDon't install Shadow on the host. By default it is installed with Meridian: an egress proxy for the host's other workloads, enrolled in your company's Shadow Hub workspace as a server

Remotes are stored in meridian.toml. List them with meridian remote list.

Configure production

shell
cp .env .env.production

Set at least MERIDIAN_PUBLIC_URL=https://trust.acme.eu and your model key. See Environment variables.

Deploy

shell
meridian deploy production            # add --dry-run to print every step first
  1. Builds the backend, frontend and Shadow images locally for linux/amd64.
  2. Streams them to the host with docker save | gzip | ssh … docker load. No registry is needed.
  3. Uploads the production Compose file, the Caddyfile and .env.production (as .env).
  4. Starts the stack. Caddy terminates TLS with automatic certificates for your domain.
  5. Waits for /api/health and prints the URL.

Host requirements: Docker with Compose, SSH key access for the deploy user, and ports 80/443 open if you use a domain.

Behind a proxy you already run

When ports 80 and 443 on the host belong to another proxy, use deploy/docker-compose.shared.yml: it drops the bundled Caddy and joins your proxy's Docker network (EDGE_NETWORK). Route /api/* to meridian-server:8787 with streaming unbuffered, and everything else to meridian-web:3000.

Kubernetes and other platforms

You need two images and the environment variables:

  • backend: deploy/Dockerfile.server, built from meridian-stack/. Mount a persistent volume at /var/lib/meridian.
  • frontend: frontend/Dockerfile, built from meridian-stack/. Set MERIDIAN_API_URL to the backend service.

The backend build fetches Shadow from GitHub at the commit pinned in Cargo.toml. While the Shadow repository is private, pass a token that can read it as a BuildKit secret: GITHUB_TOKEN=$(gh auth token) docker build -f deploy/Dockerfile.server --secret id=github_token,env=GITHUB_TOKEN .. The token is only used for that fetch and never ends up in the image. The optional Shadow egress proxy image (deploy/Dockerfile.shadow) is built the same way, at the same commit.

Route /api/* to the frontend (it proxies to the backend), or directly to the backend with streaming responses unbuffered.