From 130345e235c8ebd958bfae78049f4868b70c1b26 Mon Sep 17 00:00:00 2001 From: Indrek Haav Date: Thu, 28 Sep 2023 09:25:36 +0300 Subject: [PATCH] Move useradd step back to configuration section, move chown step there as well --- README.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 717440b..290ef2c 100644 --- a/README.md +++ b/README.md @@ -114,12 +114,6 @@ See for download URLs for other platforms ### Download and install PhotoPrism -Create a separate system account for running PhotoPrism: - -```shell -$ sudo useradd --system photoprism -``` - Create a directory where the compiled PhotoPrism code will be stored: ```shell @@ -140,7 +134,6 @@ Then run the following commands to download the various dependencies for Tensorf $ sudo make all $ sudo ./scripts/build.sh prod /opt/photoprism/bin/photoprism $ sudo cp -a assets/ /opt/photoprism/assets/ -$ sudo chown -R photoprism:photoprism /opt/photoprism ``` The dependencies step can produce errors when running in shells like ZSH. Ensure you're using Bash if this happens. @@ -155,11 +148,22 @@ If you're still having problems, consult [the PhotoPrism makefile](https://githu ### Configure PhotoPrism +Create a separate user account for running PhotoPrism: + +```shell +$ sudo useradd --system photoprism +``` + Create a directory where PhotoPrism will store files like metadata, thumbnails, database (if using SQLite) and so on: ```shell $ sudo mkdir /var/lib/photoprism -$ sudo chown photoprism:photoprism /var/lib/photoprism +``` + +Ensure all relevant directories are owned by the newly created user: + +```shell +$ sudo chown -R photoprism:photoprism /var/lib/photoprism /opt/photoprism ``` Go to the newly added directory and create a file for PhotoPrism configuration parameters: