# SPDX-FileCopyrightText: 2022 Konstantinos Thoukydidis <mail@dbzer0.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

# Horde Display
HORDE_TITLE="AI Horde"
HORDE_NOUN="Horde"
HORDE_URL="https://aihorde.net"
# The public source repository; the privacy document links it. Default: https://github.com/Haidra-Org/AI-Horde.
# HORDE_REPOSITORY="https://github.com/Haidra-Org/AI-Horde"
# Optional frontpage base URL; problem-user Discord alerts link to the moderation event under it.
# HORDE_MODERATION_FRONTPAGE_URL="https://aihorde.net"
HORDE_CONTACT_EMAIL="aihorde@dbzer0.com"
HORDE_LOGO="https://raw.githubusercontent.com/db0/Stable-Horde/main/img_stable/0.jpg"
HORDE_HTML_TERMS="terms_of_service.html"
HORDE_HTML_PRIVACY="privacy_policy.html"
HORDE_MARKDOWN_INDEX="index_stable.md"
# The elected image-reference publisher fetches through horde-model-reference in REPLICA mode.
# Fleet publication requires a PRIMARY; HMR's GitHub fallback is never published to Redis.
HORDE_MODEL_REFERENCE_PRIMARY_API_URL="https://models.aihorde.net/api"
# Where horde-model-reference writes its on-disk reference cache. Relative paths resolve against
# the process working directory, so set it explicitly for a deployment.
AIWORKER_CACHE_HOME="models"
# How long a cold-starting instance waits for the elected bootstrap publisher to populate Redis.
HORDE_MODEL_REFERENCE_BOOTSTRAP_TIMEOUT="195"
# Maximum duration of the fenced Redis publication lease used for one complete remote refresh.
HORDE_MODEL_REFERENCE_PUBLISH_LOCK_SECONDS="180"
# Categories whose pending (beta) models are merged over the canonical reference. Empty disables beta.
HORDE_BETA_MODEL_CATEGORIES="image_generation"
# A reader-level AI-Horde API key for the pending-model reads. The anonymous key is accepted.
HORDE_BETA_MODELS_API_KEY="0000000000"
HORDE_IMAGE_LLM_REFERENCE="https://raw.githubusercontent.com/db0/AI-Horde-text-model-reference/main/db.json"
# Set to 1 to prevent user specifying a worker who doesn't have them as prio
# When enabled. targeted worker request will also not use any kudos except some horde tax
HORDE_REQUIRE_MATCHED_TARGETING=0
# Set to 1 to make specifying a worker allow/denylist require upfront kudos
HORDE_UPFRONT_KUDOS_ON_WORKERLIST=0
# Retention of moderation evidence (rejected prompts and worker reports), in days from capture. Worker report
# records (counted by the problem-job alerts) follow the address window and the ceiling too.
# The privacy document discloses these values. Invalid values stop startup.
# Prompt text is removed after this many days. "none" keeps it until the ceiling. Default: none.
# HORDE_MODERATION_TEXT_RETENTION_DAYS=none
# The address is removed after this many days; its pseudonym, keyed with secret_key, stays until the ceiling.
# "none" keeps the address until the ceiling. Default: 30.
# HORDE_MODERATION_IPADDR_RETENTION_DAYS=30
# After this many days an event is anonymized: its identifying values and address pseudonym are removed, while its
# reason, outcome, models, reporting worker and notes stay; worker report records are deleted. At most 365; it
# cannot be disabled, and neither window above may exceed it. Default: 365.
# The windows and the ceiling skip events with a moderator note and events and worker report records of a flagged or
# suspicious account; those are kept without limit. Wiping an account removes none of these records.
# HORDE_MODERATION_EVIDENCE_CEILING_DAYS=365
# Automatic timeout of one IP subject for model rejections, counted per subject over an hour. A positive whole
# number; an invalid value stops startup.
# Model rejections after which the next one times out the IP subject. Raid mode times out every one. Default: 5.
# HORDE_MODEL_REJECTION_TIMEOUT_THRESHOLD=5
# Worker suspicion history rows are deleted after this many days, at most 36500, unless the worker's account is
# flagged or suspicious. The ceiling does not apply, and the privacy document discloses the period. Default: unset,
# which keeps them indefinitely.
# HORDE_WORKER_SUSPICION_RETENTION_DAYS=365
# Google Oauth2
GOOGLE_CLIENT_ID=""
GLOOGLE_CLIENT_SECRET=""
GOOGLE_VERIFICATION_STRING=""
# Discord Oauth2
DISCORD_CLIENT_ID=""
DISCORD_CLIENT_SECRET=""
# Github Oauth2
GITHUB_CLIENT_ID=""
GITHUB_CLIENT_SECRET=""
# Patreon Creator Token
PATREON_CREATOR_ACCESS_TOKEN=""
# Put some random secure string. It salts stored API keys and keys the moderation address pseudonym, so never
# rotate it. Left unset or at this placeholder, moderation records store no address pseudonym.
secret_key="changeme"
# The FQDN of your redis DB loadblancer. This is used to store all caches. You can use the redis IP directly if you do not have an FQDN
REDIS_IP="redis.example.com"
REDIS_PORT=6379
# The IPs of your redis component DBs. We use this to write all caches, to facilitate failovers
REDIS_SERVERS='["127.0.0.1"]'
# Seconds a redis command or connection attempt may wait before it fails. Bounded so a stalled redis
# cannot pin request threads and their database transactions. Defaults: 5 and 3.
# REDIS_SOCKET_TIMEOUT=5
# REDIS_SOCKET_CONNECT_TIMEOUT=3
# If you have a postgresql DB available, set this to 0
USE_SQLITE = 1
# The FQDN of your postgres DB. You can use an IP address if you don't have an FQDN
POSTGRES_URL="postgres.example.com/postgres"
POSTGRES_PASS="changeme"
POSTGRES_USER="postgres"
# The user which will be the admin of this horde
ADMINS='["db0#1"]'
# How much Kudos a user needs to generate with their worker until they become trusted
KUDOS_TRUST_THRESHOLD=1
# AWS/Cloudflare R2 Info
AWS_ACCESS_KEY_ID=""
AWS_SECRET_ACCESS_KEY=""
AWS_DEFAULT_REGION=auto
# Shared AWS/Cloudflare R2 Info
SHARED_AWS_ACCESS_ID=""
SHARED_AWS_ACCESS_KEY=""
R2_TRANSIENT_ACCOUNT="https://a223539ccf6caa2d76459c9727d276e6.r2.cloudflarestorage.com"
R2_PERMANENT_ACCOUNT="https://a223539ccf6caa2d76459c9727d276e6.r2.cloudflarestorage.com"
R2_TRANSIENT_BUCKET="horde-transient"
R2_PERMANENT_BUCKET="horde-permanent"
R2_SOURCE_IMAGE_BUCKET="horde-source-images"
# Moderation evidence text store, a bucket of its own. Captured prompt text moves here from the database in the
# background; moderators read it through short-lived signed links. Unless the endpoint, bucket and both token
# variables are set, the text stays in the database and the listing carries it inline.
# R2_EVIDENCE_ACCOUNT="https://<account>.r2.cloudflarestorage.com"
# R2_EVIDENCE_BUCKET="horde-moderation-evidence"
# The signing region; R2 uses "auto", the default. Set it for another S3-compatible store.
# R2_EVIDENCE_REGION="auto"
# EVIDENCE_AWS_ACCESS_KEY_ID=""
# EVIDENCE_AWS_SECRET_ACCESS_KEY=""
# Fill these in from https://www.google.com/recaptcha/ to enable recaptcha on registration
RECAPTCHA_SITE_KEY=""
RECAPTCHA_SECRET_KEY=""
# Provide a stripe API key to enable stripe integration. The API key needs read on product and customers.
STRIPE_API_KEY=""
