I’m trying to stand up a Lemmy instance, and for some reason I’m just not getting it. I’ve got a fair bit of experience in Linux and Docker. NPM is new to me, but doesn’t seem difficult.

I’ve looked over several walkthroughs but it seems like they all don’t quite work right. Does someone have a clear step-by-step that works, or could take the time to remote in and help me get this up?

I’m running on VMWare ESXi, and I’ve tried both Debian and Ubuntu to get the server up. Closest I got, the Docker containers would start but seem to be throwing errors internally and don’t connect to one another.

  • jamesravey
    link
    fedilink
    English
    2
    edit-2
    1 year ago

    Hey - I found the same thing WRT the docker files - the compose files from the official project are ever-so-subtly wrong.

    Tagging a docker network as internal blocks outside network comms afaik so the default compose file essentially puts the lemmy server inside its own little sandbox and prevents it from communciating with other servers.

    The solution I found was to add lemmy to both the internal network and the external proxy network:

    
    ## this is what the networks part looks like by default
    networks:                                                                                                                                                   
      # communication to web and clients                                                                                                                        
      lemmyexternalproxy:                                                                                                                                       
      # communication between lemmy services                                                                                                                    
      lemmyinternal:                                                                                                                                            
        driver: bridge                                                                                                                                          
        internal: true            
    
    #... other stuff here
    #lemmy service inside your services: section
      lemmy:
        image: dessalines/lemmy:0.17.3
        hostname: lemmy
        networks:
          - lemmyinternal
          - lemmyexternalproxy # this is the important addition
        restart: always
        environment:
          - RUST_LOG="warn,lemmy_server=info,lemmy_api=info,lemmy_api_common=info,lemmy_api_crud=info,lemmy_apub=info,lemmy_db_schema=info,lemmy_db_views=info,l
    emmy_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
    
    

    Another thing I noticed was that in the documentation they bind nginx on port 80 but the docker-compose provided binds to port 8536 which is the default port that lemmy seems to listen on. I bound 8536 to my host machine and use caddy as a reverse proxy (because it does letsencrypt for you which is nice).

    (Writing to you now from my self-hosted instance which I set up with the above notes)