Projects

Each project is an isolated backend with its own database, auth, and API endpoints. Managed entirely from the CLI.

Create a project

terminal
based new <name>

# Example
based new my-app
# → URL: https://my-app.based.yourdomain.com
# → Anon Key: xxxx

Names must be kebab-case, lowercase, max 63 characters. Each project gets its own SQLite database, JWT secret, and anon key, in /srv/based/projects/<name>/. The config.json there also holds signupEnabled (set it to false to close signup) and the per-table access policies.

List projects

terminal
based list

#   Name                  URL                                         Status
#   ----------------------------------------------------------------------
#   my-app        https://my-app.based...              active
#   my-blog               https://my-blog.based...                    active

Get env vars

terminal
based env my-app
# NEXT_PUBLIC_BASED_URL=https://my-app.based.yourdomain.com
# NEXT_PUBLIC_BASED_ANON_KEY=xxxx

Log in

based login signs you into a project so the based table and based typegen commands can reach /admin/*. If the account does not exist it asks before creating one, and the password is never echoed. The first account on a project becomes its owner; members cannot manage schema.

terminal
based login my-app -e you@email.com
based logout

Back up and restore

based backup asks the server for a consistent snapshot, then downloads it next to you as ./backups/<project>-<timestamp>.db. On the server the copies live in /srv/based/backups, a bind mount, so they are visible on the host and survive a container rebuild.

terminal
based backup my-app
# Server wrote /srv/based/backups/my-app-2026-09-09T10-15-00-000Z.db
# Downloaded ./backups/my-app-2026-09-09T10-15-00-000Z.db

based backup my-app --keep-remote   # snapshot without downloading

# restore takes the local file; it is uploaded, then swapped in
based restore my-app ./backups/my-app-2026-09-09T10-15-00-000Z.db

Inspect a project

terminal
based logs            # server container logs
based logs -f -n 200  # follow the last 200 lines
based studio my-app   # Drizzle Studio against the project DB (VPS only)

Delete a project

terminal
# With confirmation prompt
based delete my-app

# Skip confirmation
based delete my-app --force

This permanently deletes the database and all data. There is no undo — take a based backup first.