Skip to content

Commit 591a656

Browse files
committed
Auth: Add PHOTOPRISM_AUTH_MODE config option #98 #782
Signed-off-by: Michael Mayer <michael@photoprism.app>
1 parent 27d09db commit 591a656

26 files changed

+173
-130
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ install:
9494
[ ! -f "$(GOBIN)/exif-read-tool" ] || cp $(GOBIN)/exif-read-tool $(DESTDIR)/bin/exif-read-tool
9595
rsync -r -l --safe-links --exclude-from=assets/.buildignore --chmod=a+r,u+rw ./assets/ $(DESTDIR)/assets
9696
wget -O $(DESTDIR)/assets/static/img/wallpaper/welcome.jpg https://cdn.photoprism.app/wallpaper/welcome.jpg
97+
wget -O $(DESTDIR)/assets/static/img/preview.jpg https://cdn.photoprism.app/img/preview.jpg
9798
cp scripts/dist/heif-convert.sh $(DESTDIR)/bin/heif-convert
9899
cp internal/config/testdata/*.yml $(DESTDIR)/config/examples
99100
chown -R $(INSTALL_USER) $(DESTDIR)

assets/static/img/preview.jpg

-202 KB
Loading

docker-compose.ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ services:
2222
PHOTOPRISM_SITE_AUTHOR: "@photoprism_app"
2323
PHOTOPRISM_DEBUG: "false"
2424
PHOTOPRISM_READONLY: "false"
25-
PHOTOPRISM_PUBLIC: "true"
25+
PHOTOPRISM_AUTH_MODE: "public" # authentication mode (public, password)
2626
PHOTOPRISM_PID_FILENAME: "photoprism.pid"
2727
PHOTOPRISM_LOG_FILENAME: "photoprism.log"
2828
PHOTOPRISM_DETACH_SERVER: "true"

docker-compose.latest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ services:
2121
environment:
2222
PHOTOPRISM_UID: ${UID:-1000} # user id, should match your host user id
2323
PHOTOPRISM_GID: ${GID:-1000} # group id
24+
PHOTOPRISM_AUTH_MODE: "password" # authentication mode (public, password)
2425
PHOTOPRISM_ADMIN_PASSWORD: "photoprism" # initial "admin" password (minimum 8 characters)
2526
## Public server URL incl http:// or https:// and /path, :port is optional
2627
PHOTOPRISM_SITE_URL: "https://latest.localssl.dev/"
@@ -29,7 +30,6 @@ services:
2930
PHOTOPRISM_SITE_AUTHOR: "@photoprism_app"
3031
PHOTOPRISM_DEBUG: "true"
3132
PHOTOPRISM_READONLY: "false"
32-
PHOTOPRISM_PUBLIC: "true"
3333
PHOTOPRISM_EXPERIMENTAL: "false"
3434
PHOTOPRISM_SERVER_MODE: "debug"
3535
PHOTOPRISM_HTTP_HOST: "0.0.0.0"

docker-compose.local.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ services:
2121
environment:
2222
PHOTOPRISM_UID: ${UID:-1000} # user id, should match your host user id
2323
PHOTOPRISM_GID: ${GID:-1000} # group id
24+
PHOTOPRISM_AUTH_MODE: "password" # authentication mode (public, password)
2425
PHOTOPRISM_ADMIN_PASSWORD: "photoprism" # initial "admin" password (minimum 8 characters)
2526
## Public server URL incl http:// or https:// and /path, :port is optional
2627
PHOTOPRISM_SITE_URL: "https://latest.localssl.dev/"
@@ -29,7 +30,6 @@ services:
2930
PHOTOPRISM_SITE_AUTHOR: "@photoprism_app"
3031
PHOTOPRISM_DEBUG: "true"
3132
PHOTOPRISM_READONLY: "false"
32-
PHOTOPRISM_PUBLIC: "true"
3333
PHOTOPRISM_EXPERIMENTAL: "false"
3434
PHOTOPRISM_SERVER_MODE: "debug"
3535
PHOTOPRISM_HTTP_HOST: "0.0.0.0"

docker-compose.postgres.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@ services:
2525
- "go-mod:/go/pkg/mod"
2626
shm_size: "2gb"
2727
environment:
28+
PHOTOPRISM_AUTH_MODE: "password" # authentication mode (public, password)
29+
PHOTOPRISM_ADMIN_PASSWORD: "photoprism" # initial "admin" password (minimum 8 characters)
2830
PHOTOPRISM_SITE_URL: "http://localhost:2342/"
2931
PHOTOPRISM_SITE_CAPTION: "AI-Powered Photos App"
3032
PHOTOPRISM_SITE_DESCRIPTION: "Open-Source Photo Management"
3133
PHOTOPRISM_SITE_AUTHOR: "@photoprism_app"
3234
PHOTOPRISM_DEBUG: "true"
3335
PHOTOPRISM_READONLY: "false"
34-
PHOTOPRISM_PUBLIC: "true"
3536
PHOTOPRISM_EXPERIMENTAL: "true"
3637
PHOTOPRISM_SERVER_MODE: "debug"
3738
PHOTOPRISM_HTTP_HOST: "0.0.0.0"
@@ -43,7 +44,6 @@ services:
4344
PHOTOPRISM_DATABASE_USER: "photoprism"
4445
PHOTOPRISM_DATABASE_PASSWORD: "photoprism"
4546
PHOTOPRISM_TEST_DRIVER: "sqlite"
46-
PHOTOPRISM_ADMIN_PASSWORD: "photoprism" # initial "admin" password (minimum 8 characters)
4747
PHOTOPRISM_ASSETS_PATH: "/go/src/github.com/photoprism/photoprism/assets"
4848
PHOTOPRISM_STORAGE_PATH: "/go/src/github.com/photoprism/photoprism/storage"
4949
PHOTOPRISM_ORIGINALS_PATH: "/go/src/github.com/photoprism/photoprism/storage/originals"

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ services:
3434
## Switch to a non-root user after initialization (supported IDs are 33, 50-99, 500-600, and 900-1200):
3535
PHOTOPRISM_UID: ${UID:-1000} # user id, should match your host user id
3636
PHOTOPRISM_GID: ${GID:-1000} # group id
37+
PHOTOPRISM_AUTH_MODE: "password" # authentication mode (public, password)
3738
PHOTOPRISM_ADMIN_PASSWORD: "photoprism" # initial "admin" password (minimum 8 characters)
3839
## External development server URL incl http:// or https:// and /path, :port is optional
3940
PHOTOPRISM_SITE_URL: "https://app.localssl.dev/"
@@ -42,7 +43,6 @@ services:
4243
PHOTOPRISM_SITE_AUTHOR: "@photoprism_app"
4344
PHOTOPRISM_DEBUG: "true"
4445
PHOTOPRISM_READONLY: "false"
45-
PHOTOPRISM_PUBLIC: "true"
4646
PHOTOPRISM_EXPERIMENTAL: "true"
4747
PHOTOPRISM_SERVER_MODE: "debug"
4848
PHOTOPRISM_HTTP_HOST: "0.0.0.0"

docker/examples/arm64/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ services:
6060
ports:
6161
- "2342:2342" # HTTP port (host:container)
6262
environment:
63+
PHOTOPRISM_AUTH_MODE: "password" # authentication mode (public, password)
6364
PHOTOPRISM_ADMIN_PASSWORD: "insecure" # YOUR INITIAL ADMIN PASSWORD (MINIMUM 8 CHARACTERS, USERNAME "admin")
6465
PHOTOPRISM_SITE_URL: "http://localhost:2342/" # public server URL incl http:// or https:// and /path, :port is optional
6566
PHOTOPRISM_ORIGINALS_LIMIT: 5000 # file size limit for originals in MB (increase for high-res video)
6667
PHOTOPRISM_HTTP_COMPRESSION: "none" # improves transfer speed and bandwidth utilization (none or gzip)
6768
PHOTOPRISM_WORKERS: 2 # limits the number of indexing workers to reduce system load
6869
PHOTOPRISM_LOG_LEVEL: "info" # log level: trace, debug, info, warning, error, fatal, or panic
69-
PHOTOPRISM_PUBLIC: "false" # no authentication required (disables password protection)
7070
PHOTOPRISM_READONLY: "false" # do not modify originals directory (reduced functionality)
7171
PHOTOPRISM_EXPERIMENTAL: "false" # enables experimental features
7272
PHOTOPRISM_DISABLE_CHOWN: "false" # disables storage permission updates on startup

docker/examples/armv7/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ services:
5555
ports:
5656
- "2342:2342" # HTTP port (host:container)
5757
environment:
58+
PHOTOPRISM_AUTH_MODE: "password" # authentication mode (public, password)
5859
PHOTOPRISM_ADMIN_PASSWORD: "insecure" # YOUR INITIAL ADMIN PASSWORD (MINIMUM 8 CHARACTERS, USERNAME "admin")
5960
PHOTOPRISM_SITE_URL: "http://localhost:2342/" # public server URL incl http:// or https:// and /path, :port is optional
6061
PHOTOPRISM_ORIGINALS_LIMIT: 5000 # file size limit for originals in MB (increase for high-res video)
6162
PHOTOPRISM_HTTP_COMPRESSION: "none" # improves transfer speed and bandwidth utilization (none or gzip)
6263
PHOTOPRISM_WORKERS: 1 # Limits the number of indexing workers to reduce system load
6364
PHOTOPRISM_LOG_LEVEL: "info" # log level: trace, debug, info, warning, error, fatal, or panic
64-
PHOTOPRISM_PUBLIC: "false" # no authentication required (disables password protection)
6565
PHOTOPRISM_READONLY: "false" # do not modify originals directory (reduced functionality)
6666
PHOTOPRISM_EXPERIMENTAL: "false" # enables experimental features
6767
PHOTOPRISM_DISABLE_CHOWN: "false" # disables storage permission updates on startup

docker/examples/cloud/docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,13 @@ services:
130130
## !! CHANGE site url if your server has a public domain name e.g. "https://photos.yourdomain.com/" !!
131131
PHOTOPRISM_SITE_URL: "https://_public_ip_/"
132132
PHOTOPRISM_SITE_CAPTION: "AI-Powered Photos App"
133-
PHOTOPRISM_SITE_DESCRIPTION: "" # meta site description
134-
PHOTOPRISM_SITE_AUTHOR: "" # meta site author
133+
PHOTOPRISM_SITE_DESCRIPTION: "" # meta site description
134+
PHOTOPRISM_SITE_AUTHOR: "" # meta site author
135+
PHOTOPRISM_AUTH_MODE: "password" # authentication mode (public, password)
135136
PHOTOPRISM_ADMIN_PASSWORD: "_admin_password_" # YOUR INITIAL "admin" PASSWORD
136137
PHOTOPRISM_ORIGINALS_LIMIT: 5000 # file size limit for originals in MB (increase for high-res video)
137138
PHOTOPRISM_HTTP_COMPRESSION: "gzip" # improves transfer speed and bandwidth utilization (none or gzip)
138139
PHOTOPRISM_LOG_LEVEL: "info" # log level: trace, debug, info, warning, error, fatal, or panic
139-
PHOTOPRISM_PUBLIC: "false" # no authentication required (disables password protection)
140140
PHOTOPRISM_READONLY: "false" # do not modify originals directory (reduced functionality)
141141
PHOTOPRISM_EXPERIMENTAL: "false" # enables experimental features
142142
PHOTOPRISM_DISABLE_CHOWN: "false" # disables storage permission updates on startup

0 commit comments

Comments
 (0)