How to Install PhotoPrism on Ubuntu Server Latest

PhotoPrism is a personal photo manager powered by Go and Angular. It allows you to organize and edit your photo collection, as well as share it with others. In this tutorial, we will be installing PhotoPrism on Ubuntu Server Latest.

Prerequisites

Before continuing with this tutorial, you should:

Step 1 - Install Docker and Docker Compose

If you haven't installed Docker and Docker Compose, you can follow the instructions in our tutorial on how to install Docker and Docker Compose on Ubuntu.

Step 2 - Install PhotoPrism

  1. Create a directory for PhotoPrism:

    sudo mkdir /opt/photoprism
    
  2. Navigate to the directory:

    cd /opt/photoprism
    
  3. Create a docker-compose.yml file:

    sudo nano docker-compose.yml
    
  4. Paste the following content:

    version: '3'
    
    services:
      photoprism:
        image: photoprism/photoprism:latest
        ports:
          - "2342:2342"
        environment:
          PHOTOPRISM_ADMIN_PASSWORD: your_admin_password
          PHOTOPRISM_UNSPLASH_ACCESS_KEY: your_unsplash_access_key
          PHOTOPRISM_UNSPLASH_SECRET_KEY: your_unsplash_secret_key
          PHOTOPRISM_SCANDIR: /pictures
          PHOTOPRISM_READONLY: "1"
          PHOTOPRISM_BATCH_IMPORT: "1"
          PHOTOPRISM_ORIGINALS_DIR: "/data/originals"
          PHOTOPRISM_CACHE_DIR: "/data/cache"
          PHOTOPRISM_EXPORT_DIR: "/data/export"
          PHOTOPRISM_LOG_DIR: "/data/logs"
        volumes:
          - photoprism_data:/data
          - /your/photo/directory:/pictures
        restart: unless-stopped
    
    volumes:
      photoprism_data:
    

    You can edit the environment variables according to your preferences. The environment variables used in this file are:

    • PHOTOPRISM_ADMIN_PASSWORD: the password for the admin user. Replace your_admin_password with your desired password
    • PHOTOPRISM_UNSPLASH_ACCESS_KEY and PHOTOPRISM_UNSPLASH_SECRET_KEY: the API key and secret for Unsplash. Replace your_unsplash_access_key and your_unsplash_secret_key with your own keys
    • PHOTOPRISM_SCANDIR: the directory that PhotoPrism should scan for photos
    • PHOTOPRISM_ORIGINALS_DIR, PHOTOPRISM_CACHE_DIR, PHOTOPRISM_EXPORT_DIR, and PHOTOPRISM_LOG_DIR: the directories where PhotoPrism should store originals, cache, exported photos, and logs, respectively
    • PHOTOPRISM_READONLY: if set to 1, PhotoPrism will run in read-only mode
    • PHOTOPRISM_BATCH_IMPORT: if set to 1, PhotoPrism will import photos in batches
  5. Save and close the file by pressing CTRL+X, then Y, then ENTER.

  6. Start the PhotoPrism container:

    sudo docker-compose up -d
    

    The -d option detaches the container from the terminal.

  7. Wait for Docker to download and install the PhotoPrism image.

  8. Access PhotoPrism by visiting http://<your-server-ip>:2342 in your web browser. You will be prompted to log in with the admin credentials you set in the docker-compose.yml file. Once logged in, you can start importing and managing your photo collection.

Conclusion

You have now installed PhotoPrism on Ubuntu Server Latest using Docker and Docker Compose. You can now upload and edit your photo collection, as well as share it with others. For more information on using PhotoPrism, refer to the official documentation.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!