Docs cipi.yml Web panel API MCP Guides Compare GitHub Telegram channel
  1. Docs
  2. Deploy
  3. cipi.yml

cipi.yml

Configuration that travels with your code.

Deploy

cipi.yml describes, in your repository, how the server should run the app: aliases, PHP settings, databases, workers, scheduler, health check, backups, routes, deploy options, crons. Server configuration gets reviewed, versioned and deployed like code.

cipi.yml
$ cipi yml plan shop
$ cipi yml apply shop
$ cipi yml auto shop on
Step 1 of 4Commit cipi.yml

Put cipi.yml at the root of the repository, next to composer.json, and commit it like code.

Commands#

CommandDoes
cipi yml generate myapp [--save]Write the app's current setup as a ready-to-commit file
cipi yml example myappA commented template that validates as is
cipi yml validate myappParse and check; change nothing
cipi yml plan myapp [--json]Show every change that would be made
cipi yml apply myapp [--yes]Apply it
cipi yml auto myapp on|off|statusApply automatically after every successful deploy
cipi yml post-deploy myappRun the deploy.post steps now

Start from what you have: cipi yml generate myapp > cipi.yml, commit, and plan reports nothing to do. Validate locally or in CI with Cipi Agent: php artisan cipi:yml validate.

The file is read from the live release (current/ or, for custom apps, htdocs/), then shared/. Every vhost refuses to serve it.

The file#

yaml
version: 1

app:
  php: "8.6"                       # must be installed
  aliases: ["www.myapp.com", "*.myapp.com"]   # replaces the current list
  ini: { upload_max_filesize: 50M, memory_limit: 512M }
  limits: { memory_limit: 512M, fpm_max_children: 10 }

databases:                         # extra databases: myapp or myapp_*
  - name: myapp_reporting
  - name: myapp_analytics
    engine: pgsql

workers:
  horizon: false                   # true replaces the queues below
  reverb: false
  queues:
    - { queue: default, processes: 2 }
    - { queue: emails, processes: 1, tries: 5, timeout: 300 }

schedule: true
search: false                      # Meilisearch for Scout

health:
  url: "https://myapp.com/up"      # must be one of the app's domains
  expect: 200
  rollback_on_unhealthy: true

deploy:
  branch: main
  keep_releases: 5
  predeploy_snapshot: true
  node_build: "npm ci && npm run build"
  post:
    - artisan cache:clear

ssl: { force_https: true }
env: { required: [STRIPE_KEY, MAIL_HOST] }   # names only, never values

crons:
  - { every: 30m, run: artisan queue:prune-batches }

backup:
  profiles:                        # names: myapp or myapp-*
    - { name: myapp-db, scope: db, every: 30m, keep: 48, destinations: [local] }
    - { name: myapp-nightly, scope: all, cron: "0 2 * * *", keep_days: 14, destinations: [s3], encrypt: true }
SectionSame asNotes
app.php, app.inicipi php / iniPer-app; server-wide ini stays with cipi ini
app.aliasescipi aliasAuthoritative: a removed alias is removed
app.limitscipi app limitsOut-of-range values block the plan instead of being clamped
databasescipi dbCredentials go to shared/cipi-databases.env, never to the repo
workers, scheduleQueues, Reverb, SchedulerLaravel apps only
searchcipi searchNeeds cipi search install by root first
healthHealth checksProbed every 5 minutes and after every deploy
deploydeploy-configbranch takes effect from the next deploy
ssl.force_httpscipi ssl forceCan only be turned on from the file
env.requiredA missing variable blocks the plan
cronsAllowlisted runners only; your other cron lines are untouched
backup.profilescipi backupThe file owns the profiles it created

Routes: www, basic auth, redirects, proxies#

yaml
app:
  aliases: ["www.myapp.com"]
  www: to-root                     # to-root | from-root | none
  basic_auth:
    users:
      - admin                      # keeps the password set on the server
      - { name: preview, password_hash: "$2y$12$…" }   # bcrypt or SHA-512 only
redirect: { to: "https://new.example.com", code: 301, keep_path: true }
redirects:
  - { from: /old-page, to: /new-page }
  - { from: /blog/, to: "https://blog.myapp.com/", code: 308 }
proxies:
  - { prefix: /api/, upstream: "http://127.0.0.1:3000", strip_prefix: true }

Routes apply as one change: one vhost rewrite, one nginx -t, reverted as a whole if Nginx refuses it. No passwords in the repository: users are names or strong hashes.

Staging and production from one repository#

Each app has an environment label (production by default; set with --env on create, clone or edit). An app reads cipi-<env>.yml first and falls back to cipi.yml.

FileRead byTypically
cipi-staging.ymlapps with --env=stagingdeploy: { branch: develop }
cipi.yml (or cipi-production.yml)production appsdeploy: { branch: main }
bash
cipi app clone shop --domain=staging.shop.com --name=shop-stg --env=staging
cipi yml plan shop-stg     # deploy branch: main → develop (from the next deploy)

The server decides which file an app reads, never the file itself: a commit cannot point production at the staging file. An invalid cipi-<env>.yml does not fall back silently; the error names it.

Node apps: node:#

yaml
node:
  framework: next                  # next nuxt sveltekit astro remix vite
  mode: ssr                        # spa | static | ssr
  version: 22
  start: npx next start -H 127.0.0.1

Applied by the deploy itself, from the release being deployed, so the commit that changes the build is built with it. Requires cipi yml auto myapp on.

Post-deploy steps: deploy.post#

Commands run from the live release after every successful deploy, webhook included. They need no auto-apply.

yaml
deploy:
  post:
    - artisan scout:import --force
    - composer dump-autoload -o
    - node scripts/warm-cache.mjs
    - { run: artisan, command: view:cache }
  post_on_failure: warn            # or abort: cipi deploy fails too
Allowed runnersRefused
artisan, composer, npm, npx, yarn, pnpm, php/node + a script inside the releaseshells, pipes, ;, .., artisan tinker, unknown commands

Order of a deploy: build → swap → cipi yml apply (if auto) → deploy.post → health check → notification.

Auto-apply#

Nothing on the server changes from the file until you run cipi yml auto myapp on. Then every successful deploy (CLI, panel, API or webhook) reconciles. A release without the file is a no-op; an invalid or blocked file is reported (yml_fail) and never partially applied, and the deploy itself still succeeds.

Why it is safe to accept over Git#

Anyone who can push controls the file, so it is fail-closed:

GuardEffect
Configure onlyIt can never create, rename or delete an app
NamespacedDatabases and backup profiles must belong to the app
Own domains onlyThe health check can't aim the server at internal addresses
No shellOnly allowlisted runners; unknown keys are errors
Small YAML subsetAnchors, aliases, tags, merges and block scalars are refused
Strict proxiesCipi's own ports, link-local and cloud-metadata addresses are refused
Server-only settingsDisk limit and which environment file is read can't be changed from the file

With auto-apply on, push access to the repository means control over this app's configuration. Treat write access accordingly.