UbuntuUbuntu Based

How To Install PhotoPrism on Ubuntu 24.04 LTS

Install PhotoPrism on Ubuntu 24.04

In this tutorial, we will show you how to install PhotoPrism on Ubuntu 24.04 LTS. PhotoPrism, a powerful and user-friendly photo management application, simplifies this process. By combining cutting-edge technologies like AI-powered image recognition and a sleek, intuitive interface, PhotoPrism empowers users to effortlessly sort, search, and enjoy their cherished memories.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the PhotoPrism on Ubuntu 24.04 (Noble Numbat). You can follow the same instructions for Ubuntu 22.04 and any other Debian-based distribution like Linux Mint, Elementary OS, Pop!_OS, and more as well.

Prerequisites

Before installing PhotoPrism on Ubuntu 24.04 LTS, ensure your system meets the following requirements:

  • A server running one of the following operating systems: Ubuntu and any other Debian-based distribution like Linux Mint.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • An active internet connection. You’ll need an internet connection to download the necessary packages and dependencies.
  • An Ubuntu 24.04 system with root access or a user with sudo privileges.

Install PhotoPrism on Ubuntu 24.04 LTS

Step 1. Updating the Package Repository.

Before installing any new software, it’s crucial to update your system packages to the latest versions. This ensures compatibility and security.

sudo apt update
sudo apt upgrade

The apt update command refreshes the package list, while apt upgrade installing the available updates. This step helps resolve any dependency issues and provides access to the latest security patches and bug fixes.

Step 2. Installing Docker.

Docker is essential for running PhotoPrism. Follow these steps to install Docker on Ubuntu 24.04 LTS:

First, install required dependencies:

sudo apt install 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

Set up the 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 docker-ce docker-ce-cli containerd.io

Verify Docker installation:

docker --version

Step 3. Installing Docker Compose.

Docker Compose is used to manage multi-container Docker applications. Install it with the following commands:

sudo curl -L "https://github.com/docker/compose/releases/download/v2.16.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Apply for executable permissions:

sudo chmod +x /usr/local/bin/docker-compose

Verify Docker Compose installation:

docker-compose --version

Step 4. Creating Directories and Configuration Files.

Create a directory for PhotoPrism:

sudo mkdir /opt/photoprism

Navigate to the directory:

cd /opt/photoprism

Download the docker-compose.yml file:

wget https://dl.photoprism.app/docker/docker-compose.yml

Edit the docker-compose.yml file to configure PhotoPrism:

sudo nano docker-compose.yml

Step 5. Configuring Docker Compose

The docker-compose.yml file defines the services, networks, and volumes for PhotoPrism. Here’s an example configuration:

version: '3.8'

services:
  photoprism:
    image: photoprism/photoprism:latest
    restart: unless-stopped
    ports:
      - 2342:2342
    environment:
      PHOTOPRISM_ADMIN_PASSWORD: "Your-Secure-Password"
      PHOTOPRISM_ORIGINALS_PATH: "/photoprism/originals"
      PHOTOPRISM_STORAGE_PATH: "/photoprism/storage"
    volumes:
      - /opt/photoprism/originals:/photoprism/originals
      - /opt/photoprism/storage:/photoprism/storage
    depends_on:
      - mariadb

  mariadb:
    image: mariadb:latest
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: "YourMariaDBRootPassword"
      MYSQL_DATABASE: "photoprism"
      MYSQL_USER: "photoprism"
      MYSQL_PASSWORD: "YourMariaDBPassword"
    volumes:
      - /opt/photoprism/database:/var/lib/mysql

Replace the placeholder values with your own secure passwords.

Step 6. Launching PhotoPrism.

With the docker-compose.yml file properly configured, you’re now ready to launch your PhotoPrism instance. Docker Compose simplifies the process of starting and managing the PhotoPrism and MariaDB containers.

First, ensure that you’re in the directory where the docker-compose.yml file is located. Then, run the following command to pull the latest PhotoPrism Docker image:

docker-compose pull

Start PhotoPrism and MariaDB services:

docker-compose up -d

Verify the installation:

docker-compose logs -f

Step 7. Access PhotoPrism via a web browser.

Open your browser and navigate to http://<your-server-ip>:2342. Upon accessing the PhotoPrism interface for the first time, you’ll be prompted to log in using the admin credentials specified in the docker-compose.yml file. Enter your admin username and password to access the PhotoPrism dashboard.

Install PhotoPrism on Ubuntu 24.04 LTS

Congratulations! You have successfully installed PhotoPrism. Thanks for using this tutorial for installing the PhotoPrism on the Ubuntu 24.04 LTS system. For additional help or useful information, we recommend you check the official PhotoPrism website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to idroot.us, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button