Your whole backend, built on PostgreSQL.
An open-source backend in one Rust binary: collections, a REST and realtime API, auth, files,
hooks and an admin dashboard. Every collection is a real PostgreSQL table.
Website · Quick start · Install · API · Hooks · Benchmarks
A JavaScript client creating and updating a task. The dashboard's grid is live: realtime events arrive as the code runs.
Why slonbase
Define your data in a dashboard and get an API, auth, realtime and file storage right away, without writing a backend. slonbase gives you that in a single binary, and keeps your data in PostgreSQL, the database you can query, replicate, back up and scale with the tools you already trust.
- 🐘 Real PostgreSQL tables. Every collection is a table. Query it with SQL, join it in
reports, replicate it, back it up with
pg_dump, or run it on a managed service. - ⚡ Realtime for every change. A trigger on each table announces every write, whoever makes it: the API, your SQL, an auth flow or another program. Each subscriber gets only what its rules allow.
- ↔️ Scales out. Run several instances on one database behind any load balancer. Realtime, schema changes, settings and rate limits are shared through PostgreSQL, so no sticky sessions.
- 🧩 Extend it your way. Hooks, routes, cron jobs and a query builder in JavaScript files, no build step; or a Rust library API.
- 🗂️ Many projects, one server. Host several isolated apps from one installation, each in a database of its own.
- 🚀 Fast where it matters. Written in Rust with tokio and axum; filters compile to parameterized SQL that uses your indexes (benchmarks).
- 📦 One static binary. An 8 MB download with the dashboard built in. Install it with
Docker,
.deb/.rpmpackages or a plain binary, and finish with a setup wizard.
Features
|
Data
Auth
|
Realtime and files
Operations
|
Note
slonbase 1.0 is stable: within 1.x, upgrades don't break the API, configuration, your data, hooks or migrations (see stability). Back up before upgrading anyway, and bug reports are very welcome.
Coming from PocketBase?
slonbase is inspired by PocketBase, and it's an independent project, written from scratch in Rust, with its own design. Its API is compatible with PocketBase's, so you can bring an existing app along:
- the PocketBase JavaScript and Dart SDKs work against slonbase as they are;
- most
pb_hooksandpb_migrationsfiles run unchanged; slonbase import-pocketbasebrings over collections, records, files and settings, with users' password hashes, so nobody has to reset a password.
A test suite written with the official SDK runs against both servers in CI to keep it that way (compat/). The migration guide lists the differences.
PocketBase is the better choice when you want zero moving parts (one file, SQLite inside), when one small app on one small machine is the whole plan, or when you extend it in Go.
Quick start
In 60 seconds, with Docker. This starts slonbase and a PostgreSQL 17 server for it:
mkdir slonbase && cd slonbase
curl -fsSLO https://raw.githubusercontent.com/ayeshrodz/slonbase/main/compose.yaml
echo "POSTGRES_PASSWORD=$(openssl rand -hex 24)" > .env
docker compose up -d
docker compose logs slonbase | grep "setup?token"
Open the printed link and create your first superuser. That's it: the dashboard is at
http://localhost:8090/_/ and the API at /api/.
On a hosting platform: Render (one click), Railway, Fly.io, Coolify and Dokploy each have a ready-made setup with a database.
Without Docker, PostgreSQL isn't bundled: slonbase connects to any PostgreSQL 14+ server, on the same machine, elsewhere, or a managed service, and the setup link asks for it.
Debian / Ubuntu: from the apt repository, so apt upgrade keeps it up to date:
curl -fsSL https://ayeshrodz.github.io/slonbase/slonbase.gpg | sudo tee /usr/share/keyrings/slonbase.gpg > /dev/null
curl -fsSL https://ayeshrodz.github.io/slonbase/slonbase.list | sudo tee /etc/apt/sources.list.d/slonbase.list
sudo apt update && sudo apt install slonbase
sudo journalctl -u slonbase | grep "setup?token"
Fedora / RHEL: sudo curl -fsSL -o /etc/yum.repos.d/slonbase.repo https://ayeshrodz.github.io/slonbase/slonbase.repo && sudo dnf install slonbase.
The .deb and .rpm files are also on the releases page.
Binary: extract the .tar.gz from the releases and run ./slonbase serve.
Then connect from your app with any HTTP client, or with the PocketBase SDKs, which work with slonbase's API:
import PocketBase from "pocketbase";
const pb = new PocketBase("http://localhost:8090");
await pb.collection("users").authWithPassword("ann@example.com", "secret");
const posts = await pb.collection("posts").getList(1, 20, { filter: 'published = true', expand: "author" });
A look around
| Records | Overview |
|---|---|
![]() |
![]() |
| Schema | Logs |
![]() |
![]() |
| API rules | API preview |
![]() |
![]() |

The schema diagram, drawn from the collections: hover one to follow its relations.
The dashboard follows your system's light or dark theme, works on phones, and ⌘K / Ctrl K jumps anywhere. It only uses the public API, so anything it does, you can script too.
Documentation
The guides are also on the documentation site, with search: ayeshrodz.github.io/slonbase/docs.
- Installation: Docker, packages, binaries, first-run setup, upgrades
- Configuration: server options and application settings
- Hosting platforms: Render, Railway, Fly.io, Coolify and Dokploy
- Running in production: reverse proxy, PostgreSQL, several instances, backups, monitoring, security
- API: endpoints, collections, filters and rules, files, realtime
- Extending: JavaScript hooks and the Rust library
- Migrations: collections and data changes in code
- Projects: several isolated installations, one database each, on one server
- Migrating from PocketBase: the importer and the differences
- Benchmarks: slonbase next to PocketBase on the same workloads
- Design: the decisions behind slonbase
- Stability: what 1.0 keeps compatible, deprecations and upgrades
- Changelog
Commands
| Command | Description |
|---|---|
slonbase serve |
Start the server (default). |
slonbase setup |
Set up without the web wizard. |
slonbase health |
Exit 0 if the local server is healthy (for container health checks). |
slonbase superuser upsert|update|delete|otp ... |
Manage superusers. otp <email> prints a one-time password for signing in with MFA when emails can't be sent. |
slonbase import-pocketbase <pb_data or backup.zip> |
Import a PocketBase installation. |
slonbase migrate up|down|create|collections|list ... |
Apply, revert or write migrations. |
slonbase project list|create|delete ... |
Manage projects; --project <name> runs superuser, import-pocketbase and migrate on one. |
slonbase --help lists every option.
Performance
Compared with PocketBase, on the same machine, the same data and the same HTTP workloads, with default settings (method and full results):
| Scenario | slonbase req/s | PocketBase req/s | p99 ms (slonbase / PocketBase) |
|---|---|---|---|
| List 30 records | 1,557 | 1,043 | 36.5 / 101.8 |
| List 30, filtered | 1,175 | 73 | 47.7 / 623.3 |
| List 30, expand a relation | 973 | 701 | 50.5 / 161.5 |
| Create a record | 1,728 (2,792 with async commit) | 2,532 | 29.8 / 66.0 |
An embedded SQLite answers a single client's lookups faster, since it runs in the server's
process. Writes are slower with PostgreSQL's default durability, and a little faster when
PostgreSQL makes the same trade-off as SQLite's default (synchronous_commit = off; see
why).
Contributing
Bug reports, ideas and pull requests are welcome; see CONTRIBUTING.md. The quickest checks:
cargo test # unit tests
SLONBASE_TEST_DATABASE_URL='postgres://postgres:postgres@127.0.0.1:5432/postgres?sslmode=disable' cargo test # everything
(cd compat && npm ci) && DATABASE_URL='postgres://...' compat/run.sh slonbase # the SDK compatibility suite
Please report security problems privately.
License
MIT. The dashboard vendors Preact (MIT) and htm (Apache-2.0); their licenses are in ui/app/vendor. It ships the Ubuntu Sans and Ubuntu Sans Mono fonts (Ubuntu Font Licence 1.0); the licence is in ui/app/fonts. slonbase is an independent project inspired by PocketBase (also MIT). It is not affiliated with or endorsed by PocketBase or its author, and it wouldn't exist without their work.






