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 PostgreSQL database to connect to. See formatting documentation.
PHOTOVIEW_SQLITE_PATHRequired if the driver is sqlite. Specifies the filepath where the SQLite database should be saved to. 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 127.0.0.1.
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 where to store the generated media at, 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-compatible videos that don't need encoding.
PHOTOVIEW_DISABLE_RAW_PROCESSING0Disable processing of RAW photos.