Skip to Content
User GuideDeployment

Deployment

The same Pandora server runs anywhere — your laptop, a VPS, or a serverless platform. No code changes needed.

Running

bun run build && bun run start

Or in development:

bun run dev

Chat UI

The official Pandora UI runs alongside the server. bun run dev starts both together.

By default, the UI connects to http://localhost:4111. To point it at a different server, set NEXT_PUBLIC_API_URL in .env.local:

NEXT_PUBLIC_API_URL=https://your-pandora-server.example.com

Environment Variables

Core variables that apply to all deployments:

VariableDefaultDescription
PORT4111HTTP server port
DATABASE_URLfile:data/pandora.dbSQLite connection URL
DATABASE_AUTH_TOKENAuth token for remote Turso databases
FRONTEND_URLURL of your UI (always included in CORS origins)
CORS_ORIGINShttp://localhost:3000Comma-separated allowed origins, or * for all
LOG_LEVELerrorLog verbosity: debug, info, warn, or error
FILE_STORAGE_PATHdata/uploadsLocal directory for uploaded file attachments
BASE_URLhttp://localhost:{PORT}Public base URL of the server (used to serve uploaded files)

Plugins may require their own API keys (e.g. TAVILY_API_KEY, BRAVE_API_KEY). See each plugin’s documentation for details.

Database

Pandora uses SQLite, storing everything in a local file at data/pandora.db. No setup needed.

To use a hosted Turso  database instead:

DATABASE_URL=libsql://your-db-name-org.turso.io DATABASE_AUTH_TOKEN=your-auth-token

CORS

By default, Pandora allows requests from http://localhost:3000 (the bundled UI’s dev port). If your UI is hosted elsewhere, set FRONTEND_URL:

FRONTEND_URL=https://my-pandora.example.com

Most users won’t need anything beyond this. If you have additional origins (e.g. a mobile app or a separate UI), add them with CORS_ORIGINS:

CORS_ORIGINS=https://other-app.example.com,https://mobile.example.com

Setting CORS_ORIGINS overrides the default localhost:3000. FRONTEND_URL is always included if set.

To allow all origins:

CORS_ORIGINS=*

Logging

Control log verbosity with LOG_LEVEL:

LOG_LEVEL=info # debug | info | warn | error

Defaults to error.

Last updated on