Immich Quick Setup Guide
Immich Self-Hosting Tutorial: Your Comprehensive Guide
Immich is a robust self-hosted photo and video backup solution designed to provide users with a secure and private way to manage their media. This tutorial will walk you through the process of setting up Immich on your own server, ensuring your photos and videos are safely stored and easily accessible.
Prerequisites
Before you begin, ensure you have the following:
- A server or a virtual private server (VPS) running a compatible Linux distribution (Ubuntu 20.04 or later is recommended).
- Basic knowledge of command-line operations.
- A domain name (optional but recommended for easier access).
Step 1: Prepare Your Server
-
Update and Upgrade Your System:
sudo apt update && sudo apt upgrade -y
-
Install Docker and Docker Compose: Docker is essential for running Immich. Install it using 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 apt-key add - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" sudo apt update sudo apt install docker-ce -y sudo systemctl status docker
Then, install Docker Compose:
sudo curl -L "https://github.com/docker/compose/releases/download/$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep -Po '(?<="tag_name": ")[^"]*')" /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose docker-compose --version
Step 2: Set Up Immich
-
Create a Directory for Immich: Choose a location for your Immich setup:
mkdir ~/immich cd ~/immich
-
Download the Docker Compose File: Create a
docker-compose.yml
file in the Immich directory:nano docker-compose.yml
Copy and paste the following content into the file:
version: '3.7' services: immich-server: image: alexkimxyz/immich-server:latest container_name: immich-server environment: DATABASE_URL: "postgres://immich:immich@immich-db:5432/immich" NODE_ENV: "production" ports: - "2283:2283" depends_on: - immich-db immich-db: image: postgres:13-alpine container_name: immich-db environment: POSTGRES_USER: immich POSTGRES_PASSWORD: immich POSTGRES_DB: immich volumes: - immich-db-data:/var/lib/postgresql/data immich-frontend: image: alexkimxyz/immich-frontend:latest container_name: immich-frontend ports: - "80:80" depends_on: - immich-server volumes: immich-db-data:
-
Start Immich: Run Docker Compose to start the Immich services:
sudo docker-compose up -d
Step 3: Access Immich
-
Access Immich Web Interface: Open a web browser and navigate to your server’s IP address or domain name. For example:
http://your-server-ip
If you have a domain name, ensure it points to your server’s IP address and access Immich via:
http://your-domain-name
-
Set Up an Admin Account: On your first visit, you’ll be prompted to create an admin account. Follow the on-screen instructions to set up your account.
Step 4: Configure Immich
-
Set Up Backups: Use the Immich web interface to configure backup settings. You can define backup folders, schedules, and preferences.
-
Secure Your Setup: For better security, consider setting up HTTPS using a reverse proxy like Nginx with Let’s Encrypt. This ensures encrypted communication with your Immich server.
Step 5: Manage and Maintain
-
Regular Updates: Keep your Immich installation and server up to date. To update Immich, pull the latest Docker images and restart the services:
cd ~/immich sudo docker-compose pull sudo docker-compose up -d
-
Backups: Regularly back up your Immich data and PostgreSQL database. Use tools like
pg_dump
for PostgreSQL backups and consider automated scripts for regular data backups.
Conclusion
Self-hosting Immich gives you full control over your photo and video backups, ensuring privacy and security. With this guide, you can set up, configure, and maintain your own Immich server. Enjoy the peace of mind that comes with knowing your memories are securely stored and easily accessible at your fingertips. Happy hosting!