Replies: 14 comments 11 replies
-
I tried setting up self-hosting on a raspberry pi the other day, and the dependency on Postgres 14 was a showstopper since that wasn't available as a pre-compiled package so I had to compile it myself which was too much work. I looked at the SQLite option but since it wasn't official I didn't want to rely on it. I currently don't sync at all, but an RPi + SQLite setup for me personally would be great :) Would be just for me at home. |
Beta Was this translation helpful? Give feedback.
-
What I would appreciate is input from anyone self hosting How many users do you host a server for? 6 servers / workstation currently...more to come when I can installed in more devices. 1 user, me :-) Would SQLite be a "better" or "easier" solution for you? No. I think SQLite it's good for low resources devices, and for test the software as an optionally alternative...I prefer PostgreSQL or Mysql/MariaDB...I don't trust SQLite for example in nfs pvc in k8s cluster, sometimes works great, sometimes gave corruption error. Would you be ok with some manual steps to migrate from postgres -> sqlite in a possible v17? I think as an alternative solution, make them both available, for people to have freedom to choose, what solution is best for their uses cases. Any other thoughts? If SQLite will be default, some people will want PostgreSQL or Mysql/MariaDB alternative (like me) :-( In other language of programming (like java) do you have a database abstraction, it's will easy to maintain different alternatives (I don't know in rust) Maybe some library like this one: https://docs.rs/quaint/latest/quaint/ |
Beta Was this translation helpful? Give feedback.
-
Neither. I personally and generally favor Postgresql over SQLite for scaleability reasons, but these don't apply for my single-user instance. Considering the assumption that most atuin server instances may be rather small and most will probably be run by hobbyist, I do however see how sqlite would be beneficial for said crowd and simplify deployment.
I think api.atuin.sh is probably the largest instance & that more people will default to using that instead to self-host something; and those that do self-host most likely wont have to deal with the scalability/performance considerations api.atuin.sh has to deal with if it continues growing. So:
seems like the way to go (I say this from a generally postgresql-favorable and more often than not sqlite sceptical point of view). |
Beta Was this translation helpful? Give feedback.
-
Around a dozen
Not in our case: we run the
So long as we can choose
Great idea to make this more accessible, so long as we can also pick |
Beta Was this translation helpful? Give feedback.
-
I swore I checked the issues for something like this one today but didn't see it :) I also literally just discovered Atuin today, after watching the Chris Biscardi video.
I just started self-hosting, with one user (me) and two machines.
Yes, I prefer to not run Docker or Postgres.
Yep! I mean, I just spent the day adding the ability to do this (similar to conrad's schema changes, but more comprehensive, and with a working server), so I figure getting my data to v17 from my current db won't be harder than that.
I noted that the |
Beta Was this translation helpful? Give feedback.
-
Also, I get more than 20k insertions/sec with |
Beta Was this translation helpful? Give feedback.
-
Thank you for considering this! This is very exciting!!
Single user
For me absolutely. I have a small little server at home that I run a few personal things via podman containers: like Home Assistant and nginx. I've really wanted to use a self hosted Atuin instance and would LOVE for it to just be a single podman container. I've started wanting it bad enough however that I'll probably work out how to get a simple postgres docker image.
Absolutely, no problem |
Beta Was this translation helpful? Give feedback.
-
Thank you for making very careful and considered choices when it comes to how you affect your users, and especially for taking care of selfhosters. I support the move to SQLite and think it's a good "default", as long as I still have the option of moving back to PostgreSQL if hosting a huge instance for a lot of people. I think for most selfhosters, optimising towards "one" user makes sense than optimising for 2500. |
Beta Was this translation helpful? Give feedback.
-
Just myself
Not really anymore I guess: I'm running Postgres for other services anyway, and the account setup is already done.
Sure. (Or even with just recreating the server altogether: reconnecting+syncing all clients would restore everything, right?)
SQLite would feel more comfortable, just because there are less moving parts. Having a simple SQLite file as backup also feels saver than a PostgreSQL database dump. |
Beta Was this translation helpful? Give feedback.
-
Just chipping in here as a contributor to the SQLite backend
Just myself at the moment
Yes, because I don't currently have PostgreSQL running anywhere but I do have https://litestream.io/ setup with several other services for SQLite disaster recovery, so the database is constantly streamed to S3. While standing up a PostgreSQL database isn't tricky, Atuin would be the only thing using it.
Not really applicable since I already use the SQLite backend :)
I'm personally a huge fan of SQLite and many of my self hosted services run on a small Kubernetes cluster made of 2 Raspberry Pi 4Bs, so it's very nice not having to run a separate server for the database portion of applications to free up compute. Layering Litestream on top gives me relative peace of mind that I won't experience catastrophic data loss. That said, I have noticed that Atuin's Postgres migrations do take more advantage of PostgreSQL datatypes that SQLite simply doesn't have. For the most part I haven't see that as an issue but is worth keeping in mind. |
Beta Was this translation helpful? Give feedback.
-
Just me currently
No, I prefer Postgres - and already have an instance running.
Sure - as long as I get to keep using Postgres =) |
Beta Was this translation helpful? Give feedback.
-
None yet. The postgres requirement stopped me from setting up sync altogether.
Absolutely!
Not syncing yet, so not an issue.
The prospect of learning how to administrate and secure a postgres server has put me off sync so far. While sqlite would be a perfect solution for me, a fully contained docker container would also be very appreciated. Ie. a container that already includes the postgres setup. This could result in some tricky issue reports for you, though, eg. when postgres major version migration has gone wrong for some reason. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
For myself:
|
Beta Was this translation helpful? Give feedback.
-
Ever since Atuin first released, we have had requests to support SQLite on the server.
For a very long time, I have resisted this. SQLite might work for the average self-hoster (my assumption is that most people self host just for themselves, or perhaps for them and a couple of friends), but it does not work for api.atuin.sh - at time of writing, we are approaching 2500 users and are growing pretty rapidly. I did not want to test each release for two database backends.
@conradludgate implemented an "unofficial" SQLite server over here, which somewhat solves the problem. Lately I've been thinking about ensuring api.atuin.sh continues to scale well, but this may involve making more changes that make self hosting awkward.
So the proposal here is to switch this around. The in-tree database implementation should be SQLite, and we can maintain a separate implementation for api.atuin.sh. This should ensure we are free to handle scaling issues, but also means that the average self-hoster can very easily get started. Integration tests are much easier to write with sqlite, as we can just run against
:memory:
.What I would appreciate is input from anyone self hosting
I'm also interested in hearing from anyone hosting Atuin for their company, and what we can do to support you better.
See: #1107, #356, etc
Beta Was this translation helpful? Give feedback.
All reactions