I have self hosted immich on Debian on my homelab. I have also setup tailscale to be able to access it outside my home.
Sometime ago, I was able to purchase a domain of my choice from GoDaddy. While I am used to hosting stuff on Linux, I've never exposed it for access publicly. I want to do that now.
Is it something I can do within tailscale or do I need to setup something like cloudflare? What should I be searching for to learn and implement? What precautions to take? I would like to keep the tailscale thing too.
There's also the option of setting up a cloudflare tunnel and only exposing immich over that tunnel. The HTTPS certificate is handled by cloudflare and you'd need to use the cloudflare DNS name servers as your domains name servers.
Note that the means cloudflare will proxy to you and essentially become a man-in-the-middle. You -- HTTPS --> cloudflare --http--> homelab-immich.
The connection between you and cloudflare could be encrypted as well, but cloudflare remains the man-in-the-middle and can see all data that passes by.
I could be wrong, as I'm no expert, but cloud flare's proxy limits file uploads to about 1GB. I had to disable it to upload larger videos to immich. For other services, probably decent advice.
I read about funnel and it is really cool. But it seems to only expose the services through a *.ts.net type of URL. What I want is to use the domain that I've acquired.
I personally would be hesitant to host Immich publicly until they've done a security audit. The risk of accidentally exposing my photos publicly is too big for me.
That's why I recommend using Tailscale or Wireguard directly. Personally I'm using Wireguard for me and Tailscale for other people I want to easily access my services.
Your point is valid. I'll use the learnings from this thread for other, robust, services first and keep an eye on the progress of immich in terms of security.
Then I would suggest you to take a look at Reverse Proxies, which are programs that let you publicly expose different services hosted on the same computer under different (sub)domains.
The easiest to start with (and also probably the one that better fits your needs) afaik is NGINX Proxy Manager, which can be set up really easily using docker, and you can find plenty of tutorials online (here is one I watched when I was starting to look into docker and selfhosting, it's a bit old but should still be valid).
If after having set up that you will to thinker around it a little bit and dive a bit deeper, there's also Traefik which is pretty cool and also has a lot of materials to learn online.
I don't remember if the video I linked mention it or not, but to use a reverse proxy to expose your services on the web you will first need to set up a dynamic dns (probably the easiest way is to use Cloudflare) or to ask your ISP for a static IP, then go into your routers settings and find the Port Forwarding section where you should tell your routers to send all the incoming traffic from ports 80 (HTTP) and 443 (HTTPS) to the local IP of your server. And then you should be ready to use spin up Nginx Proxy Manager or Traefik on your server.
(idk if I was clear or not but I swear it's easier that how it seems ahah)
I'd recommend a web proxy service. It acts as a middleman, public > router > port forward to proxy / tailscale > proxy forwards by the domainto the correct service (immich).
Traefic is a good starter one.The most used but more advanced is probably nginx.
For SSL, use https://letsencrypt.org/, there are a bunch of tools to do it and some are automated. They expire faster but are free. Tailscale is a vpn tunnel so the ssl part may not be correct and they may have their own thing though.
Also godaddy is like the worst, expensive, ceo has hunted animals that shouadn't be touched, and I always had outages when dealing with them. Namecheap is good, cloudflare, and porkbun.
Thanks, I'll figure the best way out based on the responses.
And lol, I did not know about goDaddy being this bad since this was the first time I purchased a domain. Is it possible to move domains from one provider to another or do I have to wait for it to expire and then register on the other provider?
You can transfer at any tine and keep the remaining registration time. The only negative is you have to pay the new regristrar a rnewal fee to complete the trasnfer, this adds nore time to your domain, you just would have to pay it early once. They often do deals for transfers especially around holidays.
Without anything extra, there are three ways of doing it:
Using Tailscale Funnel
Direct port forwarding in your router, and pointing to the IP using some DDNS provider (e.g. desec.io)
Through Cloudflare tunnel (not recommended due to privacy reasons)
In each case, you'll need a reverse proxy (e.g. Caddy) if you want secure https connections.
If you're willing to spend money, the better way would be to proxy through a VPS (using something like a Wireguard tunnel). In that way, you won't have to open ports on your home router. You can get a very cheap one since proxying doesn't need much CPU power. Just choose one with enough bandwidth. I personally proxy most of my stuff through a $12/yr RackNerd VPS.