Coolify
Coolify deploys applications as long-running Docker containers, so it takes the same snapenv run pattern as Railway, Render, and Dokploy — wrap the process instead of managing a secrets list in Coolify's own UI.
Set the bootstrap variables
In your Coolify application → Environment Variables, add only these three:
SNAPENV_TOKEN=snp_live_xxxxxxxxxxxx
SNAPENV_PROJECT=4fac4b02-...
SNAPENV_ENV=prodOverride the start command
If the image has curl available, set the start command in the application's general settings to install and run in one step:
bash
curl -fsSL https://get.snapenv.io/install.sh | sh && export PATH="$HOME/.local/bin:$PATH" && snapenv run --all -- node dist/server.jsOr install the CLI in your Dockerfile
dockerfile
FROM ghcr.io/snapenv-io/cli:latest AS snapenv
FROM node:20-alpine
COPY --from=snapenv /usr/local/bin/snapenv /usr/local/bin/snapenv
WORKDIR /app
COPY . .
RUN npm ci
CMD ["snapenv", "run", "--all", "--", "node", "dist/server.js"]Notes
- The install script puts the binary in
~/.local/bin, which isn't onPATHyet inside that same command — theexport PATH=...between install andsnapenv runis required, or you'll hitsnapenv: command not found. - Coolify is commonly self-hosted alongside SnapEnv itself — in that setup, secrets never leave infrastructure you control at any point in the pipeline.
- Redeploy after rotating a secret in the dashboard —
snapenv runresolves values once, at process start, not continuously.