Prerequisites
Immich is a self-hosted photo and video backup solution.
Before starting, ensure you have:
- A Linux server (Ubuntu 20.04+ or Debian 11+ recommended)
- Root or sudo access
- At least 2GB RAM (4GB+ recommended)
- Docker and Docker Compose installed
Step 1: Install Docker and Docker compose
If you don’t already have Docker installed:
# Update package list
sudo apt update
# Install required packages
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
# Add Docker's official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
# Add Docker repository
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# Install Docker
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
# Start and enable Docker
sudo systemctl start docker
sudo systemctl enable docker
# Add your user to the docker group (optional, to run docker without sudo)
sudo usermod -aG docker $USERCode language: PHP (php)
Log out and back in for the group changes to take effect.
Step 2: Create directory structure
# Create a directory for Immich (whichever folder you like most)
mkdir -p ~/immich
cd ~/immich
#please note that the tilde (~) as in character may vary from distro to system settings and/or keyboard setting.
# Create directories for data storage
mkdir -p ./library
mkdir -p ./uploadCode language: PHP (php)
Step 3: download immich configuration files
# Download the docker-compose file
wget -O docker-compose.yml https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
# Download the example environment file
wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.envCode language: PHP (php)
Installing Immich on linux based systems
nano .envCode language: CSS (css)
Key variables to configure:
UPLOAD_LOCATION: Set to your desired upload path (default:./library)DB_PASSWORD: Set a strong database passwordDB_USERNAME: Database username (default: postgres)DB_DATABASE_NAME: Database name (default: immich)
Optional but recommended:
TZ: Set your timezone (e.g.,America/New_York)
Save and exit (Ctrl+X, then Y, then Enter).
Step 5: Start Immich
# Pull the latest images
docker compose pull
# Start Immich in detached mode
docker compose up -dCode language: PHP (php)
This will download all necessary Docker images and start the services.
Step 6: verify installation
Check that all containers are running:
docker compose ps
```
You should see several containers running including:
- immich_server
- immich_microservices
- immich_machine_learning
- immich_redis
- immich_postgres
### Step 7: Access Immich
Open your web browser and navigate to:
```
http://your-server-ip:2283Code language: JavaScript (javascript)
You should see the Immich welcome page where you can create your first account.
Step 7: Create your admin account
On first access, you’ll be prompted to create an admin account:
- Enter your email address
- Create a strong password
- Confirm your password
- Click “Sign Up”
Additional Configuration
Setting up SSL/HTTPS (Recommended):
For production use, you should set up a reverse proxy (like Nginx or Caddy) with SSL certificates. This requires:
- A domain name pointing to your server
- A reverse proxy configuration
- SSL certificates (free via Let’s Encrypt)
Backup Configuration:
Regularly backup:
- Your
.envfile - The
./librarydirectory (your photos/videos) - The PostgreSQL database
Updating Immich:
To update to the latest version:
cd ~/immich
docker compose pull
docker compose down
docker compose up -d
Troubleshooting
If containers fail to start:
# View logs
docker compose logs
# Or for a specific service
docker compose logs immich_serverCode language: PHP (php)
Common issues:
- Port 2283 already in use: Change the port in docker-compose.yml
- Permission issues: Ensure the user running Docker has access to the library directory
- Out of memory: Increase server RAM or adjust container memory limits
Leave a Reply