DietPi icon indicating copy to clipboard operation
DietPi copied to clipboard

DietPi-Software | Lemmy: A link aggregator for the fediverse

Open mtekman opened this issue 2 years ago • 5 comments

The Fediverse is really picking up steam since the latest Reddit drama and a lot of people are spawning their own Lemmy instances.

I’m impressed that Lemmy only needs 150 MB RAM and uses virtually no CPU, so it seems ideal for DietPi

This is a WIP based on the in the installation page, using the "From Scratch" approach, since Docker and Ansible are no-nos.

Surprisingly there are no Deb packages of existing builds out there, so compilation is taking ~40mins on my Rpi4

The install encompasses two builds:

  • Lemmy Backend
  • Lemmy UI

If we should split them into seperate things, lemme know!

mtekman avatar Jun 15 '23 15:06 mtekman

Sounds like a great addition! Many thanks for working on it.

MichaIng avatar Jun 15 '23 16:06 MichaIng

After much head-slamming, I finally got it to build and for lemmy to talk with the DB.

The whole thing is a stack of:

  • Postgres
  • Lemmy Server (talks to postgres)
  • Pict-rs (picture server, talks to lemmy server)
  • Lemmy UI (talks to lemmy server)

Most of the backend files are contained in the DB so I migrated the location of the DB to the dietpi_userdata/lemmy/postgres folder.

The picture server is optional, but I figured most users would want it. I pointed these to the dietpi_userdata/lemmy/pictrs folder.

Hopefully this will all enable users to migrate their files from one lemmy instance to another more easily, even if they delete the app.

I've also included an update script at /etc/bashrc.d/lemmy.sh to update Lemmy Server, Lemmy UI, and Pict-rs.... though it's really not clear where pict-rs is installed or if it's embedded into lemmy server....

TODO: Figure out Pict-rs install location. Or if it needs to be manually installed.


@MichaIng I'd appreciate if you could run your neatness magic on this, as it is sloppy as hell, and was a pain to write (I tried installing everything initially as the default root user, but that did not work).

mtekman avatar Jun 17 '23 22:06 mtekman

I've also included an update script at /etc/bashrc.d/lemmy.sh to update Lemmy Server, Lemmy UI, and Pict-rs.... though it's really not clear where pict-rs is installed or if it's embedded into lemmy server....

TODO: Figure out Pict-rs install location. Or if it needs to be manually installed.

After a quick discussion in the above link, it seems the pict-rs install/update is not needed as a separate tool because it's embedded in the lemmy_server

mtekman avatar Jun 21 '23 12:06 mtekman

This PR will take some time, my box is down for reasons unclear to me, and Lemmy is very much a config queen to get running. Once I get a good stable running config, I'll add more to this.

Thanks for your review so far!

mtekman avatar Jun 23 '23 08:06 mtekman

No problem, take your time. I will also do some tests when I find time. Btw, we have a GitHub Actions workflow to test software installs: https://github.com/MichaIng/DietPi/actions/runs/5366395703

If I am not mistaken, you should be able to trigger them from your fork, when you enable GitHub Actions there. For the Trixie tests to work, the branch would need a rebase onto our current dev.

MichaIng avatar Jun 24 '23 22:06 MichaIng