Environment Variables

The Photoview server can be configured through several environment variables. This page presents an index of them all along with a description.

Environment variables related to configuration of the database.

RequiredVariableDefaultNotes
PHOTOVIEW_DATABASE_DRIVERmysqlAvailable options mysql (default), postgres and sqlite.
Defines what database backend is used. One of the following MUST be set in addition to this variable.
PHOTOVIEW_MYSQL_URLRequired if the driver is mysql. The URL of the MySQL database to connect to. See formatting documentation.
PHOTOVIEW_POSTGRES_URLRequired if the driver is postgres. The connection string of the Postgres database to connect to. See formatting documentation.
PHOTOVIEW_SQLITE_PATHRequired if the driver is sqlite. Specifies the filepath for where the sqlite database should be saved. Example value: /app/database/photoview.db
RequiredVariableDefaultNotes
PHOTOVIEW_LISTEN_IP127.0.0.1The IP for the server to listen on. In most cases can be set to localhost.
PHOTOVIEW_LISTEN_PORT4001The port for the server to listen on
PHOTOVIEW_SERVE_UI0Set to 1 for the server to also serve the built static ui files.
PHOTOVIEW_UI_PATH./uiSpecify where the built UI files are located if PHOTOVIEW_SERVE_UI is enabled.
PHOTOVIEW_API_ENDPOINTUsed if PHOTOVIEW_SERVE_UI is disabled.
The url from where the API can be accessed publicly.
PHOTOVIEW_UI_ENDPOINTUsed if PHOTOVIEW_SERVE_UI is disabled.
The url from where the UI can be accessed publicly.

General

RequiredVariableDefaultNotes
PHOTOVIEW_MEDIA_CACHE./photo_cacheFilepath for where to store generated media such as thumbnails and optimized videos.
MAPBOX_TOKENTo enable map related features, you need to create a mapbox token. A token can be generated for free at https://account.mapbox.com/access-tokens/ It's a good idea to limit the scope of the token to your own domain, to prevent others from using it.
PHOTOVIEW_DISABLE_FACE_RECOGNITION0Completely disable face recognition and hide the icon from the side menu.
PHOTOVIEW_DISABLE_VIDEO_ENCODING0Disable ffmpeg encoding, but still show web compatiable videos that doesn't need encoding.
PHOTOVIEW_DISABLE_RAW_PROCESSING0disable processing of RAW photos using darktable-cli.