this post was submitted on 15 Jun 2023
34 points (100.0% liked)

Selfhosted

40727 readers
494 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:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

Since I had a hard time, and ive seen a few people still having issues. None of the posts exactly helped with my setupI decided to post my current docker-compose lemmy conf and explain a few things.

Some steps are skipped such

Also the docker-compose in the docs wouldnt federate properly until i explicitly added ports to the compose.

FIRST STEPS

First off im running lemmy on oracle free tier arm instance with 4 cores 24 gb of ram. This vps is not accessible from the internet. ON another free box I run nginx Proxy Manager which connects to any vm on my home or other networks I want accessible.

I connect to the proxy box by using tailscale but any vpn should work

DOCKER INSTALL

So here is the compose file. the lemmy external host is the IP address of the proxy box. I used the tailscale ip . If you are not using an arm box remove the arm tag for the image.

https://gist.github.com/Death916/77c8d2c0d0cb62019a5aba71f8292166

now here is the lemmy.hconf that should be in same dierectory as compose file. Edit with the same db as in the compose.

https://gist.github.com/Death916/161928397f100f4bebac66cb909e6d99

Proxy setup

Make an entry for your server. i used the tailscale ip with the port in the compose 1236.. Now you need to add this to the advanced tab.

https://gist.github.com/Death916/6edcca3ec6c3df9df7301256963bade1

This nginx.conf is default from the lemmy project used for the webserver and also needs to be in same directory as the compose.

https://gist.github.com/Death916/0da841d45923cded1e479427f1cde6e8

You also need some custom locations in proxy manager. A new entry for each of these.

Location = /api

IP = internal IP of your server host

port = 8536 (lemmy port, not the lemmy-ui port)

Repeat the above for each of the others with locations as:

/pictrs

/feeds

/nodeinfo

With this setup only the box with nginx proxy manager is actually accessible while lemmy runs on a different one that is closed. The only thing different from the setup in the docs is ports listed for everything so they can communicate with nginx over tailscale.

top 11 comments
sorted by: hot top controversial new old
[–] [email protected] 8 points 2 years ago

Oracle

[ vietnam flashbacks ]

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

Thanks for sharing. The official installation documentation is a little out of date and I had issues too setting up the docker installation. Figured it out in the end but not after a lot of head scratching and testing.

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

ya it was a bit frustrating, the docs had things missing or left out. seems like they updated it now but still a couple things i had to change.

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

I ended up using their nginx configuration instead of NPM. I didn't want to start messing with that. If ever I reinstall I may attempt it.

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

i didnt want that box exposed directly and wanted to point it at my existing proxy. probably would have been easier not to.

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

Yeah I get that. I have mine running behind Cloudflare where they proxy the dns on their own.

[–] dyslexicjedi 1 points 2 years ago (2 children)

So, I've followed along with a arm vps. I have lemmy setup, but I'm missing the part on how to federate it. I went into the admin console and added sites to the "allowed instances" hit save, but I refresh the page and they are gone. What am I missing here?

[–] [email protected] 1 points 2 years ago* (last edited 2 years ago)

Do you have tls set to true in your config? First thing to check.

** # Whether the site is available over TLS. Needs to be true for federation to work. tls_enabled: true**

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

By putting things in the allow list I believe it blocks everything not in the list. I suggest doing a Blocklist instead. Not sure why it's not saving g though id check the db. Also when I tried to block some instances the same thing happens too, could be a bug.

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

I was just playing with this yesterday trying to get the Docker image working on ARM and I went down a rabbit hole trying to build a new image for ARM, not realizing that one is already built/distributed 🤦

Thanks for this!

[–] [email protected] 2 points 2 years ago

I didn't notice either because the .16 version worked for me without a tag. When installing .17 I started getting errors and had to search around.

load more comments
view more: next ›