User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
services:lemmy [2025/01/29 07:43] willyservices:lemmy [2025/02/04 11:04] (current) willy
Line 52: Line 52:
     password: "<< here your custom database password >>"     password: "<< here your custom database password >>"
   }   }
-  hostname: "lemmy.mydomain.com"+  hostname: "lemmy.mydomain.com" # DO NOT put "https://" here!
   pictrs: {   pictrs: {
     url: "http://pictrs:8080/"     url: "http://pictrs:8080/"
Line 111: Line 111:
     image: nginx:1-alpine     image: nginx:1-alpine
     ports:     ports:
-      # Listen for outside connections on port 10633. You can freely change the left-side +      - "10633:8536"  # Choose an available port on your server!
-      # number to a different port, eg using port 80 if you don't need a reverse proxy. +
-      - "10633:8536"+
     volumes:     volumes:
       - /data/lemmy/nginx_internal.conf:/etc/nginx/nginx.conf:ro,Z       - /data/lemmy/nginx_internal.conf:/etc/nginx/nginx.conf:ro,Z
Line 151: Line 149:
   pictrs:   pictrs:
     image: asonix/pictrs:0.5.16     image: asonix/pictrs:0.5.16
-    # this needs to match the pictrs url in lemmy.hjson 
     hostname: pictrs     hostname: pictrs
-    # we can set options to pictrs like this, here we set max. image size and forced format for conversion 
-    # entrypoint: /sbin/tini -- /usr/local/bin/pict-rs -p /mnt -m 4 --image-format webp 
     environment:     environment:
       - PICTRS_OPENTELEMETRY_URL=http://otel:4137       - PICTRS_OPENTELEMETRY_URL=http://otel:4137
Line 163: Line 158:
       - PICTRS__MEDIA__ANIMATION__MAX_HEIGHT=256       - PICTRS__MEDIA__ANIMATION__MAX_HEIGHT=256
       - PICTRS__MEDIA__ANIMATION__MAX_FRAME_COUNT=400       - PICTRS__MEDIA__ANIMATION__MAX_FRAME_COUNT=400
-    user: 991:991+    user: 991:991 # This 991 will be used to define the UID:GID you need to set ownership of the folder to, as stated above...
     volumes:     volumes:
-      - /data/lemmy/pictrs:/mnt:Z+      - /data/lemmy/pictrs:/mnt:# this is the folder of which you need to set ownership. This folder must exist before first launch
     restart: always     restart: always
     logging: *default-logging     logging: *default-logging
Line 176: Line 171:
     environment:     environment:
       - POSTGRES_USER=lemmy       - POSTGRES_USER=lemmy
-      - POSTGRES_PASSWORD=<< here your lemmy postgres password >>+      - POSTGRES_PASSWORD=<< here your lemmy postgres password >> # the same as in the lemmy hjson above
       - POSTGRES_DB=lemmy       - POSTGRES_DB=lemmy
     shm_size: 1g     shm_size: 1g
Line 190: Line 185:
     image: mwader/postfix-relay     image: mwader/postfix-relay
     environment:     environment:
-      - POSTFIX_myhostname="https://lemmy.mydomain.com"+      - POSTFIX_myhostname="lemmy.mydomain.com" # DO NOT put the "https://" here
     restart: "always"     restart: "always"
     logging: *default-logging     logging: *default-logging
Line 198: Line 193:
 networks: networks:
   lemmy-net:   lemmy-net:
-    dns_enabled: true # this is very important!+    dns_enabled: true # this is very important for the internal proxy
 </file> </file>
-Please note that this compose file is a bit different from the original one. Note the network, which enabled DNS internal name resolver, which is disabled by default in podman but needs to be enabled for the proxy to work. Also note that the //depends// lines have been changed a bit from the docker original example. 
  
 +Please also note that the //depends// lines have been changed a bit from the docker original example, maybe due to some podman differences. 
  
-Last, edit the **customPostgresql.conf** with the output generated from [[https://pgtune.leopard.in.ua/|this page]].+**Note:** first startup might fail because the postgress image takes too long to create the daabase and the lemmy image failsIn this case, just wait until it's done, stop it and restart it.
  
-Now pull it:+Now pull the images:
 <code bash> <code bash>
 podman compose pull podman compose pull
Line 254: Line 249:
     add_header X-Frame-Options "DENY";     add_header X-Frame-Options "DENY";
     add_header X-XSS-Protection "1; mode=block";     add_header X-XSS-Protection "1; mode=block";
 +
 +    access_log /var/log/nginx/lemmy.mydomain.com_access_log main;
 +    error_log /var/log/nginx/lemmy.mydomain.com_error_log info;
  
     location / {     location / {
Line 289: Line 287:
 rc-service user-containers.lemmy start rc-service user-containers.lemmy start
 </code> </code>
 +
 +
 +==== Usage Notes ====
 +
 +A few notes and hints i learned after setting everything up and running.
 +
 +  * Federation takes hours. Expect at least half day / one day for your new instance to propagate the fediverse and start being picked up by other lemmy instances. At least a few hours. Manually forcing specified instances by searching for communities on them will speed this up a bit, but not too much.
 +
 +  * Registering new users will just popup a notification in your admin panel, you will need to go there and accept them. At first i was expecting an email in my inbox (a real email), but i doesnt happen. At the same time, i strongly suggest you don't allow open registrations for legal issues and such.
 +
 +  * You might want to head to [[https://gui.fediseer.com|fediseer.com]] to register your instance. Just type your instance name and admin name, and you will receive an API key in your inbox. Place the key back into the website and your instance will be stored. You can then ask for a guarantee from other instances and provide your own to others.
 +
  

This website uses technical cookies only. No information is shared with anybody or used in any way but provide the website in your browser.

More information