
With no monthly software fee, Immich lets you host your photo and video library on a server you control. NetworkChuck shows how to set up the photo management software on Ubuntu, import existing pictures and turn on phone backups. You can also search by describing an image and reach your library away from home. Find out how to connect your storage, get uploads working and keep separate backups of your photos and database so you have copies beyond the server.
Immich: Self-Hosted Photo Backup on Ubuntu
TL;DR Key Takeaways :
- Immich is open source photo backup software with no required product key or monthly fee when self-hosted, and it offers browser, Android and iOS access.
- Immich recommends at least two CPU cores and 6GB of memory, although 4GB systems can run it with machine learning disabled.
- Immich recommends Docker Compose for installation, and its local web interface runs on port 2283.
- Mobile backups require selecting albums and enabling backup, and they are restricted to Wi-Fi by default.
- Immich recommends a 3-2-1 backup strategy for media and the database because it does not automatically make separate filesystem backups of original photos and videos.
Immich is open source and charges no monthly fee when you run it on your own server. It works without a product key; an optional lifetime key costs $25 for one person or $100 for a whole server.
You can build the setup around a spare laptop and an external drive, and it scales up from there: NetworkChuck’s own family server holds 19 terabytes going back to 2006 on an old gaming PC. Immich offers a browser interface and mobile apps for Android and iOS.
Prepare the Server and Storage
Install Ubuntu Server 26.04 from a flashed USB drive. During setup, turn on OpenSSH and note the machine’s IP address so you can connect remotely. Immich recommends Docker Compose for installation, so install Docker with its Compose plugin before continuing.
Immich recommends a 64-bit Linux or Unix-like system and supports amd64 and arm64 processors. Its hardware requirements are:
- CPU: Two cores minimum; four recommended.
- Memory: 6GB minimum; 8GB recommended.
- 4GB systems: Can run Immich with machine learning disabled.
- amd64 machine learning: Immich v3 requires x86-64-v2 or newer.
A GPU is optional: CPU processing works, but a GPU can speed up machine learning. Choose a drive with room for your existing library and new uploads. Immich says thumbnails and transcoded videos can add 10% to 20% to storage needs on average.
Immich recommends a filesystem that supports Unix ownership and permissions, such as EXT4. Do not store its PostgreSQL database on a network share. If you are moving from Google Photos, request an export through Google Takeout; the request can take days and produce a large download.
Here are more guides from our previous articles and guides related to self-hosting photos that you may find helpful.
- Reclaim Your Privacy with Immich : Self-Hosted Alternative to Google Photos
- Can You Replace a Synology NAS with Open Source Projects?
Mount the Photo Drive Before Starting Docker
On Ubuntu, identify the external drive and its filesystem with:
lsblk -f
Create a mount point, then add an entry to fstab using the drive’s UUID and filesystem type. The example setup uses /mnt/photos as the mount point:
sudo mkdir -p /mnt/photos
Reload the system configuration, mount the drive and check its contents:
sudo systemctl daemon-reload
sudo mount -a
ls /mnt/photos
Create a separate directory on the drive for new Immich uploads. The setup also adds a Docker startup rule intended to wait for the storage mount before starting containers; NetworkChuck’s written guide covers that configuration.
A NAS can also hold photos, but you must mount its storage and add it to Docker Compose before Immich can see it.
Install Immich With Docker Compose
Create an immich-app directory in your home folder. Download Immich’s Docker Compose file and example environment file into it, saving the latter as .env. Because its name begins with a dot, it will not appear in an ordinary directory listing.
Edit .env to set the upload location to the directory on your mounted drive. Set your time zone and replace the database password with a random one. The server container’s default upload volume uses that location, so you do not need to change it separately.
For existing photos, edit the Compose file’s server volumes to add the host directory and a path inside the container, separated by a colon. Align the indentation with the other volume entries, then start Immich with:
docker compose up -d
In a browser on the local network, open the server’s IP address on port 2283. The first account you create is the administrator. Setup also offers choices for map data, version checks and the storage template used to organize uploads.
Import Existing Photos and Start Processing
Adding a drive to Docker does not automatically add its contents to your library. From your profile menu, open Administration, select External Libraries and create a library with an owner. Add the folder path as it appears inside the container, then select Scan to find its contents.
You do not need to add the upload directory as an external library because it is an internal location. Immich queues tasks such as thumbnail generation, metadata extraction and face recognition, and large collections can take time to process.
Immich supports common image formats, including JPEG, HEIC, PNG and RAW, along with video formats such as MP4, QuickTime and WebM. It keeps original uploaded files when it creates transcoded video versions for playback.
Back Up Phone Albums and Reach Them Remotely
Install the Immich mobile app, enter the server’s local HTTP address and port, and sign in with the account you created on the server. Giving the app access to your photos does not upload everything by itself; use the cloud control to select albums and turn on backup.
Mobile backups are restricted to Wi-Fi by default, though you can change that setting. Immich can also reproduce phone albums on the server through one-way synchronization.
Your local server address will not work over cellular when you leave the network, and Immich warns against exposing its default HTTP port directly to the internet without additional security configuration. The safer route is a private-access service that reaches the server without opening a port on your router. NetworkChuck uses Twingate, which runs a connector on the server and grants access only to the resources you name; Tailscale and WireGuard are alternatives.
Search and Share the Library
Immich’s built-in machine learning service supports natural-language search, face recognition and text search within images. It uses CLIP models for contextual searches, so matching words do not need to be in a file’s metadata. Compatible models also support multilingual searches.
You can filter searches by people, locations, albums, filenames, paths, camera metadata, tags, dates and star ratings. Immich also offers a map and Memories view for browsing your collection.
Immich offers experimental hardware acceleration. For an NVIDIA setup, install the drivers and container runtime, connect the runtime to Docker, and configure Immich’s GPU support. Select hardware video acceleration under Administration → Settings → Video Transcoding. You can change smart-search models in machine learning settings, although a newly selected model needs an internet connection to download and a larger model can require a bigger GPU.
Each server can have separate user accounts. Shared albums can give recipients viewer or editor access, while partner sharing can share a whole library with another user. You can password-protect public links, give them an expiry date and configure them to accept uploads from people without an Immich account.
Keep Separate Backups of Photos and the Database
Immich automatically creates database backups that you can manage through its web interface, but it does not automatically make separate filesystem backups of the original photos and videos. Immich recommends a 3-2-1 backup strategy for both media files and the database: three copies, on two kinds of storage, with one copy off-site. Your off-site copy could be an external drive kept at a friend’s or relative’s home.
In our view, the most useful idea here is not the software but the question NetworkChuck’s wife asked: do we have our photos anywhere locally? Most families cannot answer yes, and a copy you hold yourself is the real gain. We would be careful to treat a self-hosted library as one copy, not a backup. Before deleting anything from Google, check that your files are stored on a second drive too, and that you can restore them.
Taking control of your photo library also means taking responsibility for recovering it if a drive fails. Separate backups of your media and database let you keep that control without making the server your collection’s only home. If you are willing to manage the storage and backups yourself, self-hosting Immich is a project well worth trying for a photo library you control.
Media Credit: NetworkChuck
Disclosure: Some of our articles include affiliate links. If you buy something through one of these links, Geeky Gadgets may earn an affiliate commission. Learn about our Disclosure Policy.