Creating an analogue of Google Photos on your own server

Problem

If you have a large archive of photos and videos, there is a risk of losing them. Cloud storage seems like a convenient option, but it compromises privacy. Hard drive storage preserves privacy, but it is an inconvenient method to use. The golden mean is storing photos on your own server, with software installed that automatically sorts a large amount of media.

Exploring the Theory of Self-hosting Photo Storage

First, you need to understand what opportunities self-hosting provides for photo storage. Self-hosting allows you to store data on your own equipment, manage it yourself, and avoid dependence on third-party cloud services. This provides significant advantages in terms of privacy, while maintaining ease of use.

One of the main tasks was to find suitable software for photo management. I decided to study existing open-source solutions on the Internet. Surprisingly, there is not much material on YouTube related to this topic. Of the really useful information, I found a large one on GitHub table with the pros and cons of the most famous programs for managing photo archives, and also studied This Video to understand the approximate process of launching such a server.

The main criterion for choosing software was the presence of smart algorithms (identification by faces, calculation of duplicates, smart sorting), the presence of a large number of opportunities to moderate the archive yourself and, perhaps most importantly, the presence of a mobile application for accessing the archive, which has all the functionality, is easy to use and is available for installation from official markets.

In my search I looked at several popular open source solutions for self-hosting photo storage:

  • Nextcloud – universal and popular eco for synchronization and file sharing, also offers photo management. Didn't work, as Nextcloud requires many third-party plugins for full-fledged photo management and has poor optimization (including for the mobile app).

  • Piwigo – a photo management platform, originally created for photo blogs. It was not suitable due to its inconvenience in use and a useless mobile application.

  • Lychee – new photo manager in active development phase. Not suitable due to lack of mobile application.

  • PhotoPrism – a powerful photo management tool with support for image search, face recognition and more. PhotoPrism was a good option, but it didn't work because it didn't have a mobile app.

In the end, I settled on Immich. This is a long-developing solution, specially created for managing large photo archives. Immich has a user-friendly interface, a functional mobile application and smart automatic photo sorting.


Installation

Any computer connected to the network can be used as a test server. In my case, it was a regular laptop with Windows 11 as the main OS. To install and run Immich, we will need to install Docker and set up a WSL 2 environment with Ubuntu.

1. Install Docker

Docker allows you to run applications in isolated containers. This simplifies the installation and management of software, ensuring its stable operation.

  1. First, let's install Docker Desktop for Windows:

  2. Enable WSL 2 support in Docker Desktop settings:

2. Setting up Ubuntu via WSL 2

Windows Subsystem for Linux (WSL) allows you to run Linux applications on Windows. We'll install Ubuntu to make it easier to install and manage Docker.

  1. Install WSL 2 by running the command in PowerShell with administrator privileges:

    wsl --install
  2. Install Ubuntu (there is an official version from the Microsoft Store)

  3. Open the Ubuntu terminal and navigate to the directory where you want to place the repository:

    cd immich
  4. Clone the Immich repository:

    it clone https://github.com/immich-app/immich.git
    cd immich

3. Setting environment variables

For Immich to work correctly, you need to specify where the downloaded files and database data will be stored. We will configure the necessary paths and parameters in the file .env.

4. Running Immich with Docker Compose

Docker Compose allows you to run all the necessary Immich services (server, database, Redis) with a single configuration file docker-compose.yml. The values ​​in it can be edited to fine-tune the service.

  1. Make sure you are in the directory with the file. docker-compose.yml:

    cd immich
  2. Run Docker Compose to start all services:

    docker-compose up -d

Access to the server

After launching Immich, the server is accessed via a web interface. I set up a local IP address to access the server from mobile devices on the same network.

  1. Open a browser on any device on your local network and enter:

    http://ваш ip-аддрес
  2. To connect via mobile app, use the same IP address.


Summary

When you launch the server, a nice-looking web page appears with an interface similar to Google Photo. On the main page, uploaded media are shown sorted by date, which can be changed in the settings. When the server is active, in the mobile application it is enough to enter the user name and the IP address of the server (my laptop) to open the archive. The mobile application allows you to download, upload and delete photos from the cloud, depending on the user role assigned by the administrator. Among the interesting features there is, for example, a world map, which will be filled in depending on the geolocation in the photo metadata.

Creating your own photo storage with Immich is an effective solution for managing large photo archives while maintaining data privacy. It allows you to abandon third-party cloud services and manage your data yourself.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *