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

Selfhosted

40041 readers
661 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?

top 3 comments
sorted by: hot top controversial new old
[–] ptz@dubvee.org 28 points 11 months ago* (last edited 11 months 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.
[–] plague_sapiens@lemmy.world 5 points 11 months 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 :)

[–] Tealk@rollenspiel.forum 2 points 11 months ago

you only have to start a second docker cluster with a different public port