Configuring the Index
Torrust's configuration is a simple TOML file. If no TOML file is found, it will fail on startup.
Must change
These are all the configuration options that can affect the security of your instance. Please make sure to change these to your own values.
tracker.tokenauth.secret_key
Configuration
Tracker
REQUIREDurl: public UDP url of the torrust-tracker instance.REQUIREDapi_url: URL of the torrust-tracker API, usuallyhttp://localhost:1212.REQUIREDtoken: token configured in the torrust-tracker configuration.REQUIREDtoken_valid_seconds: Lifetime of a tracker key.
NET
REQUIREDport: The port the API will listen on. It's not advised to use ports under 1024 because root access is required for these ports.OPTIONALbase_url: The URL this application is accessible from. Used to build the email verification URL. If not set it uses the hostname the endpoint was called from.
Database
REQUIREDconnect_url: The connection URL of the database. Should always start withsqlite:, no other databases are supported as of now.Includingmode=rwcallows the database to beRead / Written / Created. Example:sqlite://data.db?mode=rwcREQUIREDtorrent_info_update_interval: Interval in seconds for updating torrent seeder and leecher information. This can be a heavy operation depending on the amount of torrents that are tracked, and thus is not recommended to be lower than1800seconds.
REQUIREDserver: Hostname or IP address of a SMTP server.REQUIREDport: Port of the SMTP server.REQUIREDusername: Username for authenticating with the specified SMTP server.REQUIREDpassword: Password for authenticating with the specified SMTP server.REQUIREDfrom: Email address where emails are sent from.REQUIREDreply_to: Email address to which replies on the emails should be sent. Can also be a non reply address, or the same as the from address.
Auth
REQUIREDmin_password_length: Minimum length of a password when registering a new user.REQUIREDmax_password_length: Maximum length of a password when registering a new user.REQUIREDsecret_key: Signing key of the JWT authentication tokens. Keeping these default will severely impact the security of your instance, and allows attackers to login as any user.
Storage
REQUIREDupload_path: Path where uploads should be stored. Directories will be automatically created on startup if they don't exist.
Default
[website]
name = "Torrust"
[tracker]
url = "udp://torrust.com:6969/announce"
api_url = "http://localhost:1212"
token = "MyAccessToken"
token_valid_seconds = 7257600
[net]
port = 3000
[auth]
min_password_length = 6
max_password_length = 64
secret_key = "MaxVerstappenWC2021"
[database]
connect_url = "sqlite://data.db?mode=rwc"
torrent_info_update_interval = 3600
[storage]
upload_path = "./uploads"
[mail]
email_verification_enabled = false
from = "example@email.com"
reply_to = "noreply@email.com"
username = ""
password = ""
server = ""
port = 25