Trying to test lemmy on my vps ubuntu 20.04. Followed the docs but cant get to configured correctly.
root@*******:/lemmy# docker-compose up -d WARNING: The Hn variable is not set. Defaulting to a blank string. WARNING: The n4WfWc variable is not set. Defaulting to a blank string. Starting lemmy_iframely_1 ... done Starting lemmy_pictrs_1 ... done Starting lemmy_postgres_1 ... done Starting lemmy_lemmy_1 ... done Starting lemmy_lemmy-ui_1 ... done
i think it has to do with my nginx lemmy.conf. I have replaced proxy pass 0.0.0.0 with my vps ip (is this correct?) but can't get to working. Installed with letsencrypt and using cloudflare.
frontend
location / {
# The default ports:
# lemmy_ui_port: 1235
# lemmy_port: 8536
set $proxpass "http://0.0.0.0:1235";
if ($http_accept = "application/activity+json") {
set $proxpass "http://0.0.0.0:8536";
}
if ($http_accept = "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"") {
set $proxpass "http://0.0.0.0:8536";
}
if ($request_method = POST) {
set $proxpass "http://0.0.0.0:8536";
}
proxy_pass $proxpass;
rewrite ^(.+)/+$ $1 permanent;
# Send actual client IP upstream
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# backend
location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) {
proxy_pass http://0.0.0.0:8536;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# Rate limit
limit_req zone=lemmy_ratelimit burst=30 nodelay;
# Add IP forwarding headers
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# Redirect pictshare images to pictrs
location ~ /pictshare/(.*)$ {
return 301 /pictrs/image/$1;
}
location /iframely/ {
proxy_pass http://0.0.0.0:8061/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Anonymize IP addresses
https://www.supertechcrew.com/anonymizing-logs-nginx-apache/
map $remote_addr $remote_addr_anon { ~(?P\d+.\d+.\d+). $ip.0; ~(?P[^:]+:[^:]+): $ip::; 0.0.0.0 $remote_addr; ::1 $remote_addr; default 0.0.0.0; }
Please help. Thanks.
services: postgres: image: postgres:12-alpine environment: - POSTGRES_USER=root - POSTGRES_PASSWORD=mypasswordhere - POSTGRES_DB=lemmy volumes: - ./volumes/postgres:/var/lib/postgresql/data restart: always
lemmy: image: dessalines/lemmy:0.11.2 ports: - "127.0.0.1:8536:8536" restart: always environment: - RUST_LOG="warn,lemmy_server=info,lemmy_api=info,lemmy_api_common=info,lemmy_api_crud=info,lemmy_apub=info,lemmy_apub_receive=info,lemmy_db_queries=info,lemmy_db_schema=info,lemmy_db_views=info,lemmy_db_views_actor=info,lemmy_db_views_moderator=info,lemmy_routes=info,lemmy_utils=info,lemmy_websocket=info" volumes: - ./lemmy.hjson:/config/config.hjson depends_on: - postgres - pictrs - iframely
lemmy-ui: image: dessalines/lemmy-ui:0.11.2 ports: - "127.0.0.1:1235:1234" restart: always environment: - LEMMY_INTERNAL_HOST=lemmy:8536 - LEMMY_EXTERNAL_HOST=mydomain.com - LEMMY_HTTPS=true depends_on: - lemmy
pictrs: image: asonix/pictrs:v0.2.6-r2 ports: - "127.0.0.1:8537:8080" user: 991:991 volumes: - ./volumes/pictrs:/mnt restart: always
iframely: image: dogbin/iframely:latest ports: - "127.0.0.1:8061:80" volumes: - ./iframely.config.local.js:/iframely/config.local.js:ro restart: always mem_limit: 500m
Hi, I'm a new user of Lemmy. I install my new server using ubuntu with docker
then run commands step by step.
my website URL: https://bimberspot.com