Files
arcadia/tracker/arcadia_tracker/.env.example
T
2025-11-02 22:31:42 +01:00

95 lines
3.5 KiB
Bash

## Logging (docs: https://docs.rs/env_logger/latest/env_logger/)
# Possible options for RUST_LOG:
# "error" - Logs only error messages.
# "warn" - Logs warnings and errors.
# "info" - Logs informational messages, warnings, and errors.
# "debug" - Logs debug, informational messages, warnings, and errors.
# "trace" - Logs all messages including trace-level details.
# "off" - Disables logging entirely.
# You can also specify logging levels for specific modules, e.g.:
# - "debug,sqlx=info": Debug message for entire app, info for sqlx module.
# - "off": Disables logging entirely
RUST_LOG="debug,sqlx=info"
## Server Configuration
WEB_SERVER_HOST=0.0.0.0
WEB_SERVER_PORT=8081
## Tracker Configuration
# Used for the backend to make requests to the tracker
# and vice-versa. Must be the same as in arcadia's .env file
API_KEY=change_me
# List of allowed torrent clients.
# The prefixed "-" should be removed.
ALLOWED_TORRENT_CLIENTS=BI3500,BI3600,BI3700,DE12,DE13,DE2,FL149,FL1490,HL04,KT21,KT23,KT24,KT5,LT,lt0D,lt0E,lt0F,qB2,qB3,qB40,qB41,qB42,qB43,qB44,qB45,qB46,qB50,qB51,TR2,TR3000,TR4010,TR4020,TR4030,TR4040,TR4050,TR4060
# The amount of peers that should be sent back if the peer does not
# include a numwant.
#
# Default: 15
NUMWANT_DEFAULT=15
# The max amount of peers that should be sent back if the peer's numwant
# is too high.
#
# Default: 15
NUMWANT_MAX=15
# A random amount of seconds between announce_min and announce_max will
# be returned to the peer for the next time they should announce.
#
# Default: 1800
ANNOUNCE_MIN=1800
# If a user announces before this many seconds after their previous
# announce, then they will receive a rate limit error.
#
# Default: 1740
ANNOUNCE_MIN_ENFORCED=1740
# A random amount of seconds between announce_min and announce_max will
# be returned to the peer for the next time they should announce.
#
# Default: 3600
ANNOUNCE_MAX=3600
# Max amount of active peers a user is allowed to have on a torrent.
# Prevents abuse from malicious users causing the server to run out of ram,
# as well as keeps the peer lists from being filled with too many clients
# of a single user.
#
# Default: 3
MAX_PEERS_PER_TORRENT_PER_USER=3
# The interval (in milliseconds) between when history, peers, torrents and
# users are flushed to the postgresql database.
#
# Default: 3000
FLUSH_INTERVAL_MILLISECONDS=3000
# Amount of seconds between scheduled batches where peers are marked as
# inactive or erased from memory.
#
# Default: 1800
PEER_EXPIRY_INTERVAL=1800
# Amount of seconds since the last announce before a peer is considered
# inactive.
#
# Default: 7200
ACTIVE_PEER_TTL=7200
# Amount of seconds since the last announce before a peer is erased from
# memory. This value should be long enough that users can suffer
# multi-day network outages without announcing, otherwise if their setup
# comes back online and the peer has been erased, then their new stats
# will be recorded incorrectly.
#
# Default: 1814400
INACTIVE_PEER_TTL=1814400
# The header provided by the reverse proxy that includes the bittorrent
# client's original ip address. The last address in the comma separated
# list will be selected. Leave empty to select the connecting ip address
# if not using a reverse proxy. A reverse proxy is required if listening
# on unix sockets.
#
# Default: <commented out>
# Example: "X-Real-IP"
# REVERSE_PROXY_CLIENT_IP_HEADER_NAME="X-Real-IP"
## Backend Configuration
ARCADIA_API_BASE_URL=http://localhost:8080
# connection string for the database.
DATABASE_URL=postgresql://arcadia:password@localhost:4321/arcadia