this post was submitted on 17 Nov 2023
13 points (78.3% liked)

Selfhosted

40134 readers
533 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 use ubergeek77 to deploy Lemmy instance on my Debian server, however I don't know how to make a second one on the same machine. Do you have any ideas how I can achieve that with this method of deployment?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 28 points 1 year ago* (last edited 1 year ago) (1 children)
  • Point both domains to that machine (each lemmy instance requires a unique domain/subdomain).
  • Use Separate docker stacks for each instance. Map the API and UI ports to different ports on the host machine in each stack.
  • Use Nginx (or whatever reverse proxy) to create virtual hosts for each domain.
  • Proxy-pass each virtual host to the correct docker stack/port.
[–] [email protected] 5 points 1 year ago

This. You can create two seperate networks for the nginx instance (I would recommend NPM (nginx proxy manager)) and use one each for connecting from the lemmy instances to the reverse proxy. Traefik is nice too, that was my first rp used for docker and it integrates quite nicely to the docker environment :)