Run DuckDB as a remote Quack server on FastAPI Cloud.
Use DuckLake for storage:
- Neon Postgres stores the DuckLake catalog.
- Cloudflare R2 stores the DuckLake Parquet files.
Before you run it, make sure these tools are available and logged in where needed:
- Python 3.13
uvnpxduckdbCLI v1.5.2curl- FastAPI Cloud login
- Neon login
- Cloudflare Wrangler login
./scripts/deploy-fastapi-cloud.shThat command creates or reuses the Neon catalog, confirms the R2 bucket in the configured Cloudflare account, sets FastAPI Cloud secrets, and deploys the app.
On a fresh setup, the first run can stop after creating .neoquack/object-store.env. Fill in the R2 S3 key fields, then rerun the same command. If Wrangler can see more than one Cloudflare account, set NEOQUACK_R2_ACCOUNT_ID or CLOUDFLARE_ACCOUNT_ID before running it.
| Check | Status |
|---|---|
| FastAPI Cloud deployment | running |
| Local Neon/R2/DuckLake/Quack proof | passing with ./scripts/validate-local.sh |
| Public Quack production readiness | blocked until ./scripts/validate-fastapi-cloud.sh passes against QUACK_HTTP_URL |
| Known blocker | FastAPI Cloud currently routes the public URL across multiple runtime replicas |
./scripts/validate-local.sh proves the same Neon/R2/runtime configuration on one local instance, but it does not clear the public-routing blocker.
Put the R2 values in:
.neoquack/object-store.env
The setup script creates that file with 0600 permissions and keeps it ignored by git.
Create the Cloudflare S3 API token from:
R2 Object Storage > Overview > Account Details > API Tokens > Manage
The bucket Settings > General page shows the S3 API endpoint, for example:
https://your-account-id.r2.cloudflarestorage.com/neoquack-ducklake
To validate during deployment, set the app URL first:
export QUACK_HTTP_URL=https://your-app.fastapicloud.dev
./scripts/deploy-fastapi-cloud.shUse the URL printed by fastapi deploy or the app domain shown in the FastAPI Cloud dashboard.
To validate after deployment:
export QUACK_HTTP_URL=https://your-app.fastapicloud.dev
./scripts/validate-fastapi-cloud.shQuack requires sticky routing or a single FastAPI Cloud runtime instance. The validator checks this before running Quack queries and stops with a clear message if FastAPI Cloud routes requests across multiple instances.
That routing failure means the public FastAPI Cloud URL is not production-safe for Quack yet. It does not mean Neon, R2, DuckLake, or the local Quack runtime failed.
To validate the same Neon and R2 setup through a single local runtime:
./scripts/validate-local.shThe current FastAPI Cloud CLI/API surface does not expose a scriptable replica-count or sticky-routing setting. If public validation stops at the routing check, configure single-instance or sticky routing in FastAPI Cloud if that control becomes available for the app/account, then rerun the public validator.
See FastAPI Cloud, Neon, and R2.
See FastAPI Cloud routing issue handoff.
See scripts.
./scripts/check.sh