How to Install Immich on Ubuntu 24.04 VPS with Docker Compose
Introduction
At ByteHosting, we understand the importance of having a reliable and efficient photo backup solution. That’s why today, we’re guiding you through the process of installing Immich on Ubuntu 24.04 VPS using Docker Compose. Whether you’re a beginner or an experienced user, this step-by-step tutorial will help you deploy Immich quickly and securely on your server.
Prerequisites: Setting Up Your Ubuntu 24.04 VPS and Installing Docker Compose
Before we begin, ensure you have a fresh Ubuntu 24.04 VPS. If you haven’t already, you can easily set up a VPS with ByteHosting’s affordable plans, 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_ipNext, update your package list and install Docker and Docker Compose:
sudo apt update
sudo apt install -y docker.io
Verify Docker installation:
docker --versionNow, install Docker Compose:
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
docker-compose --versionWith Docker and Docker Compose installed, your server is ready for the next steps.
Downloading and Configuring Immich Docker Images
Immich provides a Docker image that simplifies deployment. We will create a directory for Immich and set up the necessary configuration files:
mkdir ~/immich && cd ~/immichCreate a docker-compose.yml file:
nano docker-compose.ymlInsert the following configuration, which pulls the latest Immich image and sets up the container:
version: '3.8'
services:
immich:
image: ghcr.io/immich-app/immich:latest
container_name: immich
restart: unless-stopped
ports:
- "2283:2283"
environment:
- IMMICH_HOSTNAME=your_server_ip_or_domain
- IMMICH_PORT=2283
volumes:
- ./data:/app/data
- ./uploads:/app/uploads
Replace your_server_ip_or_domain with your server’s IP address or domain name. This configuration exposes Immich on port 2283 and persists data locally.
Running Immich with Docker Compose and Initial Setup
Start the Immich container:
docker-compose up -dThis command downloads the image and runs the container in detached mode. You can check if the container is running:
docker psOnce the container is active, Immich is accessible via your server’s IP address or domain on port 2283.
For initial setup, open your browser and navigate to:
http://your_server_ip:2283You will be prompted to create an admin account. Follow the on-screen instructions to complete the setup.
Accessing and Testing the Immich Photo Backup Service
After setup, you can start uploading photos through the web interface or via the mobile app. Immich supports multiple platforms, making it easy to back up your images securely.
Test the service by uploading a few photos and verifying they appear in your Immich library. Ensure your server’s firewall allows traffic on port 2283 if you encounter access issues.
Troubleshooting Common Issues During Installation and Setup
- Container not starting: Check logs with
docker logs immich. Ensure ports are not blocked by your firewall. - Unable to access Immich web interface: Verify your server’s IP or domain and port configuration. Also, confirm Docker container is running.
- Data persistence issues: Ensure volumes are correctly mapped in your
docker-compose.ymlfile. - SSL setup: For secure access, consider configuring a reverse proxy with SSL (e.g., Nginx with Let's Encrypt).
Conclusion
Deploying Immich on your Ubuntu 24.04 VPS with Docker Compose is a straightforward process that offers a powerful, open-source photo backup solution. At ByteHosting, we’re committed to providing reliable, affordable VPS hosting that makes deploying applications like Immich simple and efficient. Follow our guide, and you’ll have your own private photo backup server up and running in no time. If you need a VPS to host Immich or other applications, explore our flexible plans and experience enterprise-grade infrastructure at an affordable price.