Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

14.0 KB
Raw Blame
# Museum loads configuration in this order:
#
# 1. configurations/$ENVIRONMENT.yaml, or this file when ENVIRONMENT is unset.
# 2. credentials-file, when present.
# 3. museum.yaml in the current working directory, when present.
# 4. ENTE_* environment variables.
#
# Later sources override earlier ones.
#
# Environment variables replace nesting and hyphens with underscores:
#
# db.user -> ENTE_DB_USER
# s3.b2-eu-cen -> ENTE_S3_B2_EU_CEN
#
# Empty strings represent missing values.
# In a later file, use `key: ""` to clear an earlier value; omitting the key leaves the earlier value unchanged.
#
# ---

# Optional configuration loaded before museum.yaml.
# Defaults to credentials.yaml in the current working directory.
#credentials-file: credentials.yaml

# Directory containing credentials kept outside YAML:
#
# - credentials/{tls.cert,tls.key}
# - credentials/pst-service-account.json
# - credentials/fcm-service-account.json
#
# Defaults to credentials in the current working directory.
#credentials-dir: credentials

# By default, museum logs to stdout when running locally. Specify this path to
# get it to log to a file instead.
#
# It must be specified if running in a non-local environment.
log-file: ""

# The minimum level of logs to emit: "panic", "fatal", "error", "warn", "info",
# "debug" or "trace".
#
# Anything below the configured level is dropped, e.g. "warn" suppresses info
# and debug logs. If not specified or invalid defaults to "info".
#log-level: info

# HTTP connection parameters
http:
    # The port to bind to.
    # If not specified, defaults to 8080 (HTTP) or 443 (HTTPS with use-tls: true)
    # port: 8080

    # If true, use TLS for HTTPS connections.
    # When true and port is not specified, defaults to port 443.
    # When false and port is not specified, defaults to port 8080.
    # use-tls: true

# Specify the base endpoints for various apps
apps:
    # Default is https://albums.ente.com
    #
    # If you're running a self hosted instance and wish to serve public links for photos,
    # set this to the URL where your albums web app is running.
    public-albums:
    # Default is https://embed.ente.com
    #
    # For self-hosted instances, set this to the URL where your embed app is running.
    embed-albums:
    photobook:
    # Default is https://share.ente.com
    #
    # If you're running a self-hosted instance and wish to serve public links for locker,
    # set this to the URL where your share web app is running.
    public-locker:
    # Default is https://paste.ente.com
    #
    # If you're running a self-hosted instance and wish to serve Ente Paste,
    # set this to the URL where your paste web app is running.
    public-paste:
    # Default is https://cast.ente.com
    cast:
    # Set this to the URL where your accounts web app is running. It is used
    # for passkey based 2FA and other cross-app flows like accepting family
    # invites.
    #
    # Default is https://accounts.ente.com
    accounts:
    # Optional. Used only for Ente's accounts.ente.io -> accounts.ente.com
    # passkey migration. Users with passkeys scoped to webauthn.legacy-rpid are
    # sent here.
    #
    # Default is https://accounts.ente.io
    accounts-legacy:
    # Default is https://family.ente.io
    family:
    # Default is https://ente.space
    #
    # Set this to the URL where your space web app is running.
    space:
    # Default is https://memories.ente.com
    #
    # If you're running a self-hosted instance and wish to serve public memory shares,
    # set this to the URL where your memories web app is running.
    public-memories:
    # Default is https://legacy.ente.com
    #
    # If you're running a self-hosted instance and wish to serve legacy kit recovery,
    # set this to the URL where your legacy recovery web app is running.
    legacy:
    custom-domain:
        # Default is my.ente.com
        cname:

space:
    assets:
        # Bucket ID used for Space post, avatar, and cover uploads.
        # If omitted, Space asset uploads return SPACE_ASSETS_UNAVAILABLE.
        primaryBucket:

# Database connection parameters
db:
    host: localhost
    port: 5432
    name: ente_db
    # You might want to set this to "require" for production
    # See https://www.postgresql.org/docs/current/libpq-ssl.html#LIBPQ-SSL-PROTECTION
    sslmode: disable
    # These can be specified here, or alternatively provided via the environment
    # as ENTE_DB_USER and ENTE_DB_PASSWORD.
    user:
    password:
    # This can be used to provide parameters that are appended verbatim to the
    # generated DSN used for connecting to the DB.
    # extra:

# Map of data centers
#
# Each data center also specifies which bucket in that provider should be used.
#
# If you're not using replication (it is off by default), you only need to
# provide valid credentials for the first entry (the default hot storage,
# "b2-eu-cen").
#
# Note that you need to use the same key names (e.g. "b2-eu-cen") as below. The
# values and the S3 provider itself can any arbitrary S3 storage, it is not tied
# to the region (eu-cen) or provider (b2, wasabi), but for historical reasons
# the key names have to be one of those in the list below.
s3:
    # Override the primary and secondary hot storage. The commented out values
    # are the defaults.
    #
    #hot_storage:
    #    primary: b2-eu-cen
    #    secondary: wasabi-eu-central-2-v3
    b2-eu-cen:
        # Uncomment to override top-level bucket configuration for URL addressing and external buckets
        # are_local_buckets: true
        # use_path_style_urls: true
        key:
        secret:
        endpoint:
        region:
        bucket:
    wasabi-eu-central-2-v3:
        # are_local_buckets: true
        # use_path_style_urls: true
        key:
        secret:
        endpoint:
        region:
        bucket:
        # If enabled, this causes us to opt the object out of the compliance
        # lock when the object is deleted. See "Wasabi Compliance".
        #
        # Currently this flag is only honoured for the Wasabi v3 bucket.
        compliance: true
    scw-eu-fr-v3:
        # are_local_buckets: true
        # use_path_style_urls: true
        key:
        secret:
        endpoint:
        region:
        bucket:
    wasabi-eu-central-2-derived:
        key:
        secret:
        endpoint:
        region:
        bucket:
    # Derived storage bucket is used for storing derived data like embeddings, preview etc.
    # By default, it is the same as the hot storage bucket.
    # derived-storage: wasabi-eu-central-2-derived

    # If true, enable some workarounds to allow us to use a local minio instance
    # for object storage.
    #
    # 1. Disable SSL.
    #
    # 2. Use "path" style S3 URLs (see `use_path_style_urls` below).
    #
    # 3. Directly download the file during replication instead of going via the
    #    Cloudflare worker.
    #
    # 4. Do not specify storage classes when uploading objects (since minio does
    #    not support them, specifically it doesn't support GLACIER).
    #
    #are_local_buckets: true
    # Uncomment this to use "path" style S3 URLs.
    #
    # By default the bucket name is part of the (sub)domain, e.g.
    # http://b2-eu-cen.localhost:3200/. If this is true, then we use "path"
    # style S3 URLs where the bucket is part of the URL path, e.g.
    # http://localhost:3200/b2-eu-cen.
    #
    # This is useful in scenarios when sub-domain based addressing cannot be
    # resolved, e.g. when running a local instance, or when using MinIO as a
    # production store.
    #use_path_style_urls: true
    #
    # Warning: For file-storage, do not specify buckets with any lock or versioning enabled.
    # The application does not handle these cases. By default, we will use the derived-storage or hot storage bucket
    # as the primary bucket for file-data-config.
    # file-data-config:
    #     mldata:
    #         primaryBucket:
    #         replicaBuckets: []
    #     img_preview:
    #         primaryBucket:
    #         replicaBuckets: []
    # attachment-config:
    #     profile_picture:
    #         primaryBucket:
    #         replicaBuckets: []

# Key used for encrypting customer emails before storing them in DB
#
# [Note: Self hosting credentials]
#
# To make it easy to get started, some randomly generated (but fixed) values are
# provided here. But if you're really going to be using museum, please generate
# new keys. You can use `go run tools/gen-random-keys/main.go` for that.
#
# If you used the quickstart.sh script to prepare your compose.yaml, it would've
# already generated new random credentials for you in your `museum.yaml`. Those
# will override these defaults; those are the values for your instance would
# use, and what you need to backup.
key:
    encryption: yvmG/RnzKrbCb9L3mgsmoxXr9H7i2Z4qlbT0mL3ln4w=
    hash: KXYiG07wC7GIgvCSdg+WmyWdXDAn6XKYJtp/wkEU7x573+byBRAYtpTP0wwvi8i/4l37uicX1dVTUzwH3sLZyw==

# JWT secrets
#
# See: [Note: Self hosting credentials] above.
#
jwt:
    secret: i2DecQmfGreG6q1vBj5tCokhlN41gcfS2cjOs9Po-u8=

# SMTP configuration (optional)
#
# Configure credentials here for sending mails from museum (e.g. OTP emails).
#
# username and password are optional (e.g. if you're using a local relay server
# and don't need authentication).
smtp:
    host:
    port:
    username:
    password:
    # The email address from which to send the email. Set this to an email
    # address whose credentials you're providing.
    email:
    # Optional override for the sender name in the emails. If specified, it will
    # be used for all emails sent by the instance (default is email specific).
    sender-name:
    # Optional encryption method. If tls or ssl is chosen, encryption is enabled.
    encryption:

# Apple config (optional)
# Use case: In-app purchases
apple:
    # Secret used when communicating with Apple for validating IAP receipts.
    shared-secret:

# Stripe config (optional)
# Use case: Payments
stripe:
    us:
        key:
        webhook-secret:
    in:
        key:
        webhook-secret:
    whitelisted-redirect-urls: []
    path:
        success: ?status=success&session_id={CHECKOUT_SESSION_ID}
        cancel: ?status=fail&reason=canceled

# Passkey support (optional)
# Use case: MFA
webauthn:
    # Our "Relying Party" ID. This scopes the generated credentials.
    # See: https://www.w3.org/TR/webauthn-3/#rp-id
    rpid: localhost
    # Whitelist of origins from where we will accept WebAuthn requests.
    # See: https://github.com/go-webauthn/webauthn
    rporigins:
        - "http://localhost:3001"
    # Optional. Used only when migrating existing passkeys from an older RP ID.
    # Leave unset for normal deployments. Wrong RP/origin values can prevent
    # users from using their passkeys.
    #
    # Credentials without an rp_id are treated as belonging to legacy-rpid.
    # Users with such credentials keep using apps.accounts-legacy.
    legacy-rpid:
    legacy-rporigins: []

# Discord config (optional)
# Use case: Devops
discord:
    bot:
        cha-ching:
            token:
            channel:
        mona-lisa:
            token:
            channel:

# Listmonk Campaigns config (optional)
# Use case: Sending emails
listmonk:
    server-url:
    username:
    password:
    list-ids:

# Various low-level configuration options
internal:
    # If false (the default), then museum will notify the external world of
    # various events. E.g, email users about their storage being full, send
    # alerts to Discord, etc.
    #
    # It can be set to true when running a "read only" instance like a backup
    # restoration test, where we want to be able to access data but otherwise
    # minimize external side effects.
    silent: false
    # Header gin will trust for resolving the original client IP when requests are proxied.
    # If the header or value is missing, server will default to X-Forwarded-For, X-Real-IP, remote-addr (in that order).
    trusted-client-ip-header:
    # If provided, this external healthcheck url is periodically pinged.
    health-check-url:
    # Hardcoded verification codes, useful for logging in when developing.
    #
    # Uncomment this and set these to your email ID or domain so that you don't
    # need to peek into the server logs for obtaining the OTP when trying to log
    # into an instance you're developing on.
    # hardcoded-ott:
    #     emails:
    #         - "[email protected],123456"
    #     # When running in a local environment, hardcode the verification code to
    #     # 123456 for email addresses ending with @example.org
    #     local-domain-suffix: "@example.org"
    #     local-domain-value: 123456
    # List of user IDs that can use the admin API endpoints.
    # If this is not set, as a fallback, the first user is considered an admin.
    admins: []
    # In case there is a single admin, it can be alternatively specified by as
    # the "admin" instead of "admins". This can be useful e.g. when wishing to
    # pass the admin as an environment variable.
    admin:
    # If set to true, users will not be able to register a new account.
    #
    # During sign up, the client will get an unauthorized error and
    # thus cannot create new accounts.
    disable-registration: false

# Replication config
#
# If enabled, replicate each file to 2 other data centers after it gets
# successfully uploaded to the primary hot storage.
replication:
    enabled: false
    # The Cloudflare worker to use to download files from the primary hot
    # bucket. If this isn't specified, files will be downloaded directly.
    worker-url:
    # Number of go routines to spawn for replication
    # This is not related to the worker-url above.
    # Optional, default value is indicated here.
    worker-count: 6
    # Where to store temporary objects during replication v3
    # Optional, default value is indicated here.
    tmp-storage: tmp/replication

# Configuration for various background / cron jobs.
jobs:
    cron:
        # Instances run various cleanup, sending emails and other cron jobs. Use
        # this flag to disable all these cron jobs.
        skip: false
    remove-unreported-objects:
        # Number of go routines to spawn for object cleanup
        # Optional, default value is indicated here.
        worker-count: 1