
Immich Server Setup Guide
Complete step-by-step instructions to set up an Immich server on Ubuntu 22.04 LTS with a 150 GB volume for storage. Immich is a self-hosted photo and video backup solution that provides an alternative to cloud-based services.
Prerequisites
Before starting, ensure you have:
• A server running Ubuntu 22.04 LTS
• Root or sudo privileges for administrative tasks
• An active internet connection to download packages
• An additional 150 GB volume attached to the server
• Basic knowledge of Linux command-line interface (CLI)
• A backup destination (external drive, cloud storage, or another server)
Step 1: Prepare the System
Update your system to ensure all packages are up to date.
sudo apt update && sudo apt upgrade -y
Step 2: Set Up the Volume
Format, mount, and configure the additional 150 GB volume to store Immich's data.
1. Identify the Extra Volume:
lsblk
2. Format the Volume (Warning: This erases all data on the volume):
sudo mkfs.ext4 /dev/xvdb
3. Create a Mount Point:
sudo mkdir /mnt/immich_data
4. Mount the Volume:
sudo mount /dev/xvdb /mnt/immich_data
5. Verify the Mount:
df -h /mnt/immich_data
6. Make the Mount Persistent by adding to /etc/fstab:
sudo blkid /dev/xvdbsudo nano /etc/fstab
Add this line to /etc/fstab (replace UUID with your volume's UUID):
UUID=<your-uuid-here> /mnt/immich_data ext4 defaults,nofail 0 2
7. Set Permissions:
sudo chown -R 1000:1000 /mnt/immich_datasudo chmod -R 755 /mnt/immich_data
Step 3: Install Docker and Docker Compose
1. Add Docker's Official GPG Key:
sudo apt-get updatesudo apt-get install ca-certificates curlsudo install -m 0755 -d /etc/apt/keyringssudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.ascsudo chmod a+r /etc/apt/keyrings/docker.asc
2. Add the Repository to Apt Sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update3. Install Docker and Docker Compose:
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Step 4: Set Up Immich
1. Create and navigate to Immich directory:
mkdir ./immich-appcd ./immich-app
2. Download Docker Compose and .env files:
wget -O docker-compose.yml https://github.com/immich-app/immich/releases/latest/download/docker-compose.ymlwget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env
3. Edit the .env file with key settings:
nano .env
# Update these values:
UPLOAD_LOCATION=/mnt/immich_data/upload
DB_DATA_LOCATION=/mnt/immich_data/db
TZ=Asia/Kolkata4. Create directories and set permissions:
sudo mkdir -p /mnt/immich_data/upload /mnt/immich_data/dbsudo chown -R 1000:1000 /mnt/immich_datasudo chmod -R 755 /mnt/immich_data
5. Start Immich:
docker compose up -d
Step 5: Verify Installation
• Access the Immich web interface at http://<your-server-ip>:2283
• Create an admin account and configure Immich
• Verify that data directories are being populated
Important Notes
• Regularly back up the /mnt/immich_data directory
Monitor Docker container logs:
docker compose logs
For updates, pull latest images and restart:
docker compose pull && docker compose up -d
This setup ensures a robust Immich server for managing your photos and videos with persistent storage on your 150GB volume.
Recommended Next Steps
Now that your server is running, you should secure it with SSL and set up backups:
• Setup SSL Certificate for Immich: /tech-guides/Immich-SSL-Certificate
• Setup AWS S3 Backup for Immich: /tech-guides/Immich-AWS-S3-Backup