Self-hosted dashboard & scheduler to keep free-tier Supabase projects from pausing.
Quick start · Features · Coolify · How it works · API · Contributing
Note: This project is not affiliated with, endorsed by, or sponsored by Supabase. It is an independent open-source tool built by the community for developers who self-host their infrastructure.
Supabase pauses free-tier projects after about 7 days without API activity. If a project stays paused for 90 days, it can be permanently deleted.
Many developers run side projects on the free tier and forget to touch them — this app automates scheduled database pings so your projects stay awake.
| 📊 Dashboard | All projects, live status, 24h success rate |
| ➕ Project management | Add, pause, resume, delete from the UI |
| 📈 Activity chart | shadcn/ui stacked area chart (24h / 3d / 7d) |
| ⏱️ Built-in scheduler | Cron-style checks every minute; pings when due |
| ⚡ Manual ping | Trigger an immediate health check |
| 🐳 Self-hosted | SQLite only (one file + WAL), Docker, Coolify — no other database backends |
| 🔐 Dashboard auth | Optional HTTP Basic Auth via DASHBOARD_PASSWORD (recommended in production) |
| 🛡️ Safe by design | Auth token ping only — no accounts created, no data read or written, no service_role key |
flowchart LR
A[Scheduler] --> B{Due?}
B -->|yes| C["POST /auth/v1/token"]
C --> D[Supabase project]
D --> E[SQLite logs]
E --> F[Dashboard chart]
Every minute, the built-in scheduler checks which projects are due. For each project it sends:
POST https://<project-ref>.supabase.co/auth/v1/token?grant_type=password
apikey: <your-anon-public-key>
Authorization: Bearer <your-anon-public-key>
Content-Type: application/json
{"email":"[email protected]","password":"keepalive-ping-do-not-create"}GoTrue receives this request and queries auth.users to verify the credentials — a real PostgreSQL round-trip that Supabase’s inactivity tracker counts as project activity. The credentials are intentionally fake; GoTrue returns 400 invalid_grant, which the app treats as success (the project is alive and responsive). A 5xx or network timeout means the project is paused or unreachable.
Why not
/auth/v1/health? Supabase excludes health-check endpoints from activity tracking to prevent abuse. Any real API request (one that queries the database) is required to reset the inactivity timer.
- Create user accounts or send emails
- Read or write your application data
- Use the service_role key
Only the public anon key is stored, and only on your self-hosted instance.
- Bun 1.2+ (recommended) or Node.js 24+ (LTS)
git clone https://github.com/flogesell/keepsupabasealive.git
cd keepsupabasealive
cp .env.example .env
bun install
bun run devOpen http://localhost:3000 → Add project and fill in:
| Field | Where to find it | Example |
|---|---|---|
| Name | Any label | My side project |
| URL or ref | Project Settings → API → Project URL | https://abcdefgh.supabase.co or abcdefgh |
| Anon key | Project Settings → API → anon public |
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... |
| Interval | How often to ping | Every 6 hours (recommended) |
Use the anon public key only. Never use
service_role.
Dashboard URLs like https://supabase.com/dashboard/project/<ref> are also accepted — the project ref is extracted automatically.
Persistence: this app only supports SQLite at DATABASE_PATH (default /data/keepsupabasealive.db in Docker). There is no PostgreSQL or other database option — mount a directory volume on /data as documented below.
Add this GitHub repository as your Coolify application source.
-
In Coolify → + New → Application.
-
Under Source, choose GitHub (or GitLab / Gitea) and select this repository — public or private after authorizing Coolify once.
-
Pick your branch (e.g.
main) and set the build pack to Dockerfile. -
Add Persistent Storage (application → Storages → + Add).
Volume mount (recommended)
Field Value Name data(Coolify may append your app UUID to avoid clashes)Source Path (leave empty — Docker creates the volume) Destination Path /dataOn first start the entrypoint runs briefly as root to
chownthe database directory, thennoderuns as UID 1001 (nextjs). Do not mount a single file toDATABASE_PATH— use a volume on/datawith an empty Source Path. The production image defaults toSQLITE_JOURNAL_MODE=DELETE(no-wal/-shm); setSQLITE_JOURNAL_MODE=WALonly if you prefer WAL and your volume supports it. -
Add these environment variables:
| Variable | Value | Required |
|---|---|---|
DATABASE_PATH |
/data/keepsupabasealive.db |
Yes — never ./data/... in Coolify |
DASHBOARD_PASSWORD |
Long random password | Yes (production) |
ENCRYPTION_KEY |
openssl rand -hex 32 |
Yes (production) |
CRON_SECRET |
openssl rand -hex 32 |
Yes (production) |
DASHBOARD_USER |
admin (default) |
No |
PORT |
3000 |
Usually set by Coolify |
- Set health check path to
/api/health→ Deploy.
Scheduled health checks: the app runs an in-process scheduler (every minute). After deploy, logs should show [scheduler] Started. If automatic pings still do not run, add a Coolify Scheduled Task (every minute):
curl -fsS -X POST -H "Authorization: Bearer YOUR_CRON_SECRET" https://your-domain.example/api/cronDo not set DISABLE_SCHEDULER=true unless you rely on that external cron only.
docker compose up -d --buildData persists in the keepsupabasealive-data volume.
| Variable | Default | Description |
|---|---|---|
DATABASE_PATH |
./data/keepsupabasealive.db |
SQLite database file |
DASHBOARD_PASSWORD |
— | HTTP Basic Auth (required in production) |
DASHBOARD_USER |
admin |
Username for Basic Auth |
ENCRYPTION_KEY |
— | AES-256-GCM encryption for anon keys at rest (required in production) |
CRON_SECRET |
— | Bearer token for POST /api/cron (required in production) |
DISABLE_SCHEDULER |
false |
Set true to disable built-in pings |
SQLITE_JOURNAL_MODE |
WAL |
Use DELETE only if the DB volume cannot create WAL sidecars (rare) |
DRIZZLE_MIGRATIONS_FOLDER |
(auto) | Absolute path to drizzle/ if not next to the server |
PORT |
3000 |
HTTP port |
Generate secrets:
openssl rand -hex 32 # ENCRYPTION_KEY and/or CRON_SECRET| Method | Path | Description |
|---|---|---|
GET |
/api/projects |
List projects with stats (anon keys omitted) |
POST |
/api/projects |
Create a project |
PATCH |
/api/projects/:id |
Update a project |
DELETE |
/api/projects/:id |
Delete a project |
POST |
/api/projects/:id/ping |
Run a health check now |
GET |
/api/stats?hours=24 |
Chart data (hours: 1–168) |
POST |
/api/cron |
Run all due pings (Authorization: Bearer <CRON_SECRET>, required in production) |
GET |
/api/health |
App health check |
When NODE_ENV=production, the app refuses to start without:
| Variable | Purpose |
|---|---|
DASHBOARD_PASSWORD |
HTTP Basic Auth on dashboard + API |
ENCRYPTION_KEY |
Encrypts Supabase anon keys in SQLite |
CRON_SECRET |
Bearer token for POST /api/cron |
Deployment checklist:
- Set all three variables above (use
openssl rand -hex 32) - Serve the app over HTTPS (Coolify / reverse proxy)
- Mount
/dataon a persistent volume with restricted host access - The container starts as root only for the entrypoint (
chownon/data), then runs Node as UID 1001 - Never store service_role keys — anon public keys only
- Restrict who can reach the URL (VPN / IP allowlist optional extra layer)
- Back up
/datasecurely — backups contain encrypted keys - After enabling
ENCRYPTION_KEY, restart once — existing plaintext keys are auto-migrated
| Layer | Behavior |
|---|---|
| Dashboard & API | HTTP Basic Auth when DASHBOARD_PASSWORD is set |
| Failed logins | Rate limited (5 failures / 15 min per IP); browser is redirected to /rate-limited (no Basic Auth on that path) |
| Anon keys in DB | Encrypted at rest with ENCRYPTION_KEY (AES-256-GCM) |
| API responses | Anon keys never returned from GET /api/projects |
| SQL injection | Drizzle ORM + Zod validation — no raw user SQL |
| Remote DB access | SQLite file only — no open database port |
| Path | Why |
|---|---|
/api/health |
Coolify / Docker health checks |
/api/cron |
Requires Authorization: Bearer <CRON_SECRET> in production |
With NODE_ENV unset or development, auth and encryption env vars are optional:
- No
DASHBOARD_PASSWORD→ dashboard open - No
ENCRYPTION_KEY→ anon keys stored as plaintext in SQLite - No
CRON_SECRET→/api/cronaccepts unauthenticated requests
The browser dialog needs both username and password:
| Field | Value |
|---|---|
| Username | admin (unless you set DASHBOARD_USER to something else) |
| Password | Exactly DASHBOARD_PASSWORD from Coolify — no extra spaces or quotes |
Common causes of an endless prompt:
- Blank
DASHBOARD_USERin Coolify — Remove the variable entirely, or set a real username. An empty value is not the same as unset; the app used to expect an empty username in that case (fixed in recent versions — redeploy after updating). - Trailing newline in Coolify — Re-paste the password or regenerate it; stray line breaks in the env value make every login fail.
- Wrong username — Safari/Chrome may pre-fill an email as the username; use
admin(or your customDASHBOARD_USER). - Second HTTP Basic Auth in front — If Coolify/Traefik also has Basic Auth enabled for this app, disable it and rely on
DASHBOARD_PASSWORDonly (or you will get two prompts and mismatched credentials). - Stale container env — After changing env vars, redeploy/restart the app so the running container picks them up.
Verify from your machine (replace host and password):
curl -s -o /dev/null -w "%{http_code}\n" -u admin:YOUR_PASSWORD https://your-domain.example/200 means credentials match; 401 means username/password/env still do not match what the container has.
- SQLite not writable — Use a directory volume on
/data(empty Source Path), not a file mount for the.dbfile. In Coolify, clear any custom container user so the entrypoint canchownonce. Check deploy logs forkeepsupabasealive:— the container exits there with a concrete hint if the directory is not writable. As a last resort setSQLITE_JOURNAL_MODE=DELETE. - Missing
drizzle/in the image — Deploy with the repo Dockerfile (it copiesdrizzle/). If you run the standalone bundle elsewhere, setDRIZZLE_MIGRATIONS_FOLDERto the folder that containsmeta/_journal.json. - Check container logs — The server logs the underlying error; the JSON body may include a
hintfield with a short explanation.
The long‑running process is not root: it runs as user nextjs (UID 1001). Only the entrypoint runs briefly as root to chown the /data volume so SQLite can create the DB and WAL files on typical Coolify/Docker mounts — no manual chown on the host.
If your platform disallows root entirely (including entrypoint), set a writable DATABASE_PATH for the user your platform assigns, or use a volume that is already owned by that UID.
- HTTP Basic Auth sends credentials per request (use HTTPS).
- Encryption protects the DB file, not a compromised running container.
- Single shared dashboard password — no per-user accounts yet.
- Comply with Supabase Terms of Service.
bun run dev # Development server
bun run build # Production build
bun run start # Production server
bun run lint # ESLint
bun run db:generate # Generate Drizzle migrationsMigrations run automatically on startup.
- Next.js 16 — App Router, standalone output
- shadcn/ui + Tailwind CSS 4
- SQLite + Drizzle ORM
- Recharts via shadcn Charts
Contributions are welcome! Please open an issue or pull request.
MIT — free to use, modify, and distribute.
Built with ☕ for developers who forget to ping their side projects.
Supabase® is a trademark of Supabase, Inc. This project is independent.