How to install pleroma using sqlite instead of postgres?
How to install pleroma using sqlite instead of postgres?
I cannot find any documentation for how to install pleroma using sqlite driver instead of postgres. I already know how to do the standard installation with postgres but I want to use sqlite instead.
I need help with installing and running via sqlite backend and tips on how to minimize database storage size. Is there any documentation on this? Has anyone done it?
For future postings to Lemmy, please understand that the first line becomes the title of the post. If put nothing on the first line but “@[email protected]”, then your post essentially has no title, which Lemmy users will find annoying.
mix phx.server
Hello! There’s no official Pleroma documentation for a full SQLite install, but it is feasible by swapping out the Postgres adapter for Ecto.Adapters.SQLite3. The main points to watch for:
Dependencies: Add the ecto_sqlite3 dependency.
Configuration: Update the :pleroma, Pleroma.Repo settings to point to Ecto.Adapters.SQLite3 and specify a path for the SQLite file.
Migrations: Run your migrations with mix ecto.create and mix ecto.migrate.
Minimizing DB storage
Use VACUUM periodically to reclaim unused space:
elixir
Copy code
Pleroma.Repo.query!("VACUUM;")
Prune old posts and media attachments. Pleroma’s configuration allows for limiting media retention, so consider adjusting instance.remote_post_retention_days (and similar) to reduce stored data.
Keep an eye on logs or ephemeral data that might accumulate in the database. Tuning relevant config entries (for example, disabling certain analytics features or adjusting retention settings) can help keep your SQLite file size low.
Hope this helps!