How to Install Immich on Ubuntu 24.04 VPS with Docker Compose
Introduction
If you're looking to set up a reliable photo backup server on your Ubuntu 24.04 VPS, Immich is an excellent open-source solution. It allows you to organize, browse, and share your photos securely. At ByteHosting, we understand the importance of a straightforward, beginner-friendly setup process. In this guide, we will walk you through the steps to install Immich on Ubuntu VPS using Docker Compose, ensuring a smooth deployment even if you're new to server management.
Prerequisites: Setting up Your Ubuntu 24.04 VPS
Before we begin, make sure you have a fresh Ubuntu 24.04 VPS. If you haven't already, choose a suitable plan from ByteHosting, such as our Xeon - 4GB or Xeon - 6GB options, which are perfect for hosting applications like Immich. Once your VPS is ready, connect via SSH:
ssh your_username@your_server_ipReplace your_username and your_server_ip with your actual server login details. Now, let's prepare the server for the installation.
Installing Docker and Docker Compose on Ubuntu
Step 1: Update Your System
Start by updating your package list and upgrading existing packages:
sudo apt update && sudo apt upgrade -yStep 2: Install Docker
Docker is essential for containerizing Immich. Install it with the following commands:
sudo apt install apt-transport-https ca-certificates curl software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
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
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io -yVerify Docker installation:
docker --versionStep 3: Install Docker Compose
Docker Compose simplifies managing multi-container applications. Install it with:
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
Check the installation:
docker-compose --versionDownloading and Configuring Immich with Docker Compose
Step 1: Create a Directory for Immich
Organize your files by creating a dedicated folder:
mkdir ~/immich && cd ~/immichStep 2: Create a Docker Compose File
Use your preferred text editor to create docker-compose.yml:
nano docker-compose.ymlPaste the following configuration, which sets up Immich with necessary services:
version: '3.8'
services:
immich:
image: ghcr.io/immich-app/immich:latest
container_name: immich
restart: unless-stopped
ports:
- "3000:3000"
environment:
- IMMICH_HOST=http://localhost:3000
- IMMICH_STORAGE_PATH=/app/storage
volumes:
- ./storage:/app/storage
Step 3: Save and Exit
Save the file and exit your editor (for nano, press CTRL+X, then Y, then Enter).
Starting Immich and Accessing the Web Interface
Step 1: Launch Immich
Run Docker Compose to start the service:
docker-compose up -dThis command downloads the Immich image and runs it in detached mode. You can check if the container is running with:
docker psStep 2: Access Immich
Open your web browser and navigate to http://your_server_ip:3000. You should see the Immich setup page. Follow the on-screen instructions to complete the initial configuration.
Troubleshooting Common Issues and Final Checks
- Port conflicts: Ensure port 3000 is open in your server's firewall. Use
ufw allow 3000if necessary. - Container not starting: Check logs with
docker logs immichfor errors. - Persistent storage: Make sure the
storagedirectory exists and has proper permissions.
Once everything is running smoothly, you can start uploading and managing your photos securely through Immich. Remember, at ByteHosting, we offer reliable VPS hosting in Frankfurt, perfect for hosting applications like Immich with high uptime and excellent support.
Conclusion
Deploying Immich on your Ubuntu 24.04 VPS is straightforward with Docker Compose. This guide provides a clear, beginner-friendly approach to get your photo backup server up and running. Whether you're a hobbyist or a professional, Immich offers a powerful way to organize your photos securely. If you need a dependable VPS to host your applications, consider our affordable plans at ByteHosting. We’re here to support your hosting needs with enterprise-grade infrastructure and excellent customer service.