Recently started looking into self hosted photo gallery and storage. I see almost all of the options are utilizing docker now.
At first, I was very reluctant to use docker is because I dont understand it and it thought it has the performance penalty that similar to full fledged VM.
I was wrong! Very wrong. Not only the performance hit is way lesser than VM and the ease of deploying whatever services you want is insane.
There is one issue that bugs me for quite sometime is that, when I run multiple docker instances on the same Pi server, I need to separate all those instances into different ports. And I hate it! I dont want to rmb which port is for which service and I dont want to open up all those ports from my router.
I can solve the second problem easily by connecting a VPN all the time, so that I dont need to open any ports from my router. It works well, but not the best solution.
After some digging, I found something called reverse proxy. It is exactly what I wanted to solve the first problem. There are many ways to setup reverse proxy, I can do it by manually modifying my existing Nginx config and redirect whatever I want. But that is just too troublesome and tedious, I want something more easier and quick. Then I found Nginx Proxy Manager, it has really nice webUI but I cant figure out how to setup reverse proxy… and finally I found Caddy!
I found it from a Reddit post, all the settings are done by very simple syntax. I gave it a try on my phone and just wanna see how well it runs on my Pi. And Oh my god, I got the reverse proxy to run all done ON MY PHONE terminal!
Ok, I’m sold. Time to migrate my Pi server to a docker + Caddy setup!