# DarkChan server — options for darkchan-server.service, and for the
# darkchan-adm wrapper, which reads this same file so the two cannot disagree
# about where the store is.
#
# This is a dpkg CONFFILE: your edits survive a package upgrade, and dpkg asks
# before replacing it. Edits to the unit itself do not survive — it lives under
# /usr, which dpkg overwrites without asking.
#
# Everything here is commented out and shows the built-in default. Uncomment a
# line to change it, then:  sudo systemctl restart darkchan-server
#
# Full reference: /usr/share/doc/darkchan-server/CONFIGURATION.md

# Where all server state lives: accounts, conversations, blobs, the emoji pack,
# the server identity key, the indexes. THE thing to back up.
#DARKCHAN_DATA=/var/lib/darkchan

# TCP port clients connect to.
#DARKCHAN_PORT=7420

# Everything else, as a flag list. It is split on whitespace, so a path
# containing spaces will not survive — put such a path in DARKCHAN_DATA, which
# is passed as a single argument.
#
#   --cert PATH --key PATH   a real TLS certificate. With none, the server
#                            self-signs into the data directory on first boot;
#                            native clients pin the server identity key rather
#                            than the chain (§7.2) and do not care, but
#                            browsers using the web portal warn until you put
#                            a real one here. The service user must be able to
#                            READ both files — a certbot key is root-only, so
#                            chgrp darkchan and chmod 0640 it.
#   --bind ADDR              listen on one address instead of every interface.
#                            There is no variable of its own for this: the
#                            server takes the flag's ABSENCE to mean "all", so
#                            there is no value that could be a default.
#   --portal-dir DIR         serve the web portal over the same TLS listener;
#                            the package installs it at
#                            /usr/share/darkchan/portal when it was built.
#   --blob-ttl-days N        delete stored attachments older than N days. This
#                            DELETES BY AGE ALONE — the server cannot see which
#                            message an attachment belongs to — so set it only
#                            alongside a message retention at least as short.
#   --auto-approve           new registrations skip admin approval. This
#                            removes the front door: anyone who can reach the
#                            port gets an account. For a test or LAN server.
#
#DARKCHAN_EXTRA_ARGS=

# Used by darkchan-adm only: the service user the store belongs to, and the
# unit it bounces around a write. Change these only if you renamed them.
#DARKCHAN_USER=darkchan
#DARKCHAN_UNIT=darkchan-server
#DARKCHAN_ADMIN=darkchan-admin
