this post was submitted on 09 Jun 2023
12 points (100.0% liked)

Self Hosted - Self-hosting your services.

11223 readers
1 users here now

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

Important

Beginning of January 1st 2024 this rule WILL be enforced. Posts that are not tagged will be warned and if not fixed within 24h then removed!

Cross-posting

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

founded 3 years ago
MODERATORS
 

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 πŸ˜„

top 13 comments
sorted by: hot top controversial new old
[–] [email protected] 5 points 1 year ago (1 children)

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.

[–] [email protected] 3 points 1 year ago (1 children)

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 πŸ˜„

[–] [email protected] 2 points 1 year ago* (last edited 1 year 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.

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago) (1 children)

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/t/issues-with-router-priorities/4565/12

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.

[–] [email protected] 2 points 1 year ago (1 children)

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

[–] [email protected] 3 points 1 year 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.

[–] [email protected] 2 points 1 year ago

I’m using Docker with NPM and it was pretty easy to setup

[–] [email protected] 2 points 1 year ago (1 children)

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

[–] [email protected] 1 points 1 year 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

[–] [email protected] 2 points 1 year ago

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

[–] [email protected] 1 points 1 year ago (1 children)

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

[–] [email protected] 1 points 1 year ago (1 children)

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

[–] [email protected] 1 points 1 year 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

load more comments
view more: next β€Ί