Lemmy Instance Deployment

Due to the recent Reddit drama, Lemmy has received more traction and there is a lot of confusion and poor documentation on the deployment of standing up your own instance.

It would be awesome to have a walk-through detailing how to stand up an instance on a VPS. Please include with it actual representations of the dock-compose, nginx.conf, and lemmy.yaml files.

If you could walk through each section of those to explain what they do and how the files interact with each other, that would be great.

2 Likes

Interesting… I can’t justify the expense of VPS or hosting (e.g. AWS / Azure) something like this… But it’s interesting, and good to see yet another part of the Fediverse named after a Rock Star (e…g Lemmy, and Mastodon [one of my favourite bands])… I started using Mastodon(.social) when Musk shat all over Twitter - but I was never much of a twitter user anyway…

1 Like

Thanks for the response. You could always do the tutorial on a $5/month Linode and then just tear it down when done.

I can set up a VM here in my proxmox network and write something up. Will mess with it over the weekend.

2 Likes

So I’m going to make documentation for setting up Lemmy from scratch and via Docker. Did the one from scratch first, because you know … more fun … currently running into this error:

root@lemmy:~# systemctl status lemmy
● lemmy.service - Lemmy - A link aggregator for the fediverse
     Loaded: loaded (/etc/systemd/system/lemmy.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sat 2023-06-24 02:31:24 UTC; 31s ago
    Process: 44656 ExecStart=/usr/bin/lemmy_server (code=exited, status=203/EXEC)
   Main PID: 44656 (code=exited, status=203/EXEC)

Jun 24 02:31:24 lemmy systemd[1]: lemmy.service: Scheduled restart job, restart counter is at 5.
Jun 24 02:31:24 lemmy systemd[1]: Stopped Lemmy - A link aggregator for the fediverse.
Jun 24 02:31:24 lemmy systemd[1]: lemmy.service: Start request repeated too quickly.
Jun 24 02:31:24 lemmy systemd[1]: lemmy.service: Failed with result 'exit-code'.
Jun 24 02:31:24 lemmy systemd[1]: Failed to start Lemmy - A link aggregator for the fediverse.
root@lemmy:~# 

So now I applied to join their support forums, and I’ll ask about it there when I get approved… sigh.

1 Like

looks like im going to be basically re writing the documentation while I’m at it, because it’s so inaccurate, its digusting.

1 Like

Once you’re done - I might give it a “whack” on my Pi 4… its the closest device to my “edge” :smiley: - and it’s doing buggerall now - used to be my VPN server (to VPN into my home LAN) and my Pi-Hole… But since I started using Brave, no need for Pi-Hole (using Pi-Hole prevented me access one Aussie Free TV service SBS OnDemand) and my router can now host my VPN to home…

If it proves too sluggish on my Pi4 (don’t see why it should, it’s headless, has 4 GB of RAM and 4 cores) - I could try one of my 8 GB RAM core 4 Pi4s…

good luck, this install is buggy as all hell.

Are you doing the straight out docker, or using ansible… I’m tempted to try the ansible method, mainly 'cause I’ve used tiny bits of ansible, and should force myself to learn more (and force myself to do more git commits! Mostly I don’t do it for months, then when I try, I forget, stumble, then break it!)…

Encouraged to read that lemmy only uses about 150 MB of RAM…

Then I also need to get my head around https too, I can get a free SSL cert from NOIP for the next 12 months… SSL is my LEAST favourite thing in NIX world! I DETEST it!

I figured for tutorial’s sake I’d do it from scratch … and now I’m realizing that was kind of a masochistic choice on my part. When I get this working I’ll do a docker install and write that up as well though …

1 Like

you know you’re in it for the long haul when the proposed fix generates another error, and the fix to that generates yet another error. This is going to be one hell of a tutorial LOL

it’s chewing hard. lol

The original documentation says it takes 17 minutes to build on a dual core machine … this is quad core, so maybe I’ll have better time.

I don’t have the slowest server in the world back here, but this thing is making it look like a 286. lol

1 Like

I’m kinda ready to go…

I may in fact do it from scratch too… On my Pi4… I expect my 4 arm64 cores will be a LOT slower than your 4 x86_64 cores mate :smiley: !

I’ve now got SSL (from NOIP) working with nginx on there…

Took a bit of tweaking e.g. learning that certificate has two “i” not just one ( certficate is just wrong :smiley: ]) - and NOIP’s guide for NGinx contains deprecated information - no longer need “ssl on” - and facepalm Homer-esque exclamation “Doh!” moment - EVERY configuration string in the nginx config file has to be terminated with a semi-colon :smiley:

I can tell you one thing! SSL on NGinx is an order of magnitude easier than my most recent experience of converting SSL certificates into freaking Java JKS (for shonky Tomcat apps), and also using some proprietary KVM deployment tool (won’t say the name or vendor of the product, but, it’s horrible, and still uses FLASH!) to deploy updated certificate chains… Many legacy products on these platform still expect separate files for intermediate certificate… Not NGinx (which I haven’t used or managed since 2016ish - and I miss it!)…


Crumbs! I’m still not sure if my NOIP SSL cert is a wildcard one or not… I guess I’ll find out when it doesn’t work :smiley:

I hope you have a lot of time to kill … lol

Also protip, when you get to where you’re doing the front end, and it wants you to install node js … make sure you install v16, otherwise it bitches about it hard later on. LOL

2 Likes

Maybe someone else will have more luck with this than I did … I can’t get the damn thing to go no matter what I do. I did make it install once, with the use of a deploy script I found. That did it 100% of the time. Here’s a link to it in case anyone’s wanting an instance. Instructions are in the link :

PS. The script only takes a few minutes, but with an ARM based processor, it could take up to 30 minutes while it compiles manually @daniel.m.tripp

I’m definitely not done… just taking a break. lol

1 Like

Right, round 200 … think I’m going to try using a Linode this time instead of my own infrastructure. Maybe it will help things? Doing a from scratch install.

1 Like

This is great because Linode is what I am using and still hitting my head against a wall.

oh trust me, you’re not the only one. I got it working, but … it’s kinda broken. But I will fix it, and there will be a tutorial damnit. lol

so having issues with registration not working properly, and the entire installation just hanging. Going to try rebuilding using a different version of the UI, as suggested by someone in the support forums. Will let you all know how that works out (or doesn’t)

2 Likes

status update : currently working this out in the lemmy technical support forum… The version of nginx.conf they give you in the documentation doesn’t seem to work - it takes you to the actual lemmy server instead of going to the UI … the few times I’ve gotten it to go to the UI, it’s been hanging on me… so we’ll see where this goes. I will get this working.