2021-08-05 18:49:30 +02:00
|
|
|
PhotoPrism for Cloud Servers running Ubuntu 20.04 LTS (Focal Fossa)
|
|
|
|
===================================================================
|
|
|
|
|
2021-08-08 13:53:20 +02:00
|
|
|
SOFTWARE INCLUDED
|
|
|
|
-------------------------------------------------------------------
|
|
|
|
|
|
|
|
PhotoPrism latest, AGPL 3
|
|
|
|
Docker CE 20.10, Apache 2
|
|
|
|
Traefik 2.4, MIT
|
|
|
|
MariaDB 10.5, GPL 2
|
|
|
|
Ofelia 0.3.4, MIT
|
|
|
|
Watchtower 1.3, Apache 2
|
|
|
|
|
|
|
|
GETTING STARTED
|
|
|
|
-------------------------------------------------------------------
|
|
|
|
|
|
|
|
Run this script as root to install PhotoPrism on a cloud server e.g.
|
|
|
|
at DigitalOcean:
|
2021-08-05 18:49:30 +02:00
|
|
|
|
2021-12-12 20:15:52 +01:00
|
|
|
bash <(curl -s https://dl.photoprism.app/docker/cloud/setup.sh)
|
2021-08-05 18:49:30 +02:00
|
|
|
|
2021-08-08 13:53:20 +02:00
|
|
|
This may take a while to complete, depending on the performance of
|
|
|
|
your server and its internet connection.
|
2021-08-05 18:54:22 +02:00
|
|
|
|
2021-08-05 18:55:58 +02:00
|
|
|
When done - and you see no errors - please open
|
2021-08-05 18:49:30 +02:00
|
|
|
|
2021-08-05 21:35:36 +02:00
|
|
|
https://<YOUR SERVER IP>/
|
2021-08-05 18:49:30 +02:00
|
|
|
|
2021-08-05 21:35:36 +02:00
|
|
|
in a Web browser and log in using the initial admin password shown
|
2021-08-06 09:11:07 +02:00
|
|
|
by the script. You may also see the initial password by running
|
2021-08-05 18:54:22 +02:00
|
|
|
|
2021-08-05 21:35:36 +02:00
|
|
|
cat /root/.initial-password.txt
|
2021-08-05 18:49:30 +02:00
|
|
|
|
2021-08-06 09:11:07 +02:00
|
|
|
as root on your server. To open a terminal:
|
|
|
|
|
|
|
|
ssh root@<YOUR SERVER IP>
|
2021-08-05 21:35:36 +02:00
|
|
|
|
2021-08-05 22:41:53 +02:00
|
|
|
Data and all config files related to PhotoPrism can be found in
|
|
|
|
|
|
|
|
/opt/photoprism
|
|
|
|
|
2021-08-05 21:35:36 +02:00
|
|
|
The main docker-compose config file for changing config options is
|
|
|
|
|
2021-08-05 22:41:53 +02:00
|
|
|
/opt/photoprism/docker-compose.yml
|
2021-08-05 21:35:36 +02:00
|
|
|
|
|
|
|
The server is running as "photoprism" (UID 1000) by default. There's no need
|
|
|
|
to change defaults unless you experience conflicts with other services running
|
|
|
|
on the same server. For example, you may need to disable the Traefik reverse
|
|
|
|
proxy as the ports 80 and 443 can only be used by a single web server / proxy.
|
|
|
|
|
2021-08-05 22:41:53 +02:00
|
|
|
Configuring multiple apps on the same server is beyond the scope of this base
|
|
|
|
config and for advanced users only.
|
2021-08-05 18:49:30 +02:00
|
|
|
|
2021-08-08 13:53:20 +02:00
|
|
|
SYSTEM REQUIREMENTS
|
|
|
|
-------------------------------------------------------------------
|
2021-08-05 18:49:30 +02:00
|
|
|
|
|
|
|
We recommend hosting PhotoPrism on a server with at least 2 cores and
|
|
|
|
4 GB of memory. Beyond these minimum requirements, the amount of RAM
|
|
|
|
should match the number of cores. Indexing large photo and video
|
|
|
|
collections significantly benefits from fast, local SSD storage.
|
|
|
|
|
2022-01-27 09:16:10 +01:00
|
|
|
RAW image conversion and automatic image classification using TensorFlow
|
|
|
|
will be disabled on servers with 1 GB or less memory.
|
2021-08-08 11:24:50 +02:00
|
|
|
|
2021-08-08 13:53:20 +02:00
|
|
|
USING LET'S ENCRYPT HTTPS
|
|
|
|
-------------------------------------------------------------------
|
2021-08-08 11:24:50 +02:00
|
|
|
|
|
|
|
By default, a self-signed certificate will be used for HTTPS connections.
|
|
|
|
Browsers are going to show a security warning because of that. Depending
|
|
|
|
on your settings, they may also refuse connecting at all.
|
|
|
|
|
|
|
|
To get an official, free HTTPS certificate from Let's Encrypt, your server
|
2021-08-08 11:33:23 +02:00
|
|
|
needs a fully qualified public domain name, e.g. "photos.yourdomain.com".
|
|
|
|
|
|
|
|
You may add a static DNS entry (on DigitalOcean go to Networking > Domains)
|
|
|
|
for this, or use a Dynamic DNS service of your choice.
|
2021-08-08 11:24:50 +02:00
|
|
|
|
|
|
|
Once your server has a public domain name, please disable the self-signed
|
|
|
|
certificate and enable domain based routing in docker-compose.yml and
|
|
|
|
traefik.yaml (see inline instructions in !! UPPERCASE !!):
|
|
|
|
|
|
|
|
ssh root@<YOUR SERVER IP>
|
2021-08-08 11:33:23 +02:00
|
|
|
cd /opt/photoprism
|
|
|
|
nano docker-compose.yml
|
|
|
|
nano traefik.yaml
|
2021-08-08 11:24:50 +02:00
|
|
|
|
|
|
|
Then restart services in a terminal for the changes to take effect:
|
|
|
|
|
|
|
|
docker-compose stop
|
|
|
|
docker-compose up -d
|
|
|
|
|
|
|
|
To check logs for errors:
|
|
|
|
|
|
|
|
docker-compose logs -f
|
2021-08-08 11:33:23 +02:00
|
|
|
|
|
|
|
If you see a "letsencrypt.json" file permission error:
|
|
|
|
|
|
|
|
chmod 600 /opt/photoprism/traefik/letsencrypt.json
|
|
|
|
docker-compose stop
|
|
|
|
docker-compose up -d
|
2021-08-08 12:29:00 +02:00
|
|
|
|
|
|
|
You should now be able to access your instance without security warnings:
|
|
|
|
|
|
|
|
https://photos.yourdomain.com/
|
|
|
|
|
|
|
|
Note the first request may still fail while Traefik gets and installs the
|
|
|
|
new certificate. Try again after 30 seconds.
|