Monthly Archives: July 2024

Power outage and server down

Yesterday I accidentally tripped my house’s circuit breaker and brought down my Pi server.

After the power is back, all the docker instances automatically back up as well. However, no matter what I did, I was not able to access any one of the docker instances.

I wanted to re-flash my Pi 5 from the desktop image to lite for a long time, but I did not have the time and reason to do so. Since everything is down and I don’t know how to revive it, I decided it is finally time for me to re-flash it and setup the server more properly.

After a little bit of tinkering here and there, my blog is finally back up together with a few other instances. Docker is really so convenient that I regret I realised it this late!

Immich is impressive.

I have been looking for Google Photos alternative for quite some time. I have a Synology NAS at home, it back up all my photos that is taken on my phone without any problem and it works really well. But I wanna have another self hosted solution that is similar to Google Photos, I did a quick search and found Immich. The web ui looks very similar to Google Photos and it has phone apps that supports both iOS and Android. Let’s see how well it runs on my Raspberry Pi 5. 🙂

Caddy reverse proxy

Finally managed to migrate my setup to all docker + Caddy reverse proxy. The setup was so easy that I did all the work completely on my iPad and everything automatically SSL protected. Caddy is AWESOME!

Multiple docker instances and reverse proxy

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!