Lemmy instance with traefik

3 years ago by ZebraGoose to c/selfhost

Hello, first post here since leaving Reddit (yay)

Has anyone successfully setup an Lemmy instance with traefik? I was thinking about selfhost a private instance but saw that Lemmy didnt support traefik.

Im thankful for any help ๐Ÿ˜„

dleewee 5 points 3 years ago

I see no reason you couldn't. Just change the listen port on the nginx config to something other than 80 (so it doesn't conflict), then tell treafik to send traffic to that port. Disclaimer, I'm not well versed with treafik, but have worked with several other reverse proxies to know the general idea.

path: 0 39523, hotness: undefined, score: 5, children: 2
ZebraGoose 3 points 3 years ago

OK, i think i understand gonna try this later. I have some services behind traefik but most of them i have followed very detailed guides ๐Ÿ˜„

path: 0 39523 40089, hotness: undefined, score: 3, children: 1
casey 2 points 3 years ago

Iโ€™m going to be honest and say itโ€™s probably a challenge, but with the combination of ChatGPT4, I bet you be just as successful as I was! I was able to get my instance to run behind Nginx Proxy Manager. It took several changes but is functional now.

path: 0 39523 40089 40569, hotness: undefined, score: 2, children: 0
ture 3 points 3 years ago

I have to admit I was a bit lazy and started with a new vm when setting up my instance earlier today but I found this thread in the traefik community where someone was asking question on how to setup their traefik config for Lemmy. It's a bit old, last post is from spring of 2020 but it's already traefik v2, so hopefully not much changed since then...

https://community.traefik.io/...

EDIT: By being lazy and starting with a new VM, I meant that I could just use the Ansible playbook and had it running in a few minutes.

path: 0 39706, hotness: undefined, score: 3, children: 2
ZebraGoose 2 points 3 years ago

A sweet im gonna look into this later this weekend. Thanks alot!

path: 0 39706 40140, hotness: undefined, score: 2, children: 1
ture 3 points 3 years ago

In case you get it working it would be really cool if you cold post you config somewhere. Maybe the main dev could even integrated it in the docu at some point. I'm quite sure there are more people who set up there home servers using traefik and that there is an intersection between them and people who consider starting a lemmy instance.

E.g. I would really like to ditch the VPS I'm currently using for my instance and run it on my home server since there are free resources and I would have to spend the 5 euros for the VPS.

path: 0 39706 40140 50038, hotness: undefined, score: 3, children: 0
ZebraGoose 2 points 3 years ago

Yay! Got it to work finally, but i couldnt make it work without ngnix. Will post my settings later

path: 0 208732, hotness: undefined, score: 2, children: 0
nihil 2 points 3 years ago

Iโ€™m using Docker with NPM and it was pretty easy to setup

path: 0 42411, hotness: undefined, score: 2, children: 0
grouvie 2 points 3 years ago

What does your setup look like? Using traefik instead of nginx shouldn't be a big problem.

path: 0 46519, hotness: undefined, score: 2, children: 1
ZebraGoose 1 point 3 years ago

I run a elitedesk g2 800 with proxmox and have a ubuntu VM with docker. And on that VM i got traefik as my reverse proxy so port 80 is for traefik. But i think i can make it work. I just need to find the time to try it

path: 0 46519 55719, hotness: undefined, score: 1, children: 0
stroskler 1 point 3 years ago

You can simply use traefik as ssl offloading pointing to the nginx container in the lemmy stack. Thatโ€™s what I am doing with docker swarm. I have not figured out how to get rid of that additional nginx

path: 0 138771, hotness: undefined, score: 1, children: 2
ZebraGoose 1 point 3 years ago

Okay, thats what im planning to. Read somewhere you could drop the nginx and just use traefik with the settings in nginx but that over my skills

path: 0 138771 151628, hotness: undefined, score: 1, children: 1
stroskler 1 point 3 years ago

I tried this but it's not working on my site. So basically I am using the default nginx and doin the ssl offloading with Traefik

path: 0 138771 151628 171698, hotness: undefined, score: 1, children: 0
selfhost
selfhost

@lemmy.ml

login for more options
21214
570
246

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules

  • No harassment
  • crossposts from c/Open Source & c/docker & related may be allowed, depending on context
  • Video Promoting is allowed if is within the topic.
  • No spamming.
  • Stay friendly.
  • Follow the lemmy.ml instance rules.
  • Tag your post. (Read under)

Important

  • Lemmy doesn't have tags yet, so mark it with [Question], [Help], [Project], [Other], [Promoting] or other you may think is appropriate. This is strongly encouraged!

Cross-posting

If you see a rule-breaker please DM the mods!

go to feed...