this post was submitted on 13 Jun 2023
10 points (91.7% liked)

Selfhosted

40173 readers
636 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

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.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 year ago* (last edited 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)