Files
VoelinClient/crates/voelin-gateway/tsgw.example.toml
T
Claude 91d69f1933 Docs: gateway runtime configuration, permission rules and protocol
gateway-admin.md explains bootstrap keys versus seeds, the precedence
(runtime > --set > environment > file > default), reloading, every key,
the admin commands, permission rules with their defaults and the data
the database keeps. The history retention default is now to keep
messages; the doc says how to get the old 30 days back.

gateway-protocol.md is the reference of tsgw.v1+json with the new
messages. The example config marks bootstrap keys and lists the seeds.
The systemd unit reloads with SIGHUP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-27 18:41:25 +00:00

105 lines
3.0 KiB
TOML

# tsgw: companion gateway for invisible presence and channel chat.
# Copy to tsgw.toml and adjust. See docs/gateway-admin.md.
#
# Two kinds of keys:
# - BOOTSTRAP keys (query login, addresses, database path) are read at start
# from this file, TSGW_<KEY> environment variables or `--set key=value`.
# Changing them needs a restart.
# - Everything else is a SEED: the value used unless an admin changes it at
# runtime (Voelin's admin screen / config_set). Values set at runtime are
# stored in the database and win over this file; `config_reset` goes back
# to it. Reload with SIGHUP (or just save: the file is checked every 5 s).
# Precedence: runtime (database) > --set > environment > this file > default.
# BOOTSTRAP. Signed into every login challenge. Defaults to listen.public_url.
# gateway_id = "wss://gw.example.org/v1"
[server]
# BOOTSTRAP. Voice port of the virtual server this gateway serves.
voice_port = 9987
[query]
# BOOTSTRAP. "ssh" (TeamSpeak 3 and 6) or "raw" (TeamSpeak 3 only).
transport = "ssh"
addr = "127.0.0.1:10022"
user = "serveradmin"
# Prefer password_file or the TSGW_QUERY_PASSWORD environment variable.
# password_file = "/run/secrets/tsgw_query_password"
# Set to true once the gateway's IP is in the server's query_ip_allowlist.
allowlisted = false
[listen]
# BOOTSTRAP.
bind = "0.0.0.0:7788"
# public_url = "wss://gw.example.org/v1"
[auth]
# Only these server groups may use the gateway (empty: everyone known to the server).
require_server_groups = []
deny_uids = []
min_security_level = 0
token_ttl_hours = 720
[relay]
nickname = "Chat Relay"
format = "[{nick}] {text}"
idle_teardown_secs = 120
# Each relay is one query connection; stay below the server's per-IP limit.
max_channel_relays = 6
# Channels relayed all the time, so their history is complete.
pinned_channels = []
[history]
# BOOTSTRAP: the database also holds tokens and runtime settings.
path = "tsgw.db"
enabled = true
# 0 keeps messages forever (pinned messages are always kept).
retention_days = 0
# Optional features; Voelin hides what is off.
[features]
pins = true
reactions = true
topics = true
events = true
streams = true
activity = true
[topics]
# How topic posts appear in TeamSpeak; TeamSpeak posts in this form join the topic.
relay_format = "[#{topic}] {text}"
[events]
# Remind subscribers this many minutes before an event (0: when it starts).
reminder_minutes = [15, 0]
stream_link_minutes = 60
[activity]
retention_days = 0
[limits]
# Per connection; 0 turns a limit off.
posts_per_window = 5
post_window_secs = 5
actions_per_window = 30
action_window_secs = 10
# Quotas: 0 means none.
[quota]
history_page = 0
pins_per_channel = 0
topics_per_channel = 0
events_per_user = 0
reactions_per_message = 0
reaction_bytes = 64
message_bytes = 0
streams_per_user = 0
# Who may do what, by TeamSpeak server group or channel group ids. Without
# a rule an action has its default (see docs/gateway-admin.md).
[perm]
# pin = { server_groups = [6], channel_groups = [5] }
# create_event = { server_groups = [6, 7] }
# admin = { server_groups = [6] }
# react = { everyone = true }