Looking for advice on making two services on one server public reddit / selfhosted ---------------------------------------------------------------------- DrHansLanda · 2023-12-03 19:31 Hello, I'm wanting to build a small server and self host a couple services. However, I'm not really sure if what I'm trying to do will be possible and/or simple enough for a beginner. I want to host Nextcloud, Vaultwarden, and Jellyfin/Plex to start. However, I want to make Nextcloud and Vaultwarden both available outside my network with a domain (I.e. nc.mydomain.com and vw.mydomain.com). Is this possible to do? To my understanding, both services have the same IP (since they're both on the same machine) so I'm not sure how I would configure it on my domain provider end. Also, does opening up these services put my others at a higher security risk? ---------------------------------------------------------------------- psychedelipus · 2023-12-03 20:37 If it's a home server, you need to see if your router can port forward to port 80 and then point both domains to the same IP but with apache or nginx you would match the subdomain and serve the appropriate service. And yes if someone hacks your router they could access your home traffic. Using cloudflare might mitigate against hacking in the first place but I personally use a VPS anyway. ---------------------------------------------------------------------- thekrautboy · 2023-12-03 20:39 Typically you would use a reverse proxy that listens on your public WAN interface on ports 80/443 and it would redirected requests to your internal services (Vaultwarden etc) depending on which domain/subdomain the requests are aimed at. The only service you open to the public internet is the proxy itself, Vaultwarden as example stays "private". Tons of posts and guides exist about this, use the search. ---------------------------------------------------------------------- krogue4 · 2023-12-03 21:12 My advice? Don't. Set them up on your internal lan and use wireguard or Open VPN to access them. I understand that won't be helpful for your jellyfin setup. The questions you are asking, no offense, seem to come from little experience. While you could be just fine with the set up you are asking, you are potentially exposing yourself to attacks. If you still insist, make sure you are using a reverse proxy, updated software, and ensure you are not exposing your internal lan to the Internet where you don't intend (lock down your external ports with your firewall if you haven't).But, It's much easier imo to come from a place of paranoia and keep your sensitive information safe than it is to make things easier when it's just you or a few others. Later on when you feel comfortable, you can take steps to make those services public once you understand all that it entails to keep it secure. ---------------------------------------------------------------------- zfa · 2023-12-03 21:46 Not sure anyone in 2023 should be advised to use port 80 over port 443 tbh. ---------------------------------------------------------------------- psychedelipus · 2023-12-03 22:19 Yeah it's been a while ---------------------------------------------------------------------- staticshadow40 · 2023-12-03 22:59 You need a reverse proxy my guy ---------------------------------------------------------------------- DrHansLanda · 2023-12-03 23:59 Thank you all for your responses! As you have all noticed/noted, I am a complete beginner in this space. I have been hosting NC on a VPS for a couple of years but I am running out of storage and don't feel like continuing to pay ~$25 a month and I never loved the idea of my files being on someone else's machine. After looking into reverse proxies and other configuration that comes with this, I have decided to just host things locally and use wireguard - at least while I continue to learn in this space. ---------------------------------------------------------------------- Conscious-Calendar37 · 2023-12-04 04:55 I use HAProxy with Letsencrypt. You could also use cloudflare tunnels, just requires a cloudflare docker container to run to keep the tunnel open to cloudflare. ---------------------------------------------------------------------- [deleted] · 2023-12-04 05:52 [removed] ---------------------------------------------------------------------- joao8545 · 2023-12-04 07:21 I am not sure if it helps, but if you are using cloudflare, you can use a zero trust tunnel, for it. ---------------------------------------------------------------------- Sammeeeeeee · 2023-12-04 08:15 Cloud fare tunnels took me 5 minutes to set up and does the job perfectly with added security. ---------------------------------------------------------------------- TheSmashy · 2023-12-04 14:27 Reverse proxy like Nginx. ---------------------------------------------------------------------- treading9879 · 2023-12-04 14:31 You set them to use different ports. If they’re using different ports, then they can share an IP address. Yes, this does technically expose you to risks. Assuming you set everything up correctly, there are risks that someone exploits the services you expose. There’s thanks you can do to make that risk more tolerable, but it depends on how much work you want to put in. If it’s only you using it, I’d recommend setting up WireGuard/openvpn so you don’t need to expose anything