Introduction
Welcome to another week of self-hosting various services in my homelab. This week, we’ll be looking at a self-hosted alternative to Google Photos.
Managing and backing up personal photos has always been a challenging task. I’ve tried various solutions over time - from simple network storage to PhotoPrism, but none quite matched the convenience and features of Google Photos.
That’s when I discovered Immich, and it has completely changed how I manage my personal photo collection. What sets it apart is not just its features, but how closely it matches the user experience we’ve come to expect from Google Photos.
What is Immich?
Immich ↗️ is a self-hosted photo and video backup solution that aims to provide an experience similar to Google Photos. It’s built with modern technologies and methodologies which focuses on performance, which is crucial when dealing with large photo libraries.
What really drew me to Immich was its comprehensive feature set:
- Mobile apps for Android and iOS with automatic backup
- Face detection and recognition
- Location-based photo mapping
- Memory feature (like Google Photos’ “On This Day”)
- Shared albums and partner sharing
- RAW photo support
- Live Photo support
- Powerful search capabilities
- Beautiful web interface
- Multi-user support
- Machine learning-based object detection
And many more! They also have a public roadmap ↗️ where you can see what’s coming next.
Note
Immich is still in “beta”, but the core functionality is already quite stable. So if you’re updating your Immich instance, you need to be prepared for some breaking changes.
However their release page ↗️ does have a thorough upgrade guide for each version.
Setup Immich
While there are multiple ways to set up Immich, the recommended way is using Docker and that’s what we’ll be doing in this guide.
First, create a new directory for Immich and download the example docker-compose file:
mkdir immich && cd immichcurl -L https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml -o docker-compose.yml
Next, create the environment file:
curl -L https://github.com/immich-app/immich/releases/latest/download/example.env -o .env
Optionally, you can also download the hardware acceleration configuration files:
curl -L https://github.com/immich-app/immich/releases/latest/download/hwaccel.transcoding.yml -o hwaccel.transcoding.ymlcurl -L https://github.com/immich-app/immich/releases/latest/download/hwaccel.ml.yml -o hwaccel.ml.yml
Hardware Acceleration
Hardware acceleration is optional, but it can significantly improve the performance of the transcoding and machine learning features.
For these to work, you need to have a compatible GPU and the necessary drivers installed. You can read more about the requirements here ↗️.
PS: I’ve been using the hardware acceleration for both transcoding and machine learning features without any issues on my Orange Pi 5 Server and have a detailed guide here with Jellyfin.
The default configuration works great for most users, but if you want to take advantage of the hardware acceleration, you can use the provided configuration files as mentioned in the docker-compose file as code comments.
Before starting the containers, update your .env
file with the necessary environment variables:
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables
# The location where your uploaded files are storedUPLOAD_LOCATION=/media/immich/uploads
# The Immich version to use. I like to pin it to a specific version to avoid any breaking changes.IMMICH_VERSION=v1.121.0
# Connection secret for postgres. You should change it to a random passwordDB_PASSWORD=postgres
# The values below this line do not need to be changed###################################################################################DB_HOSTNAME=immich_postgresDB_USERNAME=postgresDB_DATABASE_NAME=immich
REDIS_HOSTNAME=immich_redis
Now you can start Immich:
docker compose up -d
The web interface will be available at http://localhost:2283
. Create your admin account and you’re ready to go!
Enjoying the content? Support my work! 💝
Your support helps me create more high-quality technical content. Check out my support page to find various ways to contribute, including affiliate links for services I personally use and recommend.
My Setup and Usage
Here’s how I’ve set up Immich in my homelab:
-
Storage Configuration: Most of the photos are stored on a dedicated NAS volume mounted to the Docker host. This ensures data persistence and makes backups easier.
-
External Library: While most of the photos are synced from my phone to Immich via the mobile app, I also have a dedicated folder where I store few albums and connect them to Immich as an external library ↗️. This way I can access them from the web interface as well.
-
Reverse Proxy: I use Caddy as my reverse proxy to expose Immich securely with automatic HTTPS:
photos.mydomain.com {reverse_proxy localhost:2283} -
Mobile Apps: I’ve installed the Immich app on my phone which is automatically set to backup new photos when I’m on my home WiFi.
-
Tailscale: When I am not in my home WiFi network, I use Tailscale to connect to my home network and the Immich instance. This allows me to access and upload photos from anywhere in the world when I’m on the go.
-
OAuth: I’ve setup OAuth for users to login to the web interface. I self-host Authelia for this purpose.
-
Backup Strategy: I have custom backup scripts that backs up the entire Immich data directory to an off-site location daily. These backups are encrypted with GPG before being uploaded to the off-site location.
Backup Strategy
Immich is essentially storing your photos that may be your most valuable assets and memories that you want to preserve. So it’s important to have a good backup strategy in place.
Make sure you regularly backup your Immich database and also the uploads to an off-site location if possible to avoid any data loss.
Features I Love
After using Immich for several months, here are some features that I absolutely love:
-
Face Recognition: The face detection and recognition are surprisingly accurate. It helps organize photos of family members automatically.
-
Search Capabilities: The ability to search photos by location, people, or objects is incredibly useful. For example, I can search for “photos from Barcelona” and it will return all the photos I took during my trip to Barcelona which is pretty cool.
-
Memory Feature: Getting notifications about photos from years ago is a delightful feature that helps me relive memories.
-
Performance: Even with over 20,000+ photos, the web interface remains snappy and responsive.
Overall, Immich has become an essential part of my self-hosted stack. It’s one of those rare self-hosted alternatives that actually matches (and in some ways exceeds) its commercial counterpart.
Companion Apps
Another thing that makes Immich so popular in the self-hosted space is the companion apps build by the community around the project.
While there are many of these apps, here are the few that I’ve tried and loved it:
Importing Photos
Immich Go ↗️ is an alternative to the Immich official CLI which does a really good job in importing photos from your Google Photos.
Essentially its an easy way to do the initial ingestion of your photos from Google Photos if you are migrating away from it to Immich.
Sharing Photos
With Immich, you can share photos with your partner or family members to collaborate, but you cannot share albums or photos directly to the internet (for privacy reasons).
But there are couple of apps which are trying to solve this problem:
-
ImmichFrame ↗️ does a really good job and from what I know, it was the first one to do this.
-
Immich Kiosk ↗️ is another tool that allows you to run a slideshow of your photos from Immich for Kiosk devices and browsers.
-
immich-public-proxy ↗️ is a proxy service that allows you to share your photos without the need of exposing your Immich instance to the internet.
Utility tools
Apart from these, there are couple of other tools that I’ve found useful:
-
immich-power-tools ↗️ is a power tool for managing your Immich instance, essentially giving you some additional features for organizing your library.
-
immich_duplicate_finder ↗️ is a tool for identifying and managing duplicate assets in your Immich library.
Conclusion
The peace of mind knowing that all my family photos are safely stored on my own infrastructure, while still having the convenience of automatic backup, is invaluable.
Have you tried Immich or other self-hosted photo management solutions? What’s your strategy for managing family photos? Share your experiences in the comments below, or reach out to me on Twitter ↗️ / Reddit ↗️.
Happy photo organizing!