Linux MintUbuntu Based

How To Install Immich on Linux Mint 22

Install Immich on Linux Mint 22

In this tutorial, we will show you how to install Immich on Linux Mint 22. Managing personal photos and videos has never been more crucial. With privacy concerns on the rise and cloud services often controlling your data, self-hosting solutions like Immich are gaining popularity. Immich is a modern, self-hosted photo and video backup platform designed to rival Google Photos in features, but with a strong focus on privacy, control, and transparency. This comprehensive guide walks you through installing Immich on Linux Mint 22, ensuring your memories remain secure and accessible—entirely under your control. Whether you’re a Linux enthusiast or a newcomer, this step-by-step tutorial will help you deploy Immich efficiently, optimize its performance, and troubleshoot common issues.

What is Immich?

Immich is a self-hosted photo and video backup solution that empowers users to take ownership of their digital memories. Unlike cloud-based services such as Google Photos or iCloud, Immich keeps your media on your own hardware, eliminating third-party data mining and subscription fees. It supports RAW files, offers AI-powered features like face and object recognition, and provides customizable organization tools. Immich is open-source, actively developed, and backed by a passionate community, making it a compelling choice for privacy-focused users and families alike.

Key Features:

  • Full media ownership and privacy
  • Support for RAW and high-resolution files
  • AI-driven search and categorization
  • Automatic folder organization by date, device, or user
  • Multi-user support and sharing options
  • Mobile apps for Android and iOS with auto-backup

While Immich’s AI features may not match the polish of commercial giants, its transparency, flexibility, and ethical approach make it a standout option for those who value data sovereignty.

Prerequisites for Installation

Before you begin, ensure your system meets the following requirements:

  • Operating System: Linux Mint 22 (or any Debian-based distribution)
  • Hardware: At least 2 CPU cores, 4GB RAM (8GB recommended for AI features), and sufficient storage for your photo/video library
  • Access: Terminal access with sudo privileges
  • Internet Connection: Required for downloading packages and updates
  • Basic Knowledge: Familiarity with Linux command-line operations

Backup Recommendation: Always back up important data before making significant changes to your system. This includes your existing photo library and system configuration files.

Preparation Steps

Before installing Immich, prepare your Linux Mint 22 system:

  1. Update System Packages:
    sudo apt update && sudo apt upgrade -y

    Keeping your system up-to-date reduces compatibility issues and ensures you have the latest security patches.

  2. Install Essential Dependencies:
    • For Docker installations:
      sudo apt install -y curl wget git
    • For Snap installations:
      sudo apt install -y snapd
  3. Check Disk Space:Use df -h to ensure you have enough free space for your photo library and Immich’s database.
  4. User Permissions:Make sure your user account has sudo privileges to install and manage software.

Installation Method 1: Docker Compose (Recommended)

Docker Compose is the preferred way to install Immich, offering isolation, easy updates, and robust performance. Follow these steps:

Step 1: Install Docker and Docker Compose

  1. Install Docker:
    sudo apt install -y docker.io
    sudo systemctl enable --now docker
  2. Install Docker Compose:
    sudo apt install -y docker-compose

    Tip: For the latest Docker Compose version, consider installing via the official Docker repository.

Step 2: Create Immich Project Directory

mkdir ~/immich-app
cd ~/immich-app

Step 3: Download Required Files

wget -O docker-compose.yml https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env

Rename example.env to .env if needed.

Step 4: Configure the .env File

nano .env

Key variables to set:

  • UPLOAD_LOCATION=./library (or a custom path with enough storage)
  • DB_DATA_LOCATION=./postgres
  • DB_PASSWORD=<your_secure_password>
  • Set your timezone by uncommenting and editing the TZ= line

Tip: Use only alphanumeric characters for passwords to avoid Docker parsing issues.

Step 5: Start Immich with Docker Compose

sudo docker compose up -d

This command pulls the necessary images and starts all Immich services in the background. The initial setup may take several minutes, depending on your system and internet speed.

Step 6: Access the Immich Web Interface

Once running, open your browser and navigate to:

http://<your-server-ip>:2283

Replace <your-server-ip> with your actual IP address or use localhost if accessing from the same machine.

Step 7: Create the Admin Account

On the welcome screen, click Getting Started and register your admin account. This user will have full privileges and can add other users later.

Installation Method 2: Using Snap Package

Snap provides a straightforward, bundled installation method, ideal for users who prefer simplicity over granular control.

Step 1: Ensure Snapd is Installed

sudo apt update
sudo apt install -y snapd
sudo snap refresh

Verify installation:

snap --version

Step 2: Install Immich via Snap

sudo snap install immich-distribution

This command downloads and sets up the latest stable Immich version. The process is mostly automated and requires minimal configuration.

Step 3: Access the Immich UI

Open your browser and go to:

http://<your-server-ip>:3000

Follow the on-screen prompts to create your admin account and start using Immich.

Note: Snap installations may have limitations regarding storage location and advanced configuration compared to Docker.

Installation Method 3: Manual Installation

Manual installation is best for advanced users who want maximum customization or need to integrate Immich into a complex environment.

Step 1: Install Dependencies

sudo apt install -y git python3 python3-pip

Step 2: Clone the Immich Repository

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

Step 3: Install and Configure Components

  • Follow the documentation in the README.md for manual setup.
  • Install required Python packages:
    pip3 install -r requirements.txt
  • Manually configure environment variables and storage paths.

Note: This method is not officially recommended for production but can be useful for development or testing.

Accessing and Setting Up Immich

Web Interface Setup

  • Open your browser and navigate to http://<your-server-ip>:2283 (Docker) or :3000 (Snap).
  • Click Getting Started to register your admin user.
  • Set up your preferred language, time zone, and storage templates.

Storage Location Setup

  • By default, Immich stores uploaded files in the path specified by UPLOAD_LOCATION in your .env file.
  • To change the storage location, update the .env file and restart Immich:
    sudo docker compose down
    sudo docker compose up -d

    Tip: Always back up your database before changing storage paths to avoid data loss.

Importing Existing Photos

  • Use the web interface’s import feature to add existing photo collections.
  • Immich auto-sorts files into folders based on date, device, or custom rules.

Mobile App Configuration

Immich’s mobile app for Android and iOS enables seamless photo and video backup from your devices.

Step 1: Download the App

  • Find Immich on the [Google Play Store] or [Apple App Store].

Step 2: Connect to Your Server

  • Open the app and enter your server URL:
    http://<your-server-ip>:2283
  • Log in with your admin or user credentials.

Install Immich on Linux Mint 22

Step 3: Enable Automatic Backup

  • In the app settings, enable auto-backup for photos and videos.
  • Select which albums or folders to back up.
  • Adjust backup preferences (Wi-Fi only, exclude videos, etc.) to suit your needs.

Troubleshooting Mobile Connectivity

  • Ensure your server is accessible from your mobile device’s network.
  • If accessing remotely, set up a reverse proxy and secure your server with HTTPS (see Advanced Configuration).

Advanced Configuration

Performance Tuning

  • Allocate more RAM and CPU to Docker if handling large libraries.
  • Enable hardware acceleration for AI features by downloading and configuring hwaccel.transcoding.yml and hwaccel.ml.yml files.

Database Optimization

  • Regularly back up the PostgreSQL database stored in the path set by DB_DATA_LOCATION.
  • Use SSD storage for the database directory to improve performance.

Setting Up a Reverse Proxy

  • Use NGINX or NGINX Proxy Manager to enable remote access and HTTPS.
  • Example NGINX configuration:
    server {
        listen 80;
        server_name photos.yourdomain.com;
    
        location / {
            proxy_pass http://localhost:2283;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
        }
    }
  • Obtain free SSL certificates with Let’s Encrypt for secure access.

Enabling Optional Features

  • Explore Immich’s settings for advanced options like AI face/object recognition, custom storage templates, and multi-user management.
  • Assign unique folder templates per user for organized backups (e.g., /Family/Jane/{{DATE}}).

Security Best Practices

  • Restrict external access to trusted users.
  • Regularly update Immich and underlying dependencies.
  • Use strong, unique passwords for admin and user accounts.

Maintenance and Updates

Keeping Immich Updated

  • Docker: Pull the latest images and restart containers:
    sudo docker compose pull
    sudo docker compose up -d
  • Snap: Update via:
    sudo snap refresh immich-distribution

Backups

  • Regularly back up your UPLOAD_LOCATION and DB_DATA_LOCATION directories.
  • Store backups offsite or on external drives for disaster recovery.

Monitoring and Logs

  • Monitor system resources with htop or docker stats.
  • View Immich logs with:
    sudo docker compose logs -f

Database Maintenance

  • Periodically vacuum and optimize the PostgreSQL database for best performance.

Troubleshooting Common Issues

Web Interface Not Accessible

  • Ensure Docker containers are running:
    sudo docker compose ps
  • Check for port conflicts (default: 2283 for Docker, 3000 for Snap).
  • Verify firewall settings allow inbound connections on the required port.

Storage Location Changes

  • If changing UPLOAD_LOCATION causes errors, revert to the previous path or ensure permissions are correct.
  • Sometimes, deleting the database folder and redeploying may resolve persistent issues, but always back up data first to prevent loss.

Database Connection Issues

  • Ensure the database container is running and the path in .env is correct.
  • Check Docker logs for error messages.

Mobile App Sync Failures

  • Verify server accessibility from your mobile device.
  • Check for correct server URL and user credentials.

Resource Usage Concerns

  • Increase allocated resources or move storage/database to faster drives if performance lags.

Permissions and File Access

  • Ensure the Docker user has read/write access to your storage directories.
  • Use ls -l to check and chown or chmod to adjust permissions as needed.

Performance Optimization

  • Use SSDs for both media and database storage.
  • Enable hardware acceleration for AI features if your hardware supports it.
  • Regularly prune unused Docker images and containers to free up disk space:
    sudo docker system prune -af
  • Optimize PostgreSQL with regular maintenance commands.

Congratulations! You have successfully installed Immich. Thanks for using this tutorial for installing Immich ultimate photo Backup on Linux Mint 22 system. For additional help or useful information, we recommend you check the official Immich website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button