PhotoPrism is a self-hosted application for managing and sharing your photo collection. It offers features such as automatic image classification, smart albums, and advanced search capabilities. In this tutorial, we will show you how to install PhotoPrism on Fedora Server latest.
Before installing any packages, it is recommended to update the system’s software packages to the latest version.
sudo dnf update -y
The following packages are required to install PhotoPrism:
To install these packages, run the following command:
sudo dnf install -y nginx mariadb-server php php-fpm php-xml php-exif php-common php-zip php-gd
Log in to MariaDB using the following command:
sudo mysql -u root
Create a database user by running the following command:
CREATE USER 'photoprism'@'localhost' IDENTIFIED BY 'strongpassword';
Create a new database for PhotoPrism:
CREATE DATABASE photoprism;
Grant the appropriate permissions to the user on the database:
GRANT ALL ON photoprism.* TO 'photoprism'@'localhost';
Flush the privileges and exit:
FLUSH PRIVILEGES;
EXIT;
Download the latest version of PhotoPrism by running the following command:
curl -LO https://dl.photoprism.org/releases/photoprism-linux-amd64-static.tar.gz
Extract the downloaded files and move the PhotoPrism executable to the /usr/local/bin directory:
sudo tar -xzf photoprism-linux-amd64-static.tar.gz
sudo mv photoprism /usr/local/bin
Create a new server block configuration file for NGINX:
sudo nano /etc/nginx/conf.d/photoprism.conf
Add the following configuration:
server {
listen 80;
listen [::]:80;
server_name example.com; # Your domain or subdomain
root /var/www/html/photoprism;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/run/php-fpm/www.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
Save and close the file.
Open the PHP-FPM configuration file:
sudo nano /etc/php-fpm.d/www.conf
Update the following settings:
listen = /run/php-fpm/www.sock
listen.acl_users = nginx
user = nginx
group = nginx
Save and close the file.
Enable and start the NGINX, PHP-FPM, and MariaDB services using the following commands:
sudo systemctl enable --now nginx
sudo systemctl enable --now php-fpm
sudo systemctl enable --now mariadb
Open your web browser and navigate to http://example.com (replace "example.com" with your domain or subdomain).
The PhotoPrism setup page should appear.
Follow the on-screen instructions to complete the setup process. You will need to provide the following information:
Once the setup is complete, you can start uploading photos to your PhotoPrism instance.
In this tutorial, you learned how to install PhotoPrism on Fedora Server latest. PhotoPrism is a powerful tool for managing and sharing your photo collection, and by following the steps outlined in this tutorial, you can quickly get it up and running on your server.
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!