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 “@pleroma@lemmy.ml”, then your post essentially has no title, which Lemmy users will find annoying.
Any other funny quirks to abuse?
Got it. Thanks for the heads up. Fixed (I think).
Fixed indeed!
In your mix.exs file, ensure you have the SQLite adapter:
defp deps do [ {:ecto_sql, “~> 3.9”}, {:ecto_sqlite3, “~> 0.10”}, # …other Pleroma dependencies ] end
In your config/prod.exs (or dev.exs/test.exs as appropriate):
config :pleroma, Pleroma.Repo, adapter: Ecto.Adapters.SQLite3, database: “/var/lib/pleroma/pleroma.sqlite3”, pool_size: 5
Then, in the terminal, run migrations:
mix ecto.create mix ecto.migrate
Start the server:
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!
Thanks. That was quick. I’ll report back if I have any problems.
Also, would this method work with Akkoma, or has it diverged from Pleroma enough to make this irrelevant?
I’m not intimate with Pleroma
can you describe the obstacle you have?