BNBT Documentation - 2.3 Configuring BNBT

## 2.3 Configuring BNBT

This is a list of the configuration keys in bnbt.cfg.

## General Configuration Values

- allowed_dir (no default):
- announce_interval (default 1800): the number of seconds each client should wait between announces.
- bind (no default): the IP address BNBT will bind to. Leave blank to bind to all available IP addresses.
- bnbt_access_log_dir (no default): the directory where BNBT will place access logs.
- bnbt_allow_comments (default 0): enable or disable posting of comments.
- bnbt_allow_info_link (default 0): enable or disable displaying of info links for each torrent on the index page (set with the torrent uploader).
- bnbt_allow_scrape (default 1): enable or disable scrape access on the index page.
- bnbt_allow_search (default 1): enable or disable searching of torrents on the index page.
- bnbt_allow_sort (default 1): enable or disable sorting of torrents.
- bnbt_allow_torrent_downloads (default 1):
- bnbt_archive_dir (no default):
- bnbt_charset (default "iso-8859-1"): the charset to include with the Content-Type header.
- bnbt_comment_length (default 800): the maximum length of comments.
- bnbt_comments_file (no default): the file to store comments (this is a local path).
- bnbt_compression_level (default 6): the compression level zlib will use to compress responses. Use 0 to disable compression, 1 for fastest (worst) compression, and 9 for slowest (best) compression.
- bnbt_count_unique_peers (default 1): enable or disable counting of unique peers.
- bnbt_debug (default 0): enable or disable printing of debug messages.
- bnbt_delete_invalid (default 0): enable or disable removal of invalid torrent files.
- bnbt_delete_own_torrents (default 1): enable or disable access for users to remove their own torrents from the tracker (i.e. torrents they uploaded).
- bnbt_error_log_dir (no default): the directory where BNBT will place error logs.
- bnbt_external_torrent_dir (no default):
- bnbt_file_dir (no default): the directory to allow access through the "/files" interface. For example, if you place a file named "hello.txt" in bnbt_file_dir, it can be accessed through "/files/hello.txt" (advanced users note that mime types are hardcoded - this is a local path).
- bnbt_file_expires (default 180): the number of minutes each browser should cache files accessed through bnbt_file_dir.
- bnbt_flush_interval (default 100): the number of log messages to queue in memory before flushing to disk.
- bnbt_force_announce_on_download (default 0): enable or disable forcing the announce URL on each torrent as it is downloaded.
- bnbt_force_announce_url (no default): the announce URL to 'force' on each uploaded torrent.
- bnbt_guest_access (default 67): see users.txt.
- bnbt_max_conns (default 64): the maximum number of simultaneous connections to open.
- bnbt_max_peers_display (default 500): the maximum number of peers to display on the stats page.
- bnbt_max_recv_size (default 524288):
- bnbt_max_torrents (default 0):
- bnbt_member_access (default 79): see users.txt.
- bnbt_name_length (default 32): the maximum length of usernames.
- bnbt_parse_on_upload (default 1):
- bnbt_per_page (default 20): the number of torrents to display per page on the index page.
- bnbt_realm (default "BNBT"):
- bnbt_refresh_static_interval (default 10): the number of minutes to wait between refreshing the static header and footer.
- bnbt_refresh_fast_cache_interval (default 10): the number of seconds to wait at least between refreshing the index/scrape data. BNBT will only refresh the fast cache when the specified interval has elapsed AND an index/scrape request has been received.
- bnbt_robots_txt (no default): the robots.txt file to be returned when /robots.txt is accessed (this is a local path).
- bnbt_show_added (default 1): enable or disable displaying of dates and times when each torrent was uploaded on the index page.
- bnbt_show_average_dl_rate (default 0): enable or disable displaying of average peer download rates on the stats page.
- bnbt_show_average_left (default 0): enable or disable displaying of average left percentages on the index page.
- bnbt_show_average_ul_rate (default 0): enable or disable displaying of average peer upload rates on the stats page.
- bnbt_show_completed (default 0): enable or disable displaying of the number of times each torrent has been completed on the index page.
- bnbt_show_file_comment (default 1):
- bnbt_show_file_contents (default 0):
- bnbt_show_gen_time (default 1): enable or disable displaying of page generation times on some pages.
- bnbt_show_info_hash (default 0): enable or disable displaying of info hashes on the index page.
- bnbt_show_left_as_progress (default 1): enable or disable displaying of 'left percentages' as 'progress percentages'.
- bnbt_show_max_left (default 0): enable or disable displaying of maximum left percentages on the index page.
- bnbt_show_min_left (default 0): enable or disable displaying of minimum left percentages on the index page.
- bnbt_show_num_files (default 1): enable or disable displaying of the number of files (inside each torrent) on the index page.
- bnbt_show_share_ratios (default 1): enable or disable displaying of share ratios on the stats page.
- bnbt_show_size (default 1): enable or disable displaying of torrent sizes on the index page.
- bnbt_show_stats (default 1): enable or disable the stats page.
- bnbt_show_transferred (default 0): enable or disable displaying of the total bytes transferred on each torrent on the index page (total bytes transferred is calculated as completed * size).
- bnbt_show_uploader (default 0): enable or disable displaying of the username of the uploader on the index page.
- bnbt_static_footer (no default): the static footer file (this is a local path).
- bnbt_static_header (no default): the static header file (this is a local path).
- bnbt_style_sheet (no default): the style sheet (this is a URL).
- bnbt_tag_file (default "tags.bnbt"): the file to store tags, names, uploaders, and info links (this is a local path).
- bnbt_upload_dir (no default): the directory to place torrents uploaded with the torrent uploader (often the same as allowed_dir).
- bnbt_users_file (default "users.bnbt"): the file to store usernames, hashed passwords, access levels, and creation dates and times (this is a local path).
- bnbt_users_per_page (default 50): the number of users to display per page on the users page.
- dfile = (default "dstate.bnbt"): the file to store downloader and completes data (this is a local path).
- downloader_timeout_interval (default 2700): the number of seconds to wait between expiring timed out peers (this should be greater than announce_interval).
- image_bar_fill (no default):
- image_bar_trans (no default):
- keep_dead (default 0): enable or disable displaying of torrents with 0 seeders and 0 leechers on the index page.
- max_give (default 200): the maximum number of peers to include with the announce response.
- min_request_interval (default 18000): the number of seconds each client should wait between scrapes.
- parse_allowed_interval (default 0): the number of minutes to wait between parsing the allowed dir or 0 to disable parsing the allowed dir (often used with bnbt_parse_on_upload).
- port (default 6969): the port to listen on.
- response_size (default 50): the default number of peers to include with the announce response.
- save_dfile_interval (default 300): the number of seconds to wait between saving the dfile.
- show_names (default 1): enable or disable displaying of names on the index page.
- socket_timeout (default 15): the number of seconds to wait before closing inactive connections.

## MySQL Configuration Values

- mysql_database (default "bnbt"): the database BNBT will use when accessing the MySQL server.
- mysql_host (no default): the MySQL server BNBT will access (blank means default of "localhost").
- mysql_override_dstate (default 0): enable or disable per peer queries. Please see the BNBTPHP documentation.
- mysql_password (no default): the password BNBT will use when accessing the MySQL server.
- mysql_port (default 0): the port BNBT will use when accessing the MySQL server (0 means default of 3306).
- mysql_refresh_allowed_interval (default 0): the number of seconds to wait between refreshing the local copy of the ALLOWED table from MySQL. Please see the BNBTPHP documentation.
- mysql_refresh_stats_interval (default 600): the number of seconds to wait between refreshing the TORRENTS table in MySQL. Please see the BNBTPHP documentation.
- mysql_user (no default): the user BNBT will use when accessing the MySQL server.

## RSS Configuration Values

- bnbt_rss_channel_copyright (no default):
- bnbt_rss_channel_description (default "BitTorrent RSS Feed for BNBT"):
- bnbt_rss_channel_image_height (default 0):
- bnbt_rss_channel_image_url (no default):
- bnbt_rss_channel_image_width (default 0):
- bnbt_rss_channel_language (default "en-us"):
- bnbt_rss_channel_title (default "My BNBT RSS Feed"):
- bnbt_rss_channel_ttl (default 60):
- bnbt_rss_file (no default):
- bnbt_rss_file_mode (default 0):
- bnbt_rss_interval (default 30):
- bnbt_rss_limit (default 25):
- bnbt_rss_online_dir (no default):
- bnbt_rss_tracker_url (default "http://localhost:6969/"):