Deploying to your servers
One command to build, ship and start Meridian on infrastructure you own — like git push heroku.
Add a remote
meridian remote add production ssh://deploy@203.0.113.10:22/opt/meridian \
--domain trust.acme.eu| Option | Meaning |
|---|---|
ssh://user@host:port/path | SSH target and the folder Meridian lives in on the host (default /opt/meridian) |
--domain | Public hostname. Enables automatic HTTPS through Caddy |
--no-shadow | Don'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
cp .env .env.productionSet at least MERIDIAN_PUBLIC_URL=https://trust.acme.eu and your model key. See Environment variables.
Deploy
meridian deploy production # add --dry-run to print every step first- Builds the backend, frontend and Shadow images locally for linux/amd64.
- Streams them to the host with
docker save | gzip | ssh … docker load. No registry is needed. - Uploads the production Compose file, the Caddyfile and
.env.production(as.env). - Starts the stack. Caddy terminates TLS with automatic certificates for your domain.
- Waits for
/api/healthand 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 frommeridian-stack/. Mount a persistent volume at/var/lib/meridian. - frontend:
frontend/Dockerfile, built frommeridian-stack/. SetMERIDIAN_API_URLto 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.
