My Journey to Self-Hosting: Immich on Leafcloud
When I first decided to set up Immich on Leafcloud, my goal was clear — to create a self-hosted solution for managing photos and videos, with a focus on simplicity and reliability. The idea was to take full control of my media storage without relying on third-party services.
Having struggled with over-complicated setups in the past, I wanted this process to be straightforward, with just enough tech to get the job done but not more than I needed.
Here’s what I learned along the way. If you’re considering doing something similar, this may give you a better understanding of what works, what doesn’t, and what to prioritize. While I won’t walk you through every step (because, let’s be honest, the details can get tedious), I’ll share the key points that made all the difference in getting this self-hosted solution up and running smoothly.
Why Immich?
My journey began with a desire to move away from Google Photos. I started searching for alternatives that would allow me to retain control over my data without sacrificing ease of use. During my search, I came across Immich and PhotoPrism, two popular self-hosted photo management solutions.
I ultimately chose Immich for its simplicity, ease of setup, and its active community, which made it a practical choice for my self-hosted solution. Unlike other options, Immich’s architecture was more straightforward, and it offered a good balance of features for personal use, especially with its focus on being lightweight while providing the key features I needed.
Why Leafcloud?
I chose Leafcloud for hosting because it offers enough flexibility and control to set up and define my own cloud workspace, and it’s built on OpenStack — an open-source cloud platform that allows you to manage compute, storage, and networking resources. This made it an ideal choice for my needs.
Additionally, Leafcloud is committed to environmental sustainability. They place servers in regular buildings and reuse the residual heat to provide hot water, which aligns with my values of reducing energy waste and supporting eco-friendly technologies.
Key Considerations Before You Start
- S3-compatibility: Initially, I thought about using S3 for storage. However, Immich doesn’t natively support S3-compatible storage at the moment. If you want to integrate it, community workarounds exist, but they aren’t reliable for production use.
- Single VM Setup: Immich works perfectly on a single VM. I opted for Docker Compose to keep things simple, without the complexity of Kubernetes.
- Self-Hosting for Family: My main goal was to keep things simple and reliable, with a focus on family use. If you’re setting something similar up, make sure reliability and ease of use come first.
- Custom Domain: For ease of use, I configured my custom domain to be used with HTTPS. You can set this up with any domain provider, but make sure DNS propagation is checked properly before you start using it.
The Set-Up Process: Key Highlights
After setting everything up, here are a few tips I found helpful:
Resource Quotas: Leafcloud’s default quotas might not fit your needs. For example, if you require more resources, request a quota increase early on. Checking your OpenStack limits before starting the build saved me some headaches.
Avoid Adding Storage After Setup: I initially thought I could add extra storage post-installation, but Immich didn’t play nicely with additional volumes for its
UPLOAD_LOCATION
. It’s crucial to define your storage size right from the beginning.PostgreSQL Version Compatibility: If you’re planning to use Immich’s machine learning features, make sure you’re using a compatible version of PostgreSQL. I had good results with PostgreSQL 15.
Docker Image Sizes: The containers for Immich, along with the database and Redis, will take up a lot of space on your disk, so plan accordingly.
Getting Immich Running
Once I had the VM set up, it was just a matter of running the necessary Docker containers and configuring the application. Immich’s setup is fairly straightforward but does require a bit of patience, especially when configuring Docker and volumes.
Here’s how I set up Immich once the basic infrastructure was provisioned:
- Install Docker and Docker Compose.
- Clone the Immich repository and set up the configuration files.
- Run Docker Compose to start the containers.
This setup was smooth for the most part, though I had to troubleshoot a few network-related issues with reverse proxying through Caddy.
Securing the Connection with HTTPS
One of the final steps was setting up HTTPS, which I did with Caddy. It was surprisingly easy to configure. All I had to do was install Caddy, point it to my domain, and configure SSL certificates automatically using Let’s Encrypt. I highly recommend using Caddy for simple HTTPS configuration—it’s intuitive and powerful.
Additional Thoughts
In the end, the setup process went far better than I expected. My family now has a reliable, self-hosted platform for managing photos and videos with minimal ongoing maintenance. If you’re looking for a similar solution, I recommend sticking to the basics: avoid over-engineering the process and focus on reliability over complexity.
It’s been a rewarding experience, and while this setup isn’t for everyone, if you’re looking for a self-hosted solution with minimal fuss, Immich on Leafcloud could be exactly what you need.
You’re Done!
If you decide to try this for yourself, I hope this entry helps you skip some of the pain points I encountered. Ultimately, it was about balancing tech with simplicity—nothing too complicated, just enough to get the job done efficiently.
This Markdown file should now be ready for you to add to your Zola diary. You can save it as a new .md
file and place it in the content
folder, or in a subfolder like guides
, depending on your setup.
Let me know if you’d like any further adjustments!