Docs · Get started

Builds, previews & rollbacks.

What actually happens between git push and your app being live — and the levers you have when something goes sideways.

How a build runs

Every deploy builds in an isolated sandbox: its own Linux user, its own memory budget (capped per plan — see the limits), no access to other tenants or platform services. Dependency install scripts are disabled by default for supply-chain safety; if a package genuinely needs its build script (e.g. sharp), allow it explicitly with a canner.allowedBuildScripts entry in your package.json. Your node_modules and framework caches (like .next/cache) persist between builds, so rebuilds are fast.

The build log streams live in the dashboard. When the build succeeds, the running version is stopped (it gets up to 30 seconds to finish its requests), the new one starts on the same port and must answer the health check (respond on / — or your configured path — within 30 seconds). Requests that arrive during that switch can fail, so expect a brief interruption on each production deploy. If the new version fails the health check, it is stopped and auto-rollback decides what happens next.

Release command

A release command runs once per production deploy: after the build succeeds, and before the new version starts. It’s the place for database migrations and seed data — npx prisma migrate deploy, drizzle-kit migrate, php artisan migrate --force, python manage.py migrate. Set it in Settings → Build.

  • It runs with your app’s environment, including DATABASE_URL. If your database gives the app a limited login, turn on Owner login for migrations in the database’s Access settings and the owner connection string is available here as DATABASE_URL_MIGRATE. It’s a session connection, so migration tools that use advisory locks work. Builds and the running app never get it. Variables scoped runtime only aren’t in the release command either.
  • If it fails, the deploy stops and your current version keeps running.
  • It can run for up to 15 minutes. A longer data backfill belongs in a background job, not the release command.
  • It runs on its own, so a command that stops to ask a yes/no question (Would you like to proceed? (y/N)) can’t get an answer from the build. After about 20 seconds of silence at a question, the deploy page shows it and, where answers are turned on, offers Yes and No; with nobody there it stops after 5 minutes and tells you what it was asking. To avoid the question on every deploy, give the command its non-interactive flag (--force for prisma migrate reset and artisan migrate, --accept-data-loss for prisma db push, --noinput for Django’s collectstatic) or pipe the answer in: printf 'y' | your-command.
  • It never runs on preview deploys, because previews share your production database.

Keep migrations out of the build command: a migration there runs before the build is known to be good, and on every preview deploy too.

Files that outlast a deploy

Each deploy starts from a fresh copy of your app, so a file your app writes next to its own code is replaced on the next deploy. For files that must stay, use the data directory: its path is in CANNER_DATA_DIR, it belongs to your app alone, and nothing in it changes when you deploy.

// Node
const db = new Database(path.join(process.env.CANNER_DATA_DIR ?? '.', 'app.sqlite'));

# Python
db = sqlite3.connect(os.path.join(os.environ.get("CANNER_DATA_DIR", "."), "app.db"))
  • It counts toward your organization’s storage, alongside databases, backups and object storage.
  • It’s backed up nightly, and deleted only when you delete the project.
  • Production only: preview deploys don’t get one, so a preview can’t touch production files.
  • A SQLite database your app already keeps next to its code (say, data/app.sqlite) is copied into each new deploy while the app is stopped, so it isn’t lost — unless the new deploy includes a file at that same path, which then wins. Moving it to the data directory is still the better home.

For anything shared between several processes or that needs point-in-time recovery, use a database instead.

Start command

Canner starts your app with the command it detects: your start script, or the framework’s own server. To use a different one, set a start command in Settings → Build. It replaces the detected command from your next deploy.

  • It’s one line, run through sh -c from your app’s directory, so NODE_ENV=production node dist/index.js and pnpm migrate && node dist/server.js both work.
  • Listen on the port in $PORT; Canner puts the number in for you. Any other $VARIABLE comes from your project’s environment.
  • It runs exactly where your start script runs, as your project’s own user, so it can’t reach more than your app already can. Don’t put secrets in it: the command is shown in your deploy log. Use environment variables.
  • Clear the field to go back to the detected command.

Health check

The old version is stopped, then the new one starts on the same port and takes requests as soon as it listens. Canner then requests / on it for up to 30 seconds, and any response below 500 counts as up: a redirect or a 404 is fine, a 500 is not. To check another path, such as /health/ready that answers only once your database is reachable, set the health check path in Settings → Build.

Auto-rollback

When a production deploy fails to start, Canner stops it. With auto-rollback on (the default), it then rebuilds your last good commit and deploys that, so the site comes back on the previous version. Turn it off with the Auto-rollback switch on the project overview and a failed deploy stays stopped until you deploy again.

  • Turn it off when a migration has already changed the database in a way the previous version can’t run against. Rebuilding the old commit would only fail again.
  • It applies to deploys from GitHub. Deploys from the CLI or an upload have no earlier commit to rebuild and stay stopped either way.
  • A failing release command is separate: it stops the deploy before the new version starts, so the current version keeps running.

Preview deploys

With GitHub connected, every pull request gets its own isolated preview at branch--project.canner.app, rebuilt on each push to the branch and cleaned up when the PR closes. A preview never touches the production process, but it runs with the project’s environment variables (those scoped all or preview) and against the project’s production database. See scopes.

Worker projects

A worker is a project with no web server: a Discord bot, a queue consumer, a background job. Canner skips the HTTP health check on /; a deploy succeeds when the process starts and stays up (one that keeps crashing still fails).

Choose Worker when you create the project, or change the project type on its overview. A change takes effect on the next deploy.

If a web project’s deploy never answers on / and there is no earlier live version to fall back to (usually the first deploy), it goes live anyway with a warning instead of failing. The deploy page then offers Redeploy as worker, which switches the project to a worker and rebuilds the same commit (GitHub-connected projects only).

Disk use

Two switches under Settings → Disk use, both off by default. Share identical files hard-links identical files in node_modules between the new version, the previous version and the build cache of the same project after each deploy, so one copy stays on disk. Editing a linked file in place changes it in all of them. Shared package store takes registry packages from a store checked against your lockfile hashes (npm lockfiles only for now); packages from private registries or git always install as private copies, and a file you changed is never replaced. Packages with install scripts are shared too: Canner builds run with scripts off, so the files are the published ones. Linked files are read-only: a write in place fails, and replacing the file works. If your app or a start script changes files inside node_modules, the failed deploy log says which file and names this switch; turn it off and deploy again to get private, writable copies. A build is stopped when the lockfile pins a version with a published malware advisory. Without a lockfile, npm only takes versions released more than three days ago.

Private connections between projects

The projects in one organization can call each other without leaving the server. Each deploy gets one variable per other project: CANNER_PRIVATE_URL_<PROJECT>, for example CANNER_PRIVATE_URL_MY_API=http://127.0.0.1:3430. It is a full URL with an IPv4 address and the port, so there is no name to resolve. A project you add later appears in the variables of the next deploy of the others.

  • It is on for every project. To close one, turn off Private access from my other projects under Settings → Address; the others stop reaching it within a minute.
  • Only projects of the same organization can connect. A project of another organization is refused. Pull-request previews don’t receive the variables.
  • The call skips the public front door: the app sees none of the X-Forwarded-* or X-Canner-* headers, nothing is cached, and a Cloudflare-only rule does not apply. Check a shared secret in the app, as you would on a public address.
  • The project has to be running. A free project that has gone to sleep does not answer until its public address wakes it.

Retry, cancel, roll back

  • Retry re-runs a failed build from the same commit or upload — useful after fixing an env var or when a registry hiccuped.
  • Cancel stops a queued or running build.
  • Rollback rebuilds any previous successful deploy from its commit and deploys it like a new one, so the commit must still be in the repository. Find it on the Deployments tab.

Sleep and wake on the free plan

Starter apps sleep after 3 hours without a request. The next visitor wakes the app automatically — they wait a few seconds while it boots, then everything is normal. Paid plans (Live and up) keep a set number of projects always on — 2 on Live, more with the always-on add-on — which is the thing to upgrade for when a real audience depends on your site.

Logs

The Logs tab streams your app’s runtime output (stdout/stderr) live. Build logs live with each deployment on the Deployments tab. If your app crashes on boot, the health-check failure message in the build log includes the tail of the runtime log — that’s the first place to look. For what specific messages mean, see common build & deploy errors.

Secrets in Canner’s request logs

Canner’s own request logs (the proxy’s access log and the platform’s request log) replace the value of these query parameters with REDACTED, so an OAuth redirect such as /callback?code=…&state=… is never written down. The URL itself, what visitors see and what your app receives are unchanged, and your app’s own log output is not touched. The match ignores case and percent-encoding; every other parameter is logged as is.

  • code: the OAuth authorization code a sign-in or payment provider sends back.
  • state: the OAuth state value that ties the redirect to the session that started it.
  • token, access_token, id_token, refresh_token: bearer, access, identity and refresh tokens.
  • client_secret: an OAuth client secret.
  • password: a password sent in a URL.
  • api_key, apikey: API keys.
  • signature, sig: webhook, request and signed-URL signatures.