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:
- Have basic knowledge of Linux and Ubuntu
- Have root access to your Ubuntu server
- Have Docker and Docker Compose installed on your system
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
Create a directory for PhotoPrism:
sudo mkdir /opt/photoprismNavigate to the directory:
cd /opt/photoprismCreate a
docker-compose.ymlfile:sudo nano docker-compose.ymlPaste 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_passwordwith your desired password - PHOTOPRISM_UNSPLASH_ACCESS_KEY and PHOTOPRISM_UNSPLASH_SECRET_KEY: the API key and secret for Unsplash. Replace
your_unsplash_access_keyandyour_unsplash_secret_keywith 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
- PHOTOPRISM_ADMIN_PASSWORD: the password for the admin user. Replace
Save and close the file by pressing
CTRL+X, thenY, thenENTER.Start the PhotoPrism container:
sudo docker-compose up -dThe
-doption detaches the container from the terminal.Wait for Docker to download and install the PhotoPrism image.
Access PhotoPrism by visiting
http://<your-server-ip>:2342in your web browser. You will be prompted to log in with the admin credentials you set in thedocker-compose.ymlfile. 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.