A PocketBase alternative with PostgreSQL support
Need a PocketBase alternative with PostgreSQL support? Kanesh is a small self-hosted backend that runs on SQLite, PostgreSQL or MySQL.
If you like PocketBase but need PostgreSQL, Kanesh is a small self-hosted backend that runs on SQLite by default and on PostgreSQL when you set two environment variables. It is new, at its first stable release, so it does not replace PocketBase where you need realtime, OAuth2 sign-in or hooks today.
What PocketBase does well
PocketBase is a single executable with an embedded SQLite database. It ships realtime subscriptions, OAuth2 sign-in, local or S3 file storage and Go or JavaScript hooks, and it is MIT licensed. Each instance runs one app. If that matches your project, it is a good fit and you should stay.
The database is the main difference to check. PocketBase uses embedded SQLite, so if your team already runs, backs up and monitors PostgreSQL, you would be adding a second kind of database to operate.
Why teams ask for PostgreSQL
- The database already exists, with backups and access rules your team trusts.
- The data lives on a separate host from the app, so the app container can be replaced freely.
- Other services or reports need to read the same tables.
- You want real foreign keys between tables, not only relation fields.
How Kanesh runs on PostgreSQL
Kanesh stores each collection as a real SQL table. Pick the database with two variables:
docker run -p 127.0.0.1:8080:8080 -v kanesh-data:/data \
-e DATABASE_DRIVER=postgres \
-e DATABASE_URL="postgres://kanesh:secret@db.internal:5432/kanesh?sslmode=require" \
kanesh On SQLite and PostgreSQL, relations (N:1, 1:N and N:N with junction tables) use real foreign keys, and you can add managed indexes of up to four fields, optionally unique. If you choose an external database and it cannot be reached, Kanesh stops with an error. It never falls back to a local SQLite file, so you do not end up writing production data to the wrong place.
The rest stays small. Kanesh is one Go binary with the Studio embedded and no Node server at runtime. The Docker image is about 8.9 MB (arm64, measured 2026-10-04). You build the image from the repository with docker build -t kanesh ..
PocketBase and Kanesh side by side
| Kanesh | PocketBase | |
|---|---|---|
| Shape | One Docker image, one Go binary | Single executable |
| Databases | SQLite, PostgreSQL, MySQL | Embedded SQLite |
| Projects per install | Many independent workspaces | One app per instance |
| APIs | REST, GraphQL, OpenAPI 3.1 export | REST |
| Realtime | Not yet | Yes |
| OAuth2 sign-in | Not yet | Yes |
| File storage | Database or S3-compatible storage (S3, MinIO, R2) | Local or S3 |
| Hooks | Not yet | Go and JavaScript |
| AI agents | Opt-in read-only MCP endpoint | Not built in |
| Maturity | New, first stable release | Widely used |
| License | AGPL-3.0 core; 1 workspace free, unlimited workspaces + AI assistant $9/month per install | MIT |
What you give up
Be honest about the gaps before you move. Kanesh has no realtime, no OAuth or SSO, no hooks and no SDKs yet, and realtime and OAuth or SSO sign-in are on the roadmap. The license differs too: PocketBase is MIT, while the Kanesh core is AGPL-3.0 and unlimited workspaces and the AI assistant need a Pro license at $9 per month. If any of those is on your critical path, keep PocketBase or wait.
FAQ
Does Kanesh fully support PostgreSQL?
Yes, for the features Kanesh has. Relations use real foreign keys and managed indexes are available on PostgreSQL, and MySQL is supported too. See database setup for the exact flags.
Can I move my data from PocketBase to Kanesh?
Kanesh imports and exports CSV and JSON in bounded sizes. Create a collection with matching field types, then import a file exported from your current backend. Your client code needs to move to Kanesh’s REST or GraphQL API, since the endpoints differ.
Is Kanesh ready for production?
Kanesh is at its first stable release. It is newer than PocketBase and has less time in the field, and realtime, OAuth2 sign-in and hooks are not there yet. Test it with your own data, and check what is still pending before you depend on it.
Next steps
Follow Getting started to run Kanesh in a few minutes, or read the full Kanesh vs PocketBase comparison.


