Skip to main content
frogbot deploy <target> puts your app online in one command. It checks the app first, lists every problem at once, and only then builds and deploys with your own login for that host.
Run frogbot deploy with no target and no dojo() to list the targets. An unknown target lists them too and exits 2; with --json it also prints a result whose issue is UNKNOWN_TARGET.

Flags every target takes

gcp, aws and azure also take:

Checks before anything runs

Every failing check prints together, [frogbot] <code> <message> with a fix: line under it, and the deploy exits 1 having written and run nothing.

Variables

Each target sends the app’s variables to the host’s own secret store, never as plain environment variables. NEXT_PUBLIC_* variables are read when next build runs, so they go in as build arguments instead (fly, gcp, aws): add an ARG NEXT_PUBLIC_… line to the Dockerfile’s builder stage so the build sees each one, as the deploy reminds you. az containerapp up takes no build arguments, so on Azure put them in a committed .env.production. NODE_ENV, PORT and HOSTNAME are never sent.

Deploy to Dojo

Apps created with create-frogbot-app include the dojo() plugin, which adds the dojo target. Deploy from your project root:
  • frogbot share runs the same thing and takes the same flags, including --yes. See the dojo apps share CLI reference for its flags.
  • On your first deploy, it prompts to bring your local SQLite data and files (--data / --no-data), encrypts your .env keys, builds the app on Dojo, and prints your live https://<name>.frogbot.app URL. --dry-run lists the files, their size, the keys and the data it would send, and makes no request.
  • On Dojo, dojo() automatically configures private R2 file storage, Dojo AI routing, scheduled job execution, and Continue with Dojo sign-in.
  • An app deployed without data starts with you as its first user: sign in with Continue with Dojo. See Sign in with Dojo.
  • Pull a shared app locally with npx @frogbotai/plugin-dojo apps pull <app> or stream live logs with npx @frogbotai/plugin-dojo apps logs <app> --follow. Domains, environment keys, members, API keys and billing have commands too.

Self-hosting (Docker & Node.js)

FrogBot apps are Next.js applications. They build like a standard Next.js app, but two things differ from a plain Next.js project:
  1. The build must run in full, at image build time — not split into “compile in the image / generate at runtime”. FrogBot’s prebuild step generates the admin import map, and next build compiles the app. Running next build --experimental-build-mode generate at container start (as some platform templates do) re-runs webpack in production, which requires typescript at runtime and slows cold starts dramatically.
  2. In production, FrogBot does not push your schema automatically the way it does in dev. A fresh production database has no tables until migrations run — see Migrations.
Sign in before you make it public. While a self-hosted app has no users, the first person to sign in becomes its first user, whatever access.create says. See The first user.

Docker

The template ships a production Dockerfile based on the Next.js with-docker example:
  • Package-manager agnostic — it detects your committed lockfile (pnpm-lock.yaml, package-lock.json, or yarn.lock) and installs with the matching tool. The template ships no lockfile; your first install creates it.
  • Standalone output — the build stage sets NEXT_OUTPUT=standalone (wired up in the template’s next.config.mjs), and the final image contains only Next’s traced server: no package manager, no full node_modules. It starts with plain node server.js (~110 MB image, sub-second boot).
  • Build isolation — the build stage uses a throwaway DATABASE_URL and a placeholder FROGBOT_SECRET, so no local data or secrets are baked into the image. Real values come from environment variables at runtime.
It builds the image with your Dockerfile (offering FrogBot’s template when there is none), prints the docker run line, and never pushes. The tag is a hash of the app’s source unless you pass --tag, so an unchanged app keeps its tag. With a SQLite file database, the printed line mounts a volume at /data:

Health check

The template answers GET /api/health with 200 and { "status": "ok" } once FrogBot has started, and 503 with { "status": "error" } when it can’t start, logging why. It needs no sign-in, so point your platform’s HTTP health check at it. Dojo, Fly.io, Cloud Run, ECS Express Mode and Azure Container Apps check this path when frogbot deploy sets them up. The route is src/app/(frogbot)/api/health/route.ts.

Fly.io

  • What it creates: without a fly.toml, it writes one in the shape of the fly-sqlite example (one machine, stopped when idle, a health check on /api/health) and runs fly apps create. With a SQLite file database it adds the frogbot_data volume at /data and sets DATABASE_URL=file:/data/frogbot.db; a hosted DATABASE_URL gets no volume.
  • Then: fly secrets import --stage with your variables, and fly deploy --ha=false, which keeps one machine so SQLite on a volume works. It prints https://<app>.fly.dev.
  • Re-runs: an existing fly.toml names the app and region, and the volume is created only once. --app names a new app; fly.toml is written only after fly apps create succeeds, so a taken name can be retried with another --app.
  • Teardown: fly apps destroy <app>.
Fly uses your Dockerfile instead of generating its default Next.js two-phase build, so your app gets a fast, single-phase cold start.

Database persistence

The default SQLite database lives in a local frogbot.db file on the machine’s ephemeral storage. If your machines auto-stop (scale to zero), the data is wiped on restart. Choose one of:
  • Attach a persistent volume and point DATABASE_URL at it:
    A volume attaches to one machine at a time, so with SQLite you run a single machine (fly scale count 1). Scale-to-zero still works — the data lives on the volume, not the machine.
  • Use a remote database: Postgres, MongoDB, or a hosted SQLite like Turso. Set DATABASE_URL accordingly.

Google Cloud

  • Refuses: LOCAL_DATABASE and LOCAL_UPLOADS (use @frogbotai/storage-gcs), and NO_PROJECT.
  • What it creates: enables the Cloud Run, Cloud Build, Artifact Registry and Secret Manager APIs; an Artifact Registry repository named frogbot in the region; the image, built by Cloud Build from your Dockerfile, so you need no local Docker; one Secret Manager secret per variable, <service>-<name>, readable by the project’s default compute service account; and a Cloud Run service with one instance at most, public, with a startup probe on /api/health, so traffic arrives only once FrogBot has started and run its migrations. It prints the service URL.
  • Re-runs: update the same service and add a new version of each secret.
  • Teardown: gcloud run services delete <service> --region <region>, then the <service>-* secrets and the frogbot repository if nothing else uses them.

AWS

AWS runs the app with ECS Express Mode: Fargate behind an HTTPS load balancer with a public URL. App Runner no longer takes new customers.
  • Before the first deploy: ECS Express Mode needs a task execution role (default ecsTaskExecutionRole) and an infrastructure role (default ecsInfrastructureRoleForExpressServices); create them as AWS’s guide describes, or name yours with --execution-role and --infrastructure-role. The execution role also needs secretsmanager:GetSecretValue on <service>/*.
  • Refuses: LOCAL_DATABASE and LOCAL_UPLOADS (use @frogbotai/storage-s3, which uses the task role and needs no keys), NO_REGION, AWS_ROLE_MISSING, and --min-instances 0: Express Mode keeps one task running.
  • What it creates: an ECR repository named after the service; the image, built on this computer for linux/amd64 and pushed; one Secrets Manager secret per variable, <service>/<name>; and an Express Mode service in the default cluster (--cluster to change it) with exactly one task and a health check on /api/health. It prints the service URL.
  • Re-runs: push a new image and update the same service.
  • Teardown: aws ecs delete-express-gateway-service --service-arn <arn>, then the <service>/* secrets and the ECR repository.

Azure

  • Refuses: LOCAL_DATABASE and LOCAL_UPLOADS (use @frogbotai/storage-azure; its connection string goes in as a secret like any other variable).
  • What it creates: the containerapp CLI extension if missing; a resource group, <service>-rg (--resource-group to change it); the app, built in Azure by az containerapp up --source . from your Dockerfile, with external ingress on port 3000; one Container Apps secret per variable, referenced from the app’s environment; one replica at most; and a startup probe on /api/health. It prints the app URL.
  • Re-runs: rebuild and update the same app.
  • Teardown: az group delete --name <service>-rg.

Migrations

In development, FrogBot pushes your schema to SQLite automatically on boot. In production it does not — it only applies migrations listed in prodMigrations, and frogbot deploy stops with MIGRATIONS_NOT_WIRED until they’re wired. Before your first production deploy:
Then wire the migrations into your database adapter:
Commit the generated files. They are applied automatically on boot (before the server starts serving), so a fresh database gets its schema on first deploy. When you add or change collections, run pnpm migrate:create <name> again and commit the new files. Generated migrations import from the underlying database adapter package, which the template includes as a direct dependency — do not remove it.

Troubleshooting

no such table: users in production

Your production database has no schema. FrogBot only pushes schema automatically in dev; in production you need migrations wired into prodMigrations — see Migrations.

ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION during Docker build

Recent pnpm versions refuse packages published within the last 24 hours as a supply-chain protection. If a FrogBot release is newer than that, either wait, pin an older pnpm via the packageManager field in package.json, or relax the policy in pnpm-workspace.yaml (minimumReleaseAge: 0).

Cannot find module 'libsql' (or sharp, pino, drizzle-kit, json-schema-to-typescript)

Only applies to non-standalone deploys (bare VPS running pnpm start): the compiled routes require() a package that FrogBot externalizes from the webpack bundle, but it is not linked at your project root. Add it to dependencies in package.json and rebuild — the template already includes all of them. Standalone Docker images are unaffected: the build includes these packages, and libsql’s native binary for the platform the image is built on. Build the image with the template Dockerfile so dependencies install inside Linux. node_modules copied in from macOS or Windows has no Linux binary, and the server fails with Cannot find module '@libsql/linux-…'.

Installing TypeScript... or Can't resolve '@frogbot-config' at start

A runtime next build step is running (usually a platform template with a two-phase build), and typescript was pruned from the image. Use the template Dockerfile above so the build happens once, in the image, and start runs only node server.js.

Slow cold starts

If your platform starts a build at container boot, your cold start includes a webpack rebuild. Move the build into the image (see Docker) so cold starts are just the standalone server booting.

Installation

Scaffold a project and run it locally.

Database

Choose a database adapter that fits your production storage needs.