indrekhaav / photoprism-debian Goto Github PK
View Code? Open in Web Editor NEWInstall PhotoPrism on Debian
License: MIT License
Install PhotoPrism on Debian
License: MIT License
Hello,
I have followed all the intructions in the tutorial. Except I have installed a newer Golang version (1.19.5).
Photoprism starts normally but I'm not able to access the Webinterface.
If I try to access the IP 192.168.30.3:2342 I get redirected to http://192.168.30.3:2342/library/login and get a "HTTP ERROR 500
This page cannot process your request right now".
I also get some weird initrd.img errors in the photoprism logs. I have attached it.
photoprism.log
This is my .env:
PHOTOPRISM_AUTH_MODE="password"
PHOTOPRISM_ADMIN_PASSWORD="photoprism"
PHOTOPRISM_HTTP_HOST='0.0.0.0'
PHOTOPRISM_HTTP_PORT='2342'
PHOTOPRISM_DEBUG="true"
# PhotoPrism storage directories
PHOTOPRISM_STORAGE_PATH="/var/lib/photoprism"
PHOTOPRISM_ORIGINALS_PATH="/var/lib/photoprism/Originals"
PHOTOPRISM_IMPORT_PATH="/var/lib/photoprism/photos/Import"
# Uncomment below if using MariaDB/MySQL instead of SQLite (the default)
# PHOTOPRISM_DATABASE_DRIVER="mysql"
# PHOTOPRISM_DATABASE_SERVER="MYSQL_IP_HERE"
# PHOTOPRISM_DATABASE_NAME="DB_NAME"
# PHOTOPRISM_DATABASE_USER="USER_NAME"
# PHOTOPRISM_DATABASE_PASSWORD="PASSWORD"
Photoprism uses Golang 1.19 at the moment, which is now available in bullseye-backports, so installing from google's binaries is no longer necessary.
Hi,
I am trying to install Photoprism on RP4, but still receive this error…
Thanks for your help.
pi@rpi-server:~/photoprism $ sudo ./scripts/build.sh prod /opt/photoprism/bin/photoprism ./scripts/build.sh: line 18: /usr/local/bin/go: cannot execute binary file: Exec format error
pi@rpi-server:~/photoprism $ lscpu
Architecture: aarch64
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
Vendor ID: ARM
Model: 3
Model name: Cortex-A72
Stepping: r0p3
CPU max MHz: 1800.0000
CPU min MHz: 600.0000
BogoMIPS: 108.00
L1d cache: 128 KiB
L1i cache: 192 KiB
L2 cache: 1 MiB
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Retbleed: Not affected
Vulnerability Spec store bypass: Vulnerable
Vulnerability Spectre v1: Mitigation; __user pointer sanitization
Vulnerability Spectre v2: Vulnerable
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Flags: fp asimd evtstrm crc32 cpuid
Missing support for HTTPS/SSL
Thank you for this guide. I have followed all of your steps and am stuck at starting the service. Trying to complete step:
sudo systemctl enable --now photoprism
Results in:
root@stphoto:/# systemctl enable --now photoprism Job for photoprism.service failed because a fatal signal was delivered to the co ntrol process. See "systemctl status photoprism.service" and "journalctl -xeu photoprism.servic e" for details.
`root@stphoto:/# systemctl status photoprism.service
× photoprism.service - PhotoPrism service
Loaded: loaded (/etc/systemd/system/photoprism.service; enabled; preset: enabled)
Active: failed (Result: signal) since Sat 2023-09-30 09:31:25 EDT; 1min 29s ago
Process: 936 ExecStart=/opt/photoprism/bin/photoprism up -d (code=killed, signal=ILL)
CPU: 18ms
Sep 30 09:31:25 stphoto systemd[1]: Starting photoprism.service - PhotoPrism service...
Sep 30 09:31:25 stphoto systemd[1]: photoprism.service: Control process exited, code=killed, status=4/ILL
Sep 30 09:31:25 stphoto systemd[1]: photoprism.service: Failed with result 'signal'.
Sep 30 09:31:25 stphoto systemd[1]: Failed to start photoprism.service - PhotoPrism service.
Sep 30 09:28:06 stphoto systemd[1]: Starting photoprism.service - PhotoPrism service...
░░ Subject: A start job for unit photoprism.service has begun execution
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit photoprism.service has begun execution.
░░
░░ The job identifier is 275.
Sep 30 09:28:06 stphoto systemd[1]: photoprism.service: Control process exited, code=killed, status=4/ILL
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ An ExecStart= process belonging to unit photoprism.service has exited.
░░
░░ The process' exit code is 'killed' and its exit status is 4.
Sep 30 09:28:06 stphoto systemd[1]: photoprism.service: Failed with result 'signal'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The unit photoprism.service has entered the 'failed' state with result 'signal'.
Sep 30 09:28:06 stphoto systemd[1]: Failed to start photoprism.service - PhotoPrism service.
░░ Subject: A start job for unit photoprism.service has failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit photoprism.service has finished with a failure.
░░
░░ The job identifier is 275 and the job result is failed.
`
We now also provide tar.gz
installation packages with binaries for Linux that you can use as an alternative to Docker (they are based on the same code and build scripts, just supplied as an archive instead of a Docker image):
If you use these, you should be able to skip all the build steps and just need to make sure that the file/folder permissions are correct and the dependencies (that you want to use) are installed.
The only requirement should be using a Linux distribution with glibc >= 2.35
, so for example Ubuntu 22.04 (or later) and Debian Bookworm will work with these binaries, but older Linux distributions may not be compatible.
If you find any other issues, please let us know!
Hello, everybody I tried to build this project from CentOS Stream8 and Debian11, but I received the same error on both systems, and I couldn't solve it. Can you provide some help?
This is my information:
Virtualized environment :LXC 4.0.11
System:centos8stream & debian bullseye
Cpu:intel corei5 8500
Memory:4096M
Golang Version:1.17.7
Nodejs Version:centos:16.8.0, debian:16.14.2
TensorFlow Version:libtensorflow-linux-avx2-1.15.2
When I execute make all, I will receive an error prompt after a period of time.
make: *** [Makefile:148:dep-js] error 1
Photoprism Makefile has been refactored: photoprism/photoprism@4247066
The instructions will need to be updated accordingly, once those changes hit the release branch.
Hi
I have tried loads following this guide on ubuntu server, even using mariadb instead of sqlite3
No matter how many times i have started from a clean install, unfortuanely i can not get it to work.
Everything seems to install fine, but whenever i try to access the site i just get an error 500 :(
would you know if there is anything I can do to get it working without docker on ubuntu ?
Regards
Mike
First up, thanks for this guide, it works perfectly. I spent a bit of time trying to figure out how to have my new images indexed automatically since I'm not using webdav, I found a solution so I thought I'd share. Just running photoprism index doesn't work since it's missing the env vars from the .env file, so I made a oneshot systemd service which uses the same format as the existing service, but runs photoprism index using the env vars instead of starting/stopping the service. Maybe this is stupidly obvious, maybe it'll be useful to someone else, I dunno:
[Unit]
Description=PhotoPrism index service
After=network.target
[Service]
Type=oneshot
User=photoprism
Group=photoprism
WorkingDirectory=/opt/photoprism
EnvironmentFile=/var/lib/photoprism/.env
ExecStart=/opt/photoprism/bin/photoprism index
[Install]
WantedBy=multi-user.target
Section cut and pasted from https://web.archive.org/web/20200812001802/https://docs.photoprism.org/developer-guide/setup-fedora/
Development Environment (Fedora 32)¶
Before you start, make sure you have Git and Development Tools installed on your system (git, gcc, g++, llvm, cmake, etc...).
Instead of using Docker, you can create your own development environment. You'll need:
Go >= 1.11
TensorFlow for C
Make
NPM
MySQL (if you don't want to leverage sqlite)
Without Docker, you won't be able to use our other Dockerfiles (e.g. for TensorFlow).
Step 1: Run Git to clone the project's:
git clone [email protected]:tensorflow/tensorflow.git
git clone [email protected]:photoprism/photoprism.git
Step 2: Install required packages:
sudo dnf install golang darktable intltool nodejs npm
Note: This setup is for development and testing purposes only.
Step 3: Download Bazel wrapper to build tensorflow:
Consult the TensorFlow Docs for configuration options.
go get github.com/bazelbuild/bazelisk
alias bazel='bazelisk'
cd tensorflow
bazel build --config=v1 //tensorflow/tools/lib_package:libtensorflow
sudo tar -C /usr/local/ -xvf $HOME/.cache/bazel/bazel$USER/<SOME_HASH>/execroot/org_tensorflow/bazel-out/k8-opt/bin/tensorflow/tools/lib_package/libtensorflow.tar.gz
Note: Your SOME_HASH value will depend on your build, go find it!
Step 4: Build PhotoPrism:
cd photoprism
make
Step 5: Enjoy an amazing application ;-)
Depending on your system's configuration, you might need to update your ldconfig
Add a configuration file which persists reboots
sudo echo '/usr/local/lib/' >> /etc/ld.so.conf.d/usrlocallib.conf
sudo ldconfig
Update your shell's environment which will not persist upon reboot
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
sudo ldconfig
Hi i cannot start photoprism service because i got this error:
root@kd35-vps001:/var/lib/photoprism# sudo systemctl start photoprism
Job for photoprism.service failed because a fatal signal was delivered to the control process.
See "systemctl status photoprism.service" and "journalctl -xe" for details.
root@kd35-vps001:/var/lib/photoprism# systemctl status photoprism.service
● photoprism.service - PhotoPrism service
Loaded: loaded (/etc/systemd/system/photoprism.service; enabled; vendor preset: enabled)
Active: failed (Result: signal) since Fri 2023-06-09 16:09:48 CEST; 58s ago
Process: 348637 ExecStart=/opt/photoprism/bin/photoprism up -d (code=killed, signal=ILL)
CPU: 29ms
I've used the given information to install a Photoprism instance in a Proxmox LXC container.
In the photoprism-log i see the following error:
2023-04-10 12:52:52 ERRO index: open /opt/photoprism/assets/nasnet/labels.txt: permission denied
This is probably the reason for that i don´t see any categories appear (except "Portrait" and "People"). Although Photoprism is still indexing my photo collection.
If i list the directory, i see that root:root is the owner of these files:
root@photoprism-debian:/etc/systemd/system# ls -lai /opt/photoprism/assets/nasnet/
total 16748
279394 drwxr-xr-x 3 root root 4096 Apr 9 18:42 .
176478 drwxr-xr-x 10 root root 4096 Apr 9 18:42 ..
279395 -rw-r----- 1 root root 11067 Jun 6 2019 labels.txt
279399 -rw-r--r-- 1 root root 17118057 Apr 30 2019 saved_model.pb
279396 drwxr-xr-x 2 root root 4096 Apr 30 2019 variables
279400 -rw-r--r-- 1 root root 92 Apr 9 18:42 version.txt
To resolve this error:
chown photoprism:photoprism /opt/photoprism/assets/nasnet/*
And restarted the service: systemctl restart photoprism
Thank you for your efforts. followed your instrutions I successfully installed photoprism on ubuntu 22.04.
But how can I install darktable or rawtherapee suite to process camera raw file?
First: Thanks for this great guide. I'm new to Linux and PhotoPrism but was able to understand and proceed the steps that you described. Good work :-)
Unluckily I'm not able to login to the PhotoPrism interface yet.
Using $ systemctl status photoprism
for analyzes, I get the following information:
systemd[1]: Starting photoprism.service - PhotoPrism Service...
photoprism[738]: level=error msg=dial tcp 192.168.178.38:3306: connection refused"
photoprism[1284]: level=error msg=dial tcp 192.168.178.38:3306: connection refused"
systemd[1]: photoprism.service: Deactivated successfully.
systemd[1]: Started photoprism.service - PhotoPrism Service.
systemd[1]: photoprism.service: Consumed 7.282s CPU time.
I assume that the server settings for the MariaDB in the .env-file are not correct.
The IP of my PC is: 192.168.178.38
Do you have any advice what I need to change to make it work?
My settings in /var/lib/photoprism/.env
are:
# Database - MariaDB
PHOTOPRISM_DATABASE_DRIVER="mysql"
PHOTOPRISM_DATABASE_SERVER="192.168.178.38:3306"
PHOTOPRISM_DATABASE_NAME="photoprism"
PHOTOPRISM_DATABASE_USER="photoprism"
PHOTOPRISM_DATABASE_PASSWORD="a_secure_password"
# Connection
PHOTOPRISM_HTTP_HOST="192.168.178.38"
PHOTOPRISM_HTTP_PORT="2342"
# Initial password
PHOTOPRISM_AUTH_MODE="password"
PHOTOPRISM_ADMIN_USER="photoprism"
PHOTOPRISM_ADMIN_PASSWORD="a_secure_password"
# Storage directories
PHOTOPRISM_STORAGE_PATH="/var/lib/photoprism"
PHOTOPRISM_ORIGINALS_PATH="/var/lib/photoprism/Originale"
PHOTOPRISM_IMPORT_PATH="/var/lib/photoprism/Importe"
Or is there maybe anything else which needs to be done to make Photoprism run?
Your advice is highly appreciated.
Any idea what steps need to be done to support Hardware Acceleration?
I suppose:
Hey there :) I just wanted to upgrade my photoprism instance to release 231011-63f708417 but I get following error when running "sudo make upgrade".
(I update golang to the latest 21.1.3 as stated in the latest photoprism release.)
Also sudo make all fails as well afterwards. May you know how to fix that?
photoprism@photoprism:~/photoprism$ sudo make upgrade
(cd frontend && npm --depth 3 update --legacy-peer-deps)
npm WARN update The --depth option no longer has any effect. See RFC0019.
npm WARN update https://github.com/npm/rfcs/blob/latest/implemented/0019-remove-update-depth-option.md
up to date, audited 1281 packages in 6s
262 packages are looking for funding
run `npm fund` for details
6 vulnerabilities (3 moderate, 1 high, 2 critical)
To address all issues possible (including breaking changes), run:
npm audit fix --force
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
go get -u -t ./...
go: github.com/photoprism/photoprism/internal/classify imports
github.com/tensorflow/tensorflow/tensorflow/go imports
github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto: cannot find module providing package github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto
go: warning: github.com/mattn/[email protected]+incompatible: retracted by module author: Accidental; no major changes or features.
go: to switch to the latest unretracted version, run:
go get github.com/mattn/go-sqlite3@latest
make: *** [Makefile:192: dep-upgrade] Fehler 1
photoprism@photoprism:~/photoprism$ sudo make all
scripts/download-facenet.sh
Installing Facenet model for TensorFlow...
Downloading latest model from https://dl.photoprism.app/tensorflow/facenet.zip?20231013...
--2023-10-13 21:09:49-- https://dl.photoprism.app/tensorflow/facenet.zip?20231013
Auflösen des Hostnamens dl.photoprism.app (dl.photoprism.app)… 5.9.32.79
Verbindungsaufbau zu dl.photoprism.app (dl.photoprism.app)|5.9.32.79|:443 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: 87449984 (83M) [application/zip]
Wird in »/tmp/photoprism/facenet.zip« gespeichert.
/tmp/photoprism/facenet.zip 100%[===================================================================================================================>] 83,40M 28,3MB/s in 3,0s
2023-10-13 21:09:52 (28,3 MB/s) - »/tmp/photoprism/facenet.zip« gespeichert [87449984/87449984]
0492eb1d67789108b7eefb274e26633504b059be /tmp/photoprism/facenet.zip
Creating backup of existing directory: storage/backup/facenet-20231013
Archive: /tmp/photoprism/facenet.zip
creating: assets/facenet/
inflating: assets/facenet/saved_model.pb
Latest Facenet installed.
scripts/download-nasnet.sh
Installing NASNet Mobile model for TensorFlow...
Downloading latest model from https://dl.photoprism.app/tensorflow/nasnet.zip?20231013...
--2023-10-13 21:09:53-- https://dl.photoprism.app/tensorflow/nasnet.zip?20231013
Auflösen des Hostnamens dl.photoprism.app (dl.photoprism.app)… 5.9.32.79
Verbindungsaufbau zu dl.photoprism.app (dl.photoprism.app)|5.9.32.79|:443 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: 20682520 (20M) [application/zip]
Wird in »/tmp/photoprism/nasnet.zip« gespeichert.
/tmp/photoprism/nasnet.zip 100%[===================================================================================================================>] 19,72M 26,6MB/s in 0,7s
2023-10-13 21:09:54 (26,6 MB/s) - »/tmp/photoprism/nasnet.zip« gespeichert [20682520/20682520]
f18b801354e95cade497b4f12e8d2537d04c04f6 /tmp/photoprism/nasnet.zip
Creating backup of existing directory: storage/backup/nasnet-20231013
Archive: /tmp/photoprism/nasnet.zip
creating: assets/nasnet/
inflating: assets/nasnet/labels.txt
creating: assets/nasnet/variables/
inflating: assets/nasnet/variables/variables.data-00000-of-00001
inflating: assets/nasnet/variables/variables.index
inflating: assets/nasnet/saved_model.pb
Latest NASNet Mobile installed.
scripts/download-nsfw.sh
Installing NSFW model for TensorFlow...
Downloading latest model from https://dl.photoprism.app/tensorflow/nsfw.zip?20231013...
--2023-10-13 21:09:54-- https://dl.photoprism.app/tensorflow/nsfw.zip?20231013
Auflösen des Hostnamens dl.photoprism.app (dl.photoprism.app)… 5.9.32.79
Verbindungsaufbau zu dl.photoprism.app (dl.photoprism.app)|5.9.32.79|:443 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: 79188592 (76M) [application/zip]
Wird in »/tmp/photoprism/nsfw.zip« gespeichert.
/tmp/photoprism/nsfw.zip 100%[===================================================================================================================>] 75,52M 28,2MB/s in 2,7s
2023-10-13 21:09:57 (28,2 MB/s) - »/tmp/photoprism/nsfw.zip« gespeichert [79188592/79188592]
2e03ad3c6aec27c270c650d0574ff2a6291d992b /tmp/photoprism/nsfw.zip
Creating backup of existing directory: storage/backup/nsfw-20231013
Archive: /tmp/photoprism/nsfw.zip
creating: assets/nsfw/
extracting: assets/nsfw/labels.txt
creating: assets/nsfw/variables/
inflating: assets/nsfw/variables/variables.data-00000-of-00001
inflating: assets/nsfw/variables/variables.index
inflating: assets/nsfw/saved_model.pb
Latest NSFW installed.
(cd frontend && npm ci --no-update-notifier --no-audit)
npm ERR! code EUSAGE
npm ERR!
npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
npm ERR!
npm ERR! Invalid: lock file's [email protected] does not satisfy [email protected]
npm ERR! Invalid: lock file's [email protected] does not satisfy [email protected]
npm ERR! Missing: [email protected] from lock file
npm ERR! Invalid: lock file's [email protected] does not satisfy [email protected]
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR!
npm ERR! Clean install a project
npm ERR!
npm ERR! Usage:
npm ERR! npm ci
npm ERR!
npm ERR! Options:
npm ERR! [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling]
npm ERR! [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
npm ERR! [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit]
npm ERR! [--no-bin-links] [--no-fund] [--dry-run]
npm ERR! [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
npm ERR! [-ws|--workspaces] [--include-workspace-root] [--install-links]
npm ERR!
npm ERR! aliases: clean-install, ic, install-clean, isntall-clean
npm ERR!
npm ERR! Run "npm help ci" for more info
npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-10-13T19_09_58_028Z-debug-0.log
make: *** [Makefile:188: dep-js] Fehler 1
photoprism@photoprism:~/photoprism$
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.