Hi
I have been using PP with docker-compose on Debian Testing for couple monbths without any issues. Today I did a docker pull photoprism/photoprism:latest then docker-compose stop && docker-compose up -d
Now I am getting invalid credentials :(
services:
photoprism:
image: photoprism/photoprism:latest
restart: unless-stopped
ports:
- 2342:2342
healthcheck: # Optional
test: "photoprism status"
interval: 60s
timeout: 15s
retries: 5
environment: # Run "photoprism help" and "photoprism config" too see all config options and current values
PHOTOPRISM_DEBUG: "false" # Run in debug mode (shows additional log messages)
PHOTOPRISM_PUBLIC: "false" # No authentication required (disables password protection)
PHOTOPRISM_READONLY: "false" # Don't modify originals directory (reduced functionality)
PHOTOPRISM_UPLOAD_NSFW: "true" # Allow uploads that MAY be offensive
PHOTOPRISM_DETECT_NSFW: "false" # Flag photos as private that MAY be offensive
PHOTOPRISM_EXPERIMENTAL: "true" # Enable experimental features
PHOTOPRISM_SITE_URL: "http://localhost:2342/" # Canonical / public site URL
PHOTOPRISM_SITE_TITLE: "PhotoPrism"
PHOTOPRISM_SITE_CAPTION: "Browse Your Life"
PHOTOPRISM_SITE_DESCRIPTION: ""
PHOTOPRISM_SITE_AUTHOR: ""
PHOTOPRISM_HTTP_HOST: "0.0.0.0"
PHOTOPRISM_HTTP_PORT: 2342
PHOTOPRISM_SETTINGS_HIDDEN: "false" # Users can not view or change settings
PHOTOPRISM_ADMIN_PASSWORD: "photoprism" # Initial admin password (can be changed in settings)
# PHOTOPRISM_DATABASE_DRIVER: "sqlite" # Change to "mysql" for external MySQL or MariaDB
PHOTOPRISM_DATABASE_DRIVER: "mysql" # Using MariaDB or MySQL instead of SQLite is optional
PHOTOPRISM_DATABASE_DSN: "photoprism:photoprism@tcp(photoprism-db:3306)/photoprism?charset=utf8mb4,utf8&parseTime=true"
# PHOTOPRISM_SIDECAR_JSON: "true" # Read metadata from JSON sidecar files created by exiftool
# PHOTOPRISM_SIDECAR_YAML: "true" # Backup photo metadata to YAML sidecar files
PHOTOPRISM_THUMB_FILTER: "lanczos" # Resample filter, best to worst: blackman, lanczos, cubic, linear
PHOTOPRISM_THUMB_UNCACHED: "false" # Enable on-demand thumbnail rendering (high memory and cpu usage)
PHOTOPRISM_THUMB_SIZE: 2048 # Pre-rendered thumbnail size limit (default 2048, min 720, max 7680)
# PHOTOPRISM_THUMB_SIZE: 4096 # Retina 4K, DCI 4K (requires more storage); 7680 for 8K Ultra HD
PHOTOPRISM_THUMB_SIZE_UNCACHED: 7680 # On-demand rendering size limit (default 7680, min 720, max 7680)
PHOTOPRISM_JPEG_SIZE: 7680 # Size limit for converted image files in pixels (720-30000)
PHOTOPRISM_JPEG_QUALITY: 90 # Set to 95 for high-quality thumbnails (requires more storage)
PHOTOPRISM_DARKTABLE_PRESETS: "false" # Use darktable presets (disables concurrent raw to jpeg conversion)
PHOTOPRISM_STORAGE_PATH: "/photoprism/storage" # Storage PATH for generated files like cache and index
volumes:
- "/media/PHOTOS:/photoprism/originals" # [local path]:[container path]
- "~/Pictures/Import:/photoprism/import" # [local path]:[container path] (optional)
- "/media/photoprism:/photoprism/storage" # Keep cache, settings and database
photoprism-db: # Uncomment, if you want to use MariaDB instead of SQLite
image: mariadb:10.5 # Alternatively mysql:8.0
restart: unless-stopped
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=1024 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=50
volumes:
- "/media/photoprism/mysql:/var/lib/mysql"
environment:
MYSQL_ROOT_PASSWORD: photoprism
MYSQL_USER: photoprism
MYSQL_PASSWORD: photoprism
MYSQL_DATABASE: photoprism
volumes: # keep this
photoprism-storage:
driver: local
photoprism-database:
driver: local
Attaching to photoprism_photoprism_1, photoprism_photoprism-db_1
photoprism_1 | time="2020-10-07T19:41:54Z" level=info msg="webdav: /originals/ waiting for connection"
photoprism_1 | time="2020-10-07T19:41:54Z" level=info msg="webdav: /import/ waiting for connection"
photoprism_1 | time="2020-10-07T19:41:54Z" level=info msg="starting web server at 0.0.0.0:2342"
photoprism-db_1 | 2020-10-07 19:40:15+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.4+maria~focal started.
photoprism-db_1 | 2020-10-07 19:40:19+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
photoprism-db_1 | 2020-10-07 19:40:20+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.4+maria~focal started.
photoprism-db_1 | 2020-10-07 19:40:20 0 [Note] mysqld (mysqld 10.5.4-MariaDB-1:10.5.4+maria~focal) starting as process 1 ...
photoprism-db_1 | 2020-10-07 19:40:20 0 [Note] InnoDB: Using Linux native AIO
photoprism-db_1 | 2020-10-07 19:40:20 0 [Note] InnoDB: Uses event mutexes
photoprism-db_1 | 2020-10-07 19:40:20 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
photoprism-db_1 | 2020-10-07 19:40:20 0 [Note] InnoDB: Number of pools: 1
photoprism-db_1 | 2020-10-07 19:40:20 0 [Note] InnoDB: Using SSE4.2 crc32 instructions
photoprism-db_1 | 2020-10-07 19:40:20 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
photoprism-db_1 | 2020-10-07 19:40:20 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
photoprism-db_1 | 2020-10-07 19:40:20 0 [Note] InnoDB: Completed initialization of buffer pool
photoprism-db_1 | 2020-10-07 19:40:20 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
photoprism-db_1 | 2020-10-07 19:40:29 0 [Note] InnoDB: 128 rollback segments are active.
photoprism-db_1 | 2020-10-07 19:40:29 0 [Note] InnoDB: Creating shared tablespace for temporary tables
photoprism-db_1 | 2020-10-07 19:40:29 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
photoprism-db_1 | 2020-10-07 19:40:29 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
photoprism-db_1 | 2020-10-07 19:40:29 0 [Note] InnoDB: 10.5.4 started; log sequence number 725235509; transaction id 4224144
photoprism-db_1 | 2020-10-07 19:40:29 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
photoprism-db_1 | 2020-10-07 19:40:29 0 [Note] Plugin 'FEEDBACK' is disabled.
photoprism-db_1 | 2020-10-07 19:40:30 0 [Note] Server socket created on IP: '::'.
photoprism-db_1 | 2020-10-07 19:40:31 0 [Warning] 'proxies_priv' entry '@% root@a69ca1981845' ignored in --skip-name-resolve mode.
photoprism-db_1 | 2020-10-07 19:40:33 0 [Note] Reading of all Master_info entries succeeded
photoprism-db_1 | 2020-10-07 19:40:33 0 [Note] Added new Master_info '' to hash table
photoprism-db_1 | 2020-10-07 19:40:33 0 [Note] mysqld: ready for connections.
photoprism-db_1 | Version: '10.5.4-MariaDB-1:10.5.4+maria~focal' socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
photoprism-db_1 | 2020-10-07 19:41:51 0 [Note] InnoDB: Buffer pool(s) load completed at 201007 19:41:51
Your password properly got reset to "photoprism" since this version upgrade applied changes to the users table which caused a reset to the password.
So it uses the default set in PHOTOPRISM_ADMIN_PASSWORD: "photoprism"
You should change your password in there ASAP if this instance is accessible via the web!
see: https://twitter.com/browseyourlife/status/1313171181932085255
It's not a good idea to keep the default password in there, because when the server is unable to connect to the database, it will still use the default password.
You are right, it defaulted to photoprism. THanks for the info and guidance.
So I guess I can just remove those admin pass stuff from the docker-compose file now ?
@gerroon You could remove it but I advice you to not do so and instead setup a proper password in there. Because like i said, whenever there is an error, or change to the user table, it could default to the value set in the environment variable.
If you simply delete the line, it still would use the default password.
So keep it set to something proper.
Thanks for the info and the quick help.
@lastzero this starts to become an issue. So whatever might be the solution in the end, it might be a good idea to display a message on the login screen in the meantime (when the password is set to "photoprism"), just so users have a clue.