Files
hedgedoc/.env.example
T
Erik Michelson 3324bf1b2f fix(config): adjust media config type to Zod schema
Our config error messages are generated from the nested
Zod schema for the config. This means, if the path for
the type of media backend to use is
  mediaBackend.type
then the env variable should be
  HD_MEDIA_BACKEND_TYPE

Previously, we used some custom env variable names
like
  HD_MEDIA_BACKEND

This however resulted in the message that the env
variable HD_MEDIA_BACKEND is not set even if it was,
or the other way around, because the generated error
messages were not fitting the actual variable name.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2025-12-21 10:56:57 +01:00

119 lines
4.4 KiB
Bash

# SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
#
# SPDX-License-Identifier: CC0-1.0
# This example just lists all available environment variables.
# Thid does not represent the default settings of HedgeDoc.
# Please refer to the documentation for details:
# https://docs.hedgedoc.org/configuration/
# General settings
HD_BASE_URL=http://localhost:8080
HD_RENDERER_BASE_URL=http://localhost:8080
HD_BACKEND_PORT=3000
HD_LOG_LEVEL=info
HD_LOG_SHOW_TIMESTAMP=true
# Auth general
HD_AUTH_ALLOW_PROFILE_EDITS=true
HD_AUTH_ALLOW_CHOOSE_USERNAME=true
HD_AUTH_SYNC_SOURCE=MYLDAP
HD_AUTH_SESSION_SECRET=change-me-in-production
HD_AUTH_SESSION_LIFETIME=864000
# Auth: Local account system
HD_AUTH_LOCAL_ENABLE_LOGIN=true
HD_AUTH_LOCAL_ENABLE_REGISTER=true
HD_AUTH_LOCAL_MINIMAL_PASSWORD_STRENGTH=8
# Auth: LDAP
HD_AUTH_LDAP_SERVERS=MYLDAP
HD_AUTH_LDAP_MYLDAP_URL=ldap://ldap.example.com:389
HD_AUTH_LDAP_MYLDAP_PROVIDER_NAME="My LDAP"
HD_AUTH_LDAP_MYLDAP_BIND_DN=cn=admin,dc=example,dc=com
HD_AUTH_LDAP_MYLDAP_BIND_CREDENTIALS=adminpassword
HD_AUTH_LDAP_MYLDAP_SEARCH_BASE=dc=example,dc=com
HD_AUTH_LDAP_MYLDAP_SEARCH_FILTER=(uid={{username}})
HD_AUTH_LDAP_MYLDAP_SEARCH_ATTRIBUTES=dn,cn,mail
HD_AUTH_LDAP_MYLDAP_USER_ID_FIELD=mail
HD_AUTH_LDAP_MYLDAP_DISPLAY_NAME_FIELD=cn
HD_AUTH_LDAP_MYLDAP_EMAIL_FIELD=mail
HD_AUTH_LDAP_MYLDAP_PROFILE_PICTURE_FIELD=picture
HD_AUTH_LDAP_MYLDAP_TLS_CERT_PATHS=/path/to/cert.pem
HD_AUTH_LDAP_MYLDAP_TLS_REJECT_UNAUTHORIZED=true
HD_AUTH_LDAP_MYLDAP_TLS_SNI_NAME=admin.example.com
HD_AUTH_LDAP_MYLDAP_TLS_ALLOW_PARTIAL_TRUST_CHAIN=false
HD_AUTH_LDAP_MYLDAP_TLS_MIN_VERSION=TLSv1.2
HD_AUTH_LDAP_MYLDAP_TLS_MAX_VERSION=TLSv1.3
# Auth: OIDC
HD_AUTH_OIDC_PROVIDERS=MYOIDC
HD_AUTH_OIDC_MYOIDC_ISSUER=https://oidc.example.com
HD_AUTH_OIDC_MYOIDC_PROVIDER_NAME="My OIDC Provider"
HD_AUTH_OIDC_MYOIDC_CLIENT_ID=hedgedoc
HD_AUTH_OIDC_MYOIDC_CLIENT_SECRET=very-secret
HD_AUTH_OIDC_MYOIDC_THEME=gitlab
HD_AUTH_OIDC_MYOIDC_AUTHORIZE_URL=https://oidc.example.com/auth
HD_AUTH_OIDC_MYOIDC_TOKEN_URL=https://oidc.example.com/token
HD_AUTH_OIDC_MYOIDC_USERINFO_URL=https://oidc.example.com/userinfo
HD_AUTH_OIDC_MYOIDC_END_SESSION_URL=https://oidc.example.com/logout
HD_AUTH_OIDC_MYOIDC_SCOPE="openid profile email"
HD_AUTH_OIDC_MYOIDC_USER_ID_FIELD=sub
HD_AUTH_OIDC_MYOIDC_USER_NAME_FIELD=preferred_username
HD_AUTH_OIDC_MYOIDC_DISPLAY_NAME_FIELD=name
HD_AUTH_OIDC_MYOIDC_EMAIL_FIELD=email
HD_AUTH_OIDC_MYOIDC_PROFILE_PICTURE_FIELD=picture
HD_AUTH_OIDC_MYOIDC_ENABLE_REGISTRATION=true
# Branding
HD_BRANDING_CUSTOM_NAME="ACME Corp Notes"
HD_BRANDING_CUSTOM_LOGO_URL=https://example.com/assets/custom-logo.png
# Special URLs
HD_URLS_PRIVACY=https://example.com/privacy
HD_URLS_TERMS_OF_USE=https://example.com/terms-of-use
HD_URLS_IMPRINT=https://example.com/imprint
# Database settings
HD_DATABASE_TYPE=sqlite
HD_DATABASE_NAME=./hedgedoc.sqlite
#HD_DATABASE_TYPE=postgres # could be mariadb as well
#HD_DATABASE_HOST=localhost
#HD_DATABASE_PORT=5432
#HD_DATABASE_NAME=hedgedoc
#HD_DATABASE_USERNAME=hedgedoc
#HD_DATABASE_PASSWORD=very-secret
# External integrations
HD_PLANTUML_SERVER=https://www.plantuml.com/plantuml
HD_IMAGE_PROXY=https://img-proxy.example.com/
# Uploads
HD_MEDIA_BACKEND_TYPE=filesystem
HD_MEDIA_BACKEND_FILESYSTEM_UPLOAD_PATH=uploads/
#HD_MEDIA_BACKEND_TYPE=azure
#HD_MEDIA_BACKEND_AZURE_CONNECTION_STRING=DefaultEndpointsProtocol=https;AccountName=your_account_name;AccountKey=your_account_key;EndpointSuffix=core.windows.net
#HD_MEDIA_BACKEND_AZURE_CONTAINER=hedgedoc-uploads
#HD_MEDIA_BACKEND_TYPE=s3
#HD_MEDIA_BACKEND_S3_ACCESS_KEY=your_access_key_id
#HD_MEDIA_BACKEND_S3_SECRET_KEY=your_secret_access_key
#HD_MEDIA_BACKEND_S3_REGION=us-east-1
#HD_MEDIA_BACKEND_S3_BUCKET=hedgedoc-uploads
#HD_MEDIA_BACKEND_S3_ENDPOINT=https://s3.amazonaws.com
#HD_MEDIA_BACKEND_S3_PATH_STYLE=false
#HD_MEDIA_BACKEND_TYPE=imgur
#HD_MEDIA_BACKEND_IMGUR_CLIENT_ID=your_imgur_client_id
#HD_MEDIA_BACKEND_TYPE=webdav
#HD_MEDIA_BACKEND_WEBDAV_CONNECTION_STRING=https://user:token@example.com/dav/hedgedoc-uploads/
#HD_MEDIA_BACKEND_WEBDAV_UPLOAD_DIR=hedgedoc-uploads
#HD_MEDIA_BACKEND_WEBDAV_PUBLIC_URL=https://example.com/download/hedgedoc-uploads/
# Note settings
HD_NOTE_FORBIDDEN_ALIASES=help,about,forbidden
HD_NOTE_MAX_LENGTH=1000000
HD_NOTE_PERMISSIONS_MAX_GUEST_LEVEL=full
HD_NOTE_PERMISSIONS_DEFAULT_EVERYONE=read
HD_NOTE_PERMISSIONS_DEFAULT_LOGGED_IN=write
HD_NOTE_REVISION_RETENTION_DAYS=60
HD_NOTE_PERSIST_INTERVAL=10