All settings (see _DEFAULTS[] for default values) are listed here:
It is preferred to adjust tt-rss global configuration through the environment, i.e. defined in .env when using docker-compose setup:
# Copy this file to .env before building the container.
# Put any local modifications here.
TTRSS_SELF_URL_PATH=http://127.0.0.1/tt-rssAlternatively, you can create config.php in tt-rss root directory (copied from config.php-dist), using the following syntax:
putenv('TTRSS_DB_HOST=myserver');
putenv('TTRSS_SELF_URL_PATH=http://example.com/tt-rss');
putenv('TTRSS_SESSION_COOKIE_LIFETIME='.(86400*30));TTRSS_.classes/config.php.config.php, only the options which you’ve changed from the defaults.Legacy plugin-required constants also go to config.php, using define():
define('LEGACY_CONSTANT', 'value');To set computed values via putenv() you have to get them evaluated by PHP, this would work:
putenv('TTRSS_SESSION_COOKIE_LIFETIME='.(86400*30));However, these won’t give you expected results:
putenv("TTRSS_SESSION_COOKIE_LIFETIME='2592000'");
# => 0, because '2592000' is an invalid number
putenv('TTRSS_SESSION_COOKIE_LIFETIME=86400*30');
# => 86400, right side expression is not evaluated, instead you're casting string literal "86400*30" to integerNote that all values should be precomputed when setting via .env because they are not evaluated by PHP and used as-is.
Should have at least these options defined:
<?php
putenv('TTRSS_DB_TYPE=pgsql'); # or mysql
putenv('TTRSS_DB_HOST=mydbhost');
putenv('TTRSS_DB_USER=mydbuser');
putenv('TTRSS_DB_PASS=mydbpass');
putenv('TTRSS_DB_PORT=5432'); # or 3306
putenv('TTRSS_SELF_URL_PATH=http://example.com/tt-rss/'); # fully-qualified URL of your tt-rss install
putenv('TTRSS_PHP_EXECUTABLE=/path/to/php-cli-binary'); # normally something like /usr/bin/phpFor any config.php settings you have changed from the defaults (normally this is the DB_ group of settings and SELF_URL_PATH, replace as follows, using the rules above:
define('DB_PORT', 'xxx') → putenv('TTRSS_DB_PORT=xxx').
You can safely omit any settings that were at default values.
This thread has relevant discussion and many examples.
Sun Jun 18 03:25:02 UTC 2023