皮皮鲁

皮皮鲁

采用区块链技术建立的个人博客

Set up an open-source photo and video automatic backup software with Docker

Software Introduction

Immich is a powerful and easy-to-use self-hosted photo and video backup solution, suitable for users who need to securely and efficiently manage their precious memories.

  1. Main Features

  2. Automatic Backup: When the Immich application is opened, it automatically backs up users' photos and videos without manual operation.

  3. Multi-Platform Support: Immich supports various operating systems such as Ubuntu, Debian, macOS, etc., ensuring users can enjoy the same service across different platforms.

  4. Multi-User Support: Immich supports multiple users simultaneously, making it convenient for family members to share and manage photos.

  5. Shared Albums: Users can create shared albums and invite friends and family to enjoy and share photos and videos together.

  6. Metadata View: Immich provides EXIF, map, and other metadata views, allowing users to gain deeper insights into the details of each photo.

  7. Technology Stack

  8. Backend Framework: NestJs, providing stable and efficient server-side support for Immich.

  9. Web Frontend Framework: SvelteKit, offering a smooth user experience for the application with its lightweight and efficiency.

  10. Database: PostgreSQL as the main database, ensuring the security of the application's data.

  11. Caching and Messaging: Redis is used as a shared websocket instance between docker instances and background task message queues.

  12. Load Balancing and File Upload: Nginx serves this role in Immich, ensuring the stability and performance of the application.

  13. Image Processing Capability: TensorFlow is used for object detection and image classification.

  14. System Requirements

  15. Operating System: Preferably Ubuntu, Debian, macOS, etc.

  16. Memory: At least 2GB, preferably 4GB.

  17. Processor: At least 2 cores, preferably 4 cores.

  18. Features and Advantages

  19. Security: As a self-hosted solution, users have complete control over their data, without worrying about third-party access or data breaches.

  20. Flexibility: Users can customize and extend according to their needs, meeting different storage and management requirements.

  21. Usability: The interface is designed to be simple and intuitive, making it easy to get started and use.

  22. Other Features

  23. Management Features: Including user management, background backups, etc., making it convenient for users to maintain and manage the system.

  24. Search Functionality: Supports searching by metadata, objects, and image tags, allowing users to quickly find the photos and videos they need.

For more information, you can visit the official website or refer to the relevant technical documentation.

Official GitHub https://github.com/immich-app/immich

Official API Documentation https://immich.app/docs/overview/introduction

Third-Party Self-Built Docker Deployment https://github.com/imagegenius/docker-immich

Setup Tutorial

This article deploys using Docker, adopting third-party self-built Docker deployment, taking Ubuntu as an example, with the following steps: install Docker, create docker-compose.yml, and start the container to run the image.

| Step 1 Install Docker

sudo apt update
sudo apt install -y docker.io docker-compose

| Step 2 Create docker-compose.yml

Create docker-compose.yml in the Home directory, write the following configuration, and save it:
version: '3'
services:
immich:
image: ghcr.io/imagegenius/immich
container_name: immich
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- DB_HOSTNAME=192.168.1.x
- DB_USERNAME=postgres
- DB_PASSWORD=postgres
- DB_DATABASE_NAME=immich
- REDIS_HOSTNAME=192.168.1.x
- DB_PORT=5432 #optional
- REDIS_PORT=6379 #optional
- REDIS_PASSWORD= #optional
- MACHINE_LEARNING_GPU_ACCELERATION= #optional
- MACHINE_LEARNING_HOST=0.0.0.0 #optional
- MACHINE_LEARNING_PORT=3003 #optional
- MACHINE_LEARNING_WORKERS=1 #optional
- MACHINE_LEARNING_WORKER_TIMEOUT=120 #optional
volumes:
- /home/appdata:/config
- /home/photos:/photos
- /home/imports:/import #optional
ports:
- 8080:8080
restart: unless-stopped

This container requires an external application to be run separately.#

By default, ports for the databases are opened, be careful when deploying it#

Redis:#

redis:
image: redis
ports:
- 6379:6379
container_name: redis

PostgreSQL 14:#

postgres14:
image: tensorchord/pgvecto-rs.2.0
ports:
- 5432:5432
container_name: postgres14
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: immich
volumes:
- /home/postgres:/var/lib/postgresql/data

| Step 3 Start the Container to Run the Image

sudo docker-compose up -d

After executing the above commands, access IP:8080 in the browser.

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