Private Cloud Photo Album Solution


Implement a home cloud photo album to free up phone storage space and avoid the embarrassment of losing photos along with the phone. By building your own cloud album, you can keep your privacy in your own hands and not worry about being scanned, peeked at, or leaked in public clouds. It also allows for freedom of internet speed.

After Googling, I found that the open-source project Immich is very popular and its existing features meet the above requirements. It even surpasses the requirements and has more amazing features, such as supporting multi-user album management.

Installation & Running#

With the detailed and comprehensive installation documentation provided by the official website, I believe there will be no difficulties in installing and running. I am using the deployment method of Docker Compose.

Once successfully running, you can manage the album through web pages and the app. It also provides CLI batch upload, which means it supports three different forms of clients:

  • Web page access: http://[server_ip]:2283

  • App for Android/IOS: Mobile App | Immich supports foreground running and background automatic backup

    If the app cannot log in to the server, possible reasons include:

    • The server firewall does not allow the 2283 TCP port in the inbound rules. Of course, you can also disable the firewall directly.
    • The app version is too low compared to the server version. Just upgrade the app to the latest version.
  • CLI batch upload: Bulk Upload (Using the CLI) | Immich

Of course, these are just the most basic functions it provides. To learn more about the features, please refer to the documentation:

Data Migration#

If you have previously uploaded a lot of photos to an Immich server but for some reason the server must be taken offline, data migration becomes crucial. It means moving the data as it is to a new server. The official website provides corresponding documentation, which is divided into two parts:

  1. Backup and Restore of Postgres Database: Backup and Restore | Immich

    If, like me, you are running Docker Desktop on Windows, you may need to replace the commands in the documentation as follows:

    • Backup (of course, replace the disk path with your own):

      docker exec -t immich_postgres pg_dumpall -c -U postgres > "D:\dev\containers\immich\backup\dump.sql"
    • Restore: Follow the documentation first, then skip the sleep 10 command because it doesn't exist in Windows (you can use docker logs -f immich_postgres to check if the database has started successfully). Then, unpack the backup file yourself (if the backup is in compressed form) and use the following command to restore the database (of course, replace the disk path with your own):

      docker exec -i immich_postgres psql -U postgres -d immich < "D:\dev\containers\immich\backup\dump.sql"
  2. Migration of Photo Files (Disk File Backup): Backup and Restore | Immich

    It's actually very simple, just move (download) the disk directory to the new server.

After completing the migration of the above two parts, remember to run the docker-compose up -d command in the corresponding location to start all services.

Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.