this post was submitted on 01 Jun 2023
4 points (100.0% liked)

Lemmy Support

4634 readers
2 users here now

Support / questions about Lemmy.

Matrix Space: #lemmy-space

founded 5 years ago
MODERATORS
 

I have a debian linux host with docker installed on it. I followed the guide here: https://join-lemmy.org/docs/en/administration/install_docker.html

Changes that I made:

  • I used a sub folder called lemmy in my containers area rather than /lemmy
  • I copied the nginx.conf file from https://github.com/LemmyNet/lemmy/blob/main/docker/nginx.conf to my lemmy folder and ran a docker-compose up.
  • I changed the proxy service ports to 17008 (other service runs on 80) and 17003 (instead of 443).

I changed absolutely nothing else. No hostnames, no passwords. Nothing. The docker logs show it up and running.

Docker ps shows the instance fine too:

I've tried accessing http://<hostname>:17008, https://<hostname>:18003. I've tried setting my local hosts file for hostname "lemmy" to that server IP and accessing via http://lemmy:17008 and https://lemmy:18003

Is there something obvious that I'm missing?

top 13 comments
sorted by: hot top controversial new old
[–] dessalines@lemmy.ml 3 points 1 year ago* (last edited 1 year ago) (1 children)

Post your docker-compose logs

[–] NotOptionalAnymore@lemmy.ml 1 points 1 year ago (1 children)
[–] dessalines@lemmy.ml 1 points 1 year ago (1 children)

I don't see anything wrong there, but its most likely a proxy issue.

Also you should be using the nginx.conf and docker-compose from here:

https://github.com/LemmyNet/lemmy-ansible/blob/main/templates/nginx.conf

[–] NotOptionalAnymore@lemmy.ml 2 points 1 year ago* (last edited 1 year ago)

Ya, I'm sure it is. Thanks for the tip to use the lemmy-ansible repo for docker instead of the lemmy docker installation. I'll tinker and report back on success or not.

[–] szeraax@lemmy.dcrich.net 2 points 1 year ago* (last edited 1 year ago) (2 children)

I did it! I got my instance up and running. I had to still create the pictrs folder and chown on it to get pictrs to work. And then after that, it was just doing Nginx Proxy Manager and some config in my hjson file. https://www.pastery.net/rpmppa+tdqrrx/#rpmppa

@dessalines@lemmy.ml

[–] szeraax@lemmy.dcrich.net 1 points 1 year ago (1 children)

Though, I do still need to figure out why images aren't loading... source

[–] dessalines@lemmy.ml 1 points 1 year ago

If the pictrs docker logs look fine, it could be more proxy issues. Take another look at the pictrs info docker-compose.yml, lemmy.hjson, and nginx.conf in the lemmy-ansible repo, and make sure it matches your setup.

[–] dessalines@lemmy.ml 1 points 1 year ago

Sweet, glad you got it.

[–] thann@beehaw.org 1 points 1 year ago (1 children)
[–] NotOptionalAnymore@lemmy.ml 1 points 1 year ago

Yes, even though it should not be accessible.

[–] A1kmm@lemmy.amxl.com 1 points 1 year ago (1 children)

If you docker inspect lemmy_proxy_1 to find its IP, and connect to 80/443 there from the host, does it work?

Do you have iptables rules on the host that might be blocking access to the exposed port perhaps?

[–] A1kmm@lemmy.amxl.com 2 points 1 year ago (1 children)

Also the default nginx forward proxy configuration runs nginx on port 1236, not 80, inside the container, and doesn't have any kind of TLS configuration.

I think most people likely have another layer of proxy (e.g. on the host) in front of it, instead of directly exposing the forward proxy from Docker Compose - that's what I do - and that's where I do TLS with a LetsEncrypt certificate.

[–] NotOptionalAnymore@lemmy.ml 1 points 1 year ago* (last edited 1 year ago)

Ya, I have my own reverse proxy in front of all of that. I just wanted to try and get a very basic setup working first. Thanks for the great info, I'll do some research! No IPTables.

load more comments
view more: next ›