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 withcreate-frogbot-app include the dojo() plugin, which adds the dojo target. Deploy from your project root:
frogbot shareruns the same thing and takes the same flags, including--yes. See thedojo apps shareCLI reference for its flags.- On your first deploy, it prompts to bring your local SQLite data and files (
--data/--no-data), encrypts your.envkeys, builds the app on Dojo, and prints your livehttps://<name>.frogbot.appURL.--dry-runlists 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 withnpx @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:- The build must run in full, at image build time — not split into “compile in the image / generate at runtime”. FrogBot’s
prebuildstep generates the admin import map, andnext buildcompiles the app. Runningnext build --experimental-build-mode generateat container start (as some platform templates do) re-runs webpack in production, which requirestypescriptat runtime and slows cold starts dramatically. - 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.
access.create says. See The first user.
Docker
The template ships a productionDockerfile based on the Next.js with-docker example:
- Package-manager agnostic — it detects your committed lockfile (
pnpm-lock.yaml,package-lock.json, oryarn.lock) and installs with the matching tool. The template ships no lockfile; your firstinstallcreates it. - Standalone output — the build stage sets
NEXT_OUTPUT=standalone(wired up in the template’snext.config.mjs), and the final image contains only Next’s traced server: no package manager, no fullnode_modules. It starts with plainnode server.js(~110 MB image, sub-second boot). - Build isolation — the build stage uses a throwaway
DATABASE_URLand a placeholderFROGBOT_SECRET, so no local data or secrets are baked into the image. Real values come from environment variables at runtime.
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 answersGET /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 thefly-sqliteexample (one machine, stopped when idle, a health check on/api/health) and runsfly apps create. With a SQLite file database it adds thefrogbot_datavolume at/dataand setsDATABASE_URL=file:/data/frogbot.db; a hostedDATABASE_URLgets no volume. - Then:
fly secrets import --stagewith your variables, andfly deploy --ha=false, which keeps one machine so SQLite on a volume works. It printshttps://<app>.fly.dev. - Re-runs: an existing
fly.tomlnames the app and region, and the volume is created only once.--appnames a new app;fly.tomlis written only afterfly apps createsucceeds, so a taken name can be retried with another--app. - Teardown:
fly apps destroy <app>.
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 localfrogbot.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_URLat 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_URLaccordingly.
Google Cloud
- Refuses:
LOCAL_DATABASEandLOCAL_UPLOADS(use@frogbotai/storage-gcs), andNO_PROJECT. - What it creates: enables the Cloud Run, Cloud Build, Artifact Registry and Secret Manager APIs; an Artifact Registry repository named
frogbotin the region; the image, built by Cloud Build from yourDockerfile, 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 thefrogbotrepository if nothing else uses them.
AWS
- Before the first deploy: ECS Express Mode needs a task execution role (default
ecsTaskExecutionRole) and an infrastructure role (defaultecsInfrastructureRoleForExpressServices); create them as AWS’s guide describes, or name yours with--execution-roleand--infrastructure-role. The execution role also needssecretsmanager:GetSecretValueon<service>/*. - Refuses:
LOCAL_DATABASEandLOCAL_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/amd64and pushed; one Secrets Manager secret per variable,<service>/<name>; and an Express Mode service in thedefaultcluster (--clusterto 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_DATABASEandLOCAL_UPLOADS(use@frogbotai/storage-azure; its connection string goes in as a secret like any other variable). - What it creates: the
containerappCLI extension if missing; a resource group,<service>-rg(--resource-groupto change it); the app, built in Azure byaz containerapp up --source .from yourDockerfile, 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 inprodMigrations, and frogbot deploy stops with MIGRATIONS_NOT_WIRED until they’re wired. Before your first production deploy:
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.