this post was submitted on 07 Jul 2023
3 points (100.0% liked)
Lemmy Support
4654 readers
21 users here now
Support / questions about Lemmy.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Hello !
I followed your instructions, taking the:
and sticking:
in the "http {" section + changing all the {{domain}} to lemmy.mindoki.com and changing the {{lemmy_port}} to 1236 (FYI: 0.0.0.0:1236 hits up Lemmy locally)
Saving it all off in the nginx nginx.conf file.
I feel exceedingly stupid, but is this the way to go? Because I get this error when I reload nginx:
nginx: [emerg] host not found in upstream "lemmy:8536" in /etc/nginx/nginx.conf:111
Cheers and thanks again!
Edit: removing the upstreams, changed the backend proxy_pass, but to no avail...
Can you describe your setup in more details? Are you using the Docker setup with also NGINX running on the host outside of Docker?
If so,
nginx_internal.conf
must be passed in as a volume to the inner NGINX via the docker-compose. On the host, you only need the bits fromnginx.conf
. Don't try to use the internal ones, it doesn't make sense.If you post your configs it will be easier to pinpoint exactly what's wrong. Also paste the output of
docker ps
.Hello, I'm back with more questions and clarifications!
This is what I did to install Lemmy:
Install a fresh Linux Mint on an old PC.
Follow the 'official' docker install: https://join-lemmy.org/docs/administration/install_docker.html
I continued with nginx, lets encrypt etc.
I also installed PosgreSQL and added a user Lemmy.
I forward a TCP connection from my fix public IP to the lemmy PC and pointed lemmy.mindoki.com with an A redirection onto that public IP:PORT.
The only 'exotic' thing done was that I added these lines to /home/fediverse/.bashrc :
export LEMMY_CONFIG_LOCATION="/media/fediverse/Storage/lemmy/lemmy.hjson"
EMMY_DATABASE_URL="postgres://lemmy:redacted_password@localhost:5432/lemmy"
. "$HOME/.cargo/env"
I don't think (but not completely sure) that the last line was added by me manually.
Now I can access Lemmy locally on localhost:1236 and everything works (inscription, creations of 'subs' etc).
I added the nginx.conf config file at the end of this message (some lines are commented out to make it work at all).
Almost feels like I should have a very much shorter nginx config file 🙃
Thanks again!
Cheers
EDIT: I messed something up, the server now only answers "Server error", I'll be back later ...
EDIT: The site itself works now, so I "only" need help with nginx :-)
EDIT: DISCARD THE FOLLOWING LINES (Strike-through doesn't seem to work):
~~BTW, I get a handful of errors when I start Lemmy :
thread 'main' panicked at 'Error connecting to postgres://lemmy:thepassword@postgres:5432/lemmy: could not connect to server: Connection refused
lemmy_1 | Is the server running on host "postgres" (172.18.0.2) and accepting
lemmy_1 | TCP/IP connections on port 5432?
I do not know at all where that 172.18.0.2 address comes from sweating :-D~~
I'm off one week on holidays, will sure post all config when I come back, thanks again!