FedoraRHEL Based

How To Install Immich on Fedora 42

Install Immich on Fedora 42

Immich stands as a powerful, self-hosted alternative to cloud photo services like Google Photos, allowing users to maintain complete control over their personal media collections. This comprehensive guide walks you through installing Immich on Fedora 42, configuring it properly, and maintaining your self-hosted photo management system for optimal performance and reliability.

Understanding Immich and Its Benefits

Immich is an open-source, self-hosted solution designed specifically for backing up and managing photos and videos with privacy in mind. Unlike proprietary cloud services, Immich puts you in complete control of your media library while offering similar functionality.

Key benefits of Immich include:

  • Complete ownership and privacy of your personal media
  • No subscription costs or storage limitations
  • Automatic mobile uploads from Android and iOS
  • Advanced features like facial recognition
  • Clean, intuitive user interface similar to commercial solutions
  • Customizable organization options

The architecture consists of several components working together: a web server, specialized microservices for handling tasks like machine learning-based detection, and a PostgreSQL database for metadata storage. As of May 2025, the latest version (v1.132.3) includes significant improvements to facial recognition and search capabilities.

System Requirements for Immich on Fedora 42

Before proceeding with installation, ensure your Fedora 42 system meets these requirements:

Hardware Requirements:

  • CPU: Minimum 2 cores; 4 or more cores recommended for optimal performance
  • RAM: Minimum 4GB; 6GB or 8GB recommended, especially for larger libraries
  • Storage: Space depends on your media collection size; plan for your library plus approximately 30% overhead for thumbnails and transcoded videos
  • Network: Stable connection, particularly if accessing remotely

Software Requirements:

  • Fedora 42 (fully updated)
  • Docker with Docker Compose plugin (version 2.x, not the deprecated docker-compose with hyphen)
  • Available ports for Immich services (2283 for web interface, plus additional internal ports)
  • Filesystem supporting proper permissions (ext4, XFS, Btrfs) for database storage

Preparation Steps

Proper preparation ensures a smooth installation process.

Updating Fedora 42

First, ensure your system is fully updated:

sudo dnf update -y
sudo dnf upgrade -y

Install essential utilities that will be helpful throughout the installation:

sudo dnf install curl wget nano git -y

Installing Docker and Docker Compose

Immich runs on Docker containers, so installing Docker Engine and Docker Compose plugin is essential:

1. Set up the Docker repository:

sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo

2. Install Docker Engine and required components:

sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y

3. Start and enable Docker service:

sudo systemctl start docker
sudo systemctl enable docker

4. Add your user to the docker group to avoid using sudo with each command:

sudo usermod -aG docker $USER
newgrp docker  # Apply group changes without logging out

5. Verify the installation was successful:

docker --version
docker compose version

Both commands should return version information confirming proper installation.

Creating a Dedicated Directory Structure

Create a well-organized directory structure for your Immich installation:

mkdir -p ~/immich-app
cd ~/immich-app
mkdir -p config
mkdir -p data/{library,upload,profile,backups}

This structure facilitates easier backups and maintenance, separating configuration files from media storage.

Docker Compose Installation Method

Docker Compose is the recommended installation method for Immich.

Creating the Installation Directory

Navigate to your Immich directory and ensure appropriate permissions:

cd ~/immich-app
chmod 755 ~/immich-app

Downloading the Docker Compose File

Obtain the official Docker Compose configuration directly from the Immich project:

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

Setting up Environment Variables

Create and configure the environment file:

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

Edit the .env file to customize your installation:

nano .env

Key configuration variables to modify:

  • UPLOAD_LOCATION: Set to the full path of your data directory (e.g., /home/username/immich-app/data)
  • DB_PASSWORD: Change to a strong, unique password
  • DB_DATA_LOCATION: For Fedora with SELinux, use a Docker volume instead of a local path (change from ./postgres to postgres)
  • JWT_SECRET: Set to a random string for enhanced security

Save your changes before proceeding.

Launching Immich Containers

Start the Immich services:

docker compose up -d

The -d flag runs containers in detached mode (background). Docker will download necessary images and start the containers.

Verify all services are running properly:

docker compose ps

All containers should show a “running” state. Check logs if needed:

docker compose logs immich_server

SELinux Configuration for Fedora

Fedora’s default SELinux implementation often causes permission issues with Docker containers.

Understanding SELinux Challenges with Immich

SELinux enforces strict security policies that can prevent Docker containers from accessing mounted volumes, even when traditional file permissions are correctly set. This typically manifests as permission denied errors in container logs.

Temporary SELinux Solution

For quick testing, temporarily modify the SELinux context of your Immich directories:

chcon -Rt svirt_sandbox_file_t ./immich-app/

This allows containers to access files but resets after system reboot.

Permanent SELinux Solution

For a persistent solution that survives reboots:

semanage fcontext -a -t svirt_sandbox_file_t "$(pwd)/immich-app(/.*)?"
sudo restorecon -R ./immich-app/

This establishes a permanent SELinux policy for the directory.

Verify the SELinux context is correctly applied:

ls -lZ ./immich-app/

Troubleshooting SELinux-Related Issues

If you encounter permission problems despite correct context settings:

1. Check audit logs for denied actions:

grep "denied" /var/log/audit/audit.log | audit2allow -M immich

2. Generate and apply a custom policy module:

sudo semodule -i immich.pp

3. Apply the context to specific overlay directories if needed:

restorecon -R /var/lib/docker/overlay2/

These steps typically resolve common SELinux-related issues with Immich on Fedora 42.

Alternative Installation: Snap Package

Fedora 42 supports snap packages, offering an alternative installation method.

Installing via Snap Store

1. Install snap support if not already present:

sudo dnf install snapd -y
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap

2. Install Immich:

sudo snap install immich-distribution

3. Select your desired release channel:

  • stable: Production-ready releases
  • candidate: Pre-release testing versions
  • beta: Feature-complete but potentially buggy
  • edge: Latest development builds

For example, to install from the beta channel:

sudo snap install immich-distribution --channel=beta

Snap-Specific Configuration

The snap installation stores data differently than Docker:

  • Configuration: /var/snap/immich-distribution/common/config
  • Upload data: /var/snap/immich-distribution/common/upload

Some users report that Docker installation offers better performance for larger libraries. Another limitation of snap installation is reduced customization compared to Docker method.

Advanced Option: Native Installation

For users preferring maximum control, Immich can be installed without containers.

Installing Without Containers

This approach requires manually setting up all components:

1. Create a dedicated user:

sudo useradd -m -s /bin/bash immich

2. Install required dependencies:

sudo dnf install postgresql redis nodejs npm python3 ffmpeg -y

3. Clone the Immich repository:

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

4. Follow the standard build process for the Immich server and microservices.

This method requires more Linux expertise but provides full control over each component.

System Service Configuration

Create systemd service files to manage Immich services:

sudo nano /etc/systemd/system/immich-server.service

Add appropriate configuration for each service, then enable and start them:

sudo systemctl enable immich-server immich-microservices
sudo systemctl start immich-server immich-microservices

This ensures Immich starts automatically with your system.

Post-Installation Configuration

After successful installation, configure Immich for use.

Initial Server Access

Find your server’s IP address:

ip addr show

Access the Immich web interface at:

http://your-server-ip:2283

If accessing locally on the same machine, use:

http://localhost:2283

Admin User Registration

When first accessing Immich, create an administrator account:

  1. Click “Getting Started”
  2. Complete the registration form with your details
  3. Create a strong, unique password

This first account automatically becomes the system administrator with full control over settings and user management.

Install Immich on Fedora 42

Creating Additional Users

Add family members or friends through the admin interface:

  1. Navigate to “Administration” → “User Management”
  2. Click “Add User”
  3. Enter required information and set permissions
  4. Decide whether users can self-register or require admin approval

Each user receives their own storage space and permissions configuration.

Storage Template Configuration

Customize how Immich organizes your media:

  1. Go to “Administration” → “System Settings”
  2. Find the “Storage Template” section
  3. Configure patterns like {{y}}/{{y}}-{{MM}}-{{DD}}/{{filename}}

This creates organized structures like 2025/2025-05-21/IMG_1234.jpg, making manual browsing easier if needed.

Mobile and Web App Setup

Immich offers multiple ways to interact with your media library.

Web Interface Usage

The web interface provides comprehensive management capabilities:

  • Timeline view for chronological browsing
  • Album creation and management
  • Face recognition and people tagging
  • Map view for location-based organization
  • Advanced search functionality

Test the system by uploading photos through the web interface’s upload button.

Mobile App Installation

Immich offers mobile apps for both major platforms:

  • Android: Available on Google Play Store
  • iOS: Available on Apple App Store

Download the appropriate app for your device.

Connecting Mobile App to Server

Configure the mobile app to connect to your server:

  1. Enter your server address including port: http://your-server-ip:2283
  2. Provide login credentials
  3. Test connection

The app will verify communication with your Immich server before proceeding.

Configuring Backup Settings

Set up automatic photo backup from your mobile devices:

  1. Navigate to app settings
  2. Enable “Auto Backup”
  3. Select albums to include/exclude
  4. Configure options like “Backup on Wi-Fi only”

Background backup processes will continuously protect new photos and videos by uploading them to your server.

Troubleshooting Common Issues

Even with careful installation, issues may arise. Here are solutions to common problems.

Container Startup Problems

If containers fail to start:

  1. Check container logs:
    docker compose logs immich_server
  2. Verify port availability:
    sudo ss -tulpn | grep '2283\|5432\|6379'
  3. Look for SELinux denials in audit logs:
    sudo grep "denied" /var/log/audit/audit.log
  4. Ensure permissions are correct on mounted volumes.

Network Connectivity Issues

If you can’t access the web interface:

  1. Verify containers are running:
    docker compose ps
  2. Check firewall settings:
    sudo firewall-cmd --list-all
  3. Allow necessary ports:
    sudo firewall-cmd --permanent --add-port=2283/tcp
    sudo firewall-cmd --reload
  4. For remote access, configure proper port forwarding on your router.

Performance Optimization

To improve Immich performance:

  1. Allocate appropriate resources in docker-compose.yml
  2. Move the database to SSD storage if possible
  3. Adjust PostgreSQL cache settings through environment variables
  4. Consider disabling some machine learning features if hardware is limited

These adjustments can significantly improve response times, especially with larger libraries.

Backup and Maintenance

Proper backup strategies ensure your photos remain safe.

Backing up Immich Data

Immich stores several types of data requiring protection:

1. Database: Immich automatically creates daily database dumps in the UPLOAD_LOCATION/backups directory. You can configure the schedule and retention period in admin settings.

2. Critical original content is stored in specific folders:

UPLOAD_LOCATION/library
UPLOAD_LOCATION/upload
UPLOAD_LOCATION/profile

You must back up these locations regularly. Without database backups, you risk losing all metadata, tags, albums, and organization.

To manually trigger a database backup:

docker exec -t immich_postgres pg_dumpall --clean --if-exists --username=postgres | gzip > "/path/to/backup/immich-$(date +%Y%m%d).sql.gz"

Updating Immich

Keep your installation current:

cd ~/immich-app
docker compose pull
docker compose down
docker compose up -d

Always review release notes before updating, as some updates might require additional steps. Creating a backup before updating is strongly recommended.

For version tracking, check the admin dashboard or inspect Docker images:

docker image ls | grep immich

Congratulations! You have successfully installed Immich. Thanks for using this tutorial for installing Immich self-hosted on Fedora 42 Linux 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