veroxii@lemmy.worldtoSelfhosted@lemmy.world•Anyone hosting Lemmy and Mastodon on the same server?English
18·
1 year agoYou need a reverse proxy like nginx or traefik. Your mastodon server is using the web ports. Lemmy also wants to use the same ports. Obviously the can’t both use them.
The solution is to let neither use the ports and set them up on some other ports.
The reverse proxy is then set up as your main “web server”. It will then look at every request coming in and based on the domain name or url requested redirect (or rather forward or proxy) the request to the correct service… mastadon or Lemmy.
I run dozens of services on the same server. And use traefik to sit in front and manage it all.
Star Trek ships at home. And Game of Thrones characters at work.