# Other db backends

**URL:** <https://ifnotnil.com/t/other-db-backends/4262>\
**Category:** Other\
**Created:** [6 February 2025 21:12 UTC](https://ifnotnil.com/t/other-db-backends/4262 "2025-02-06T21:12:06Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikey](https://ifnotnil.com/user_avatar/ifnotnil.com/mikey/32/4579_2.png) [@mikey](https://ifnotnil.com/u/mikey)\
**Post date:** [6 February 2025 21:12 UTC](https://ifnotnil.com/t/other-db-backends/4262/1 "2025-02-06T21:12:06Z")

</div>

the [thread on sqlite on a net](https://ifnotnil.com/t/windows-using-sqlite-thru-the-cloud/4260/10) reminded me that i’m still poking around for a new db server. i’d like:

- oss
- can be self-hosted or not
- rest (or rpc) server attached or easy to attach
- not just a db server, but have backend functionality (this seems pretty universal, but it should be said)

i’ve come across several, to date that are interesting

- supabase (postgres)
- pocketbase (sqlite)
- soul (sqlite)

anyone have something else they’re using?

---

<div class="post-metadata">

**Author:** ![npalardy](https://ifnotnil.com/user_avatar/ifnotnil.com/npalardy/32/10_2.png) [@npalardy](https://ifnotnil.com/u/npalardy)\
**Post date:** [6 February 2025 21:39 UTC](https://ifnotnil.com/t/other-db-backends/4262/2 "2025-02-06T21:39:03Z")

</div>

PostgreSQL + postgREST

there are some other REST front ends for PostgreSQL (like [psql-api](https://github.com/QBisConsult/psql-api) but it looks like its been largely idle for years)

Postgresql is one of my faves 😛

Supabase looks like it has the things you want

---

<div class="post-metadata">

**Author:** ![mikey](https://ifnotnil.com/user_avatar/ifnotnil.com/mikey/32/4579_2.png) [@mikey](https://ifnotnil.com/u/mikey)\
**Post date:** [6 February 2025 21:49 UTC](https://ifnotnil.com/t/other-db-backends/4262/3 "2025-02-06T21:49:57Z")

</div>

right. supbase is actually postgres + postgrest + gotrue (for auth), and, as you know, you can self-host it via docker.  
what’s wild, though, is there is no account lockout. you can brute force your way in, and there is nothing to stop you.

---

<div class="post-metadata">

**Author:** ![npalardy](https://ifnotnil.com/user_avatar/ifnotnil.com/npalardy/32/10_2.png) [@npalardy](https://ifnotnil.com/u/npalardy)\
**Post date:** [6 February 2025 22:02 UTC](https://ifnotnil.com/t/other-db-backends/4262/4 "2025-02-06T22:02:41Z")

</div>

> [@mikey](#):
>
> what’s wild, though, is there is no account lockout. you can brute force your way in, and there is nothing to stop you.

🤯  
😱

---

<div class="post-metadata">

**Author:** ![mikey](https://ifnotnil.com/user_avatar/ifnotnil.com/mikey/32/4579_2.png) [@mikey](https://ifnotnil.com/u/mikey)\
**Post date:** [6 February 2025 22:28 UTC](https://ifnotnil.com/t/other-db-backends/4262/5 "2025-02-06T22:28:29Z")

</div>

the same is true for pocketbase. i have not looked at soul, yet.  
supabase does have a hook that could be used to write something, but it’s only available for teams accounts, which cost $500/month. i’ve been talking to them for a couple of weeks about writing a brute-force-limit and submitting a PR, but the mechanism for hooking in is still not defined.

---

<div class="post-metadata">

**Author:** ![TomasJ](https://ifnotnil.com/user_avatar/ifnotnil.com/tomasj/32/4998_2.png) [@TomasJ](https://ifnotnil.com/u/TomasJ)\
**Post date:** [7 February 2025 01:57 UTC](https://ifnotnil.com/t/other-db-backends/4262/6 "2025-02-07T01:57:47Z")

</div>

MariaDB? Anybody?

---

<div class="post-metadata">

**Author:** ![Tim](https://ifnotnil.com/user_avatar/ifnotnil.com/tim/32/13_2.png) [@Tim](https://ifnotnil.com/u/Tim)\
**Post date:** [7 February 2025 02:13 UTC](https://ifnotnil.com/t/other-db-backends/4262/7 "2025-02-07T02:13:57Z")

</div>

> [@mikey](#):
>
> what’s wild, though, is there is no account lockout. you can brute force your way in, and there is nothing to stop you.

Fail2Ban can help with that! I found a [filter design proposal](https://gist.github.com/rc9000/fd1be13b5c8820f63d982d0bf8154db1) but it needs tweaks to actually function. A little light reading and I’m sure you’ll be better off than “let them keep trying.” 🙂

---

<div class="post-metadata">

**Author:** ![mikey](https://ifnotnil.com/user_avatar/ifnotnil.com/mikey/32/4579_2.png) [@mikey](https://ifnotnil.com/u/mikey)\
**Post date:** [7 February 2025 14:03 UTC](https://ifnotnil.com/t/other-db-backends/4262/8 "2025-02-07T14:03:17Z")

</div>

imagine just leaving an admin account exposed to the air

---

<div class="post-metadata">

**Author:** ![npalardy](https://ifnotnil.com/user_avatar/ifnotnil.com/npalardy/32/10_2.png) [@npalardy](https://ifnotnil.com/u/npalardy)\
**Post date:** [7 February 2025 16:00 UTC](https://ifnotnil.com/t/other-db-backends/4262/9 "2025-02-07T16:00:26Z")

</div>

No

PostgreSQL is much nicer and absolutely 100% free for ANY use commercial or otherwise  
Maria & mySQL have long had screwy dual licensing

And they just arent as capable IMHO

---

<div class="post-metadata">

**Author:** ![YogiYang](https://ifnotnil.com/letter_avatar_proxy/v4/letter/y/ecccb3/32.png) [@YogiYang](https://ifnotnil.com/u/YogiYang)\
**Post date:** [8 February 2025 10:56 UTC](https://ifnotnil.com/t/other-db-backends/4262/10 "2025-02-08T10:56:01Z")

</div>

> [@mikey](#):
>
> anyone have something else they’re using?

Valentina DB Server.

> **[Valentina Server Overview: Database, Reports and Forms Server on Windows,...](https://valentina-db.com/en/valentina-server-overview)**
>
> Valentina Server Overview: Database, Reports and Forms Server on Windows, Linux & macOS

Directus.

> **[The Headless CMS + Backend for Every Custom Build](https://directus.io/)**
>
> Built for developers who need more than just a CMS. Manage complex content structures, handle digital assets, and control user permissions – all through an intuitive Studio.

---

<div class="post-metadata">

**Author:** ![YogiYang](https://ifnotnil.com/letter_avatar_proxy/v4/letter/y/ecccb3/32.png) [@YogiYang](https://ifnotnil.com/u/YogiYang)\
**Post date:** [8 February 2025 11:04 UTC](https://ifnotnil.com/t/other-db-backends/4262/11 "2025-02-08T11:04:59Z")

</div>

This is an interesting hosting services for a variety of RDBMSs.

> **[Databases - Fully managed open-source catalog | Elest.io](https://elest.io/fully-managed-services/databases)**
>
> Browse our curated catalog of open source database software options, spanning relational, NoSQL, and more. Uncover community-backed, cost-effective solutions for your database management needs.

---

<div class="post-metadata">

**Author:** ![SteveW](https://ifnotnil.com/letter_avatar_proxy/v4/letter/s/f05b48/32.png) [@SteveW](https://ifnotnil.com/u/SteveW)\
**Post date:** [28 March 2025 12:41 UTC](https://ifnotnil.com/t/other-db-backends/4262/12 "2025-03-28T12:41:27Z")

</div>

[Bun](https://bun.sh/) has SQLite built in and now connects to PostgreSQL out of the box too ( and MySQL/MariaDB is coming soon ).

If you’re looking to implement a json-rpc api over http Bun is definitely worth considering.

If you’re unfamiliar with Bun it’s similar to Node JS ( and it’s compatible with many node modules ) but has quite a lot more built in. There are other nice features too, like web workers genuinely running in another thread and TypeScript being usable directly without having to be compiled first.

---

<div class="post-metadata">

**Author:** ![mikey](https://ifnotnil.com/user_avatar/ifnotnil.com/mikey/32/4579_2.png) [@mikey](https://ifnotnil.com/u/mikey)\
**Post date:** [28 March 2025 14:39 UTC](https://ifnotnil.com/t/other-db-backends/4262/13 "2025-03-28T14:39:57Z")

</div>

> [@mikey](#):
>
> what’s wild, though, is there is no account lockout. you can brute force your way in, and there is nothing to stop you.

update: after a really bizarre argument with one of their techs about why you should or shouldn’t lock users out (like, dude, thanks for the advice. i disagree. STFU, already), and a bit of help from one of their other techs, then submitting a bug report, and a PR, i was able to write my way around this, using ephemeral users.

## Ephemeral users, for the masochistic

### Server:

- create your own auth flow, which is straightforward enough (username/password/hash/salt lookup, in this case, track failures and successes, apply rules for when to lock someone out).
- you’ll wind up writing a short edge function, as the endpoint for your custom auth flow. this keeps baddies from breaking your instance with a packet flood.
- if you have decided that someone is ok to let pass, create a temporary (ephemeral) user in supabase. like many things in supabase, this is just done with SQL and PLSQL. easy. i didn’t know a thing about plsql before i started, but i was able to get up to speed very quickly.
- return the ephemeral user info to the auth flow.

### App:

- uses their (regular) user credentials to hit your edge function and get authenticated
- receives the ephemeral user credentials in the return message
- follows the normal supabase auth flow, using the ephemeral user credentials. they’re in.
- uses the supabase API for whatever language the app is written in.
- if the session expires/JWT gets rejected, first try the refresh token, and if that does not work, go back to step 1, because:

### Server:

systems that use JWT’s, like supabase, do not expire refresh tokens. that means that any expired user session can use a refresh token, once, to get back in (and get another refresh token). cron is your friend:

- set a delete-session timer (depending on rules/logic). note that this will have the effect of invalidating the refresh token, but not the session.
- set a delete-ephemeral user timer (depending on rules/logic). this has the effect of forcing the login process to start from the beginning.
