From 4c0f5cb9161e09276e51f45a8b55f0381b08a6f5 Mon Sep 17 00:00:00 2001 From: fox Date: Tue, 26 Feb 2019 05:32:55 +0000 Subject: Update page 'UpdatingFeeds' --- UpdatingFeeds.md | 162 +++++++++++++++++++++++++++---------------------------- 1 file changed, 78 insertions(+), 84 deletions(-) (limited to 'UpdatingFeeds.md') diff --git a/UpdatingFeeds.md b/UpdatingFeeds.md index 0c7c08a..52e4d20 100644 --- a/UpdatingFeeds.md +++ b/UpdatingFeeds.md @@ -1,84 +1,78 @@ -Updating Feeds -============== - -You have to setup one of this methods before you can start using tt-rss -properly, otherwise your feeds won’t be updated. - -Run update daemon if you are allowed to run background processes on your -tt-rss machine. Otherwise, use one of the other methods. On Debian, -official packages have cronjob-based updating setup out of the box. - -Update daemon -------------- - -**This is the recommended way to update feeds**. Please use it if you -have access to PHP command line interpreter and can run background processes. You -can run single-process update daemon or update\_daemon2.php -(multi-process, runs several update tasks in parallel) using PHP CLI -interpreter. Do not use PHP CGI binary to run command line scripts. - -Please do not ever run update daemon or any PHP processes as root. It is -recommended, but not required, to run the daemon under your website user -id (usually www-data, apache or something like that) to prevent file -ownership issues. - -Run: php ./update.php --daemon (single process) or php ./update\_daemon2.php (multi-process) - -The script doesn’t daemonize (e.g. detach from the terminal). - -### Running under systemd - -You can setup the daemon as a simple systemd service like this: - -```ini -[Unit] -Description=ttrss_backend -After=network.target mysql.service postgresql.service - -[Service] -User=www-data -ExecStart=/path/to/tt-rss/update_daemon2.php - -[Install] -WantedBy=multi-user.target -``` - -Use journalctl -u ttrss_backend to look through daemon console -output. - -Periodical updating from crontab, using update script (update.php --feeds) -------------------------------------------------------------------------- - -Use this if you have access to PHP command line interpreter but not -allowed (e.g. by your hosting provider) to run persistent background -processes. Do not try to run cronjobs with a PHP CGI binary, it’s not -going to work. If you see HTTP headers being displayed when you run -php ./update.php you are using an incorrect binary. - -Full example (see man 5 crontab for more information on the syntax): - - */30 * * * * /usr/bin/php /path/to/tt-rss/update.php --feeds --quiet - -Notes: - -- /usr/bin/php should be replaced with the correct path - to PHP CLI binary on your system. If you are not sure which binary - or what path to use, ask your hosting provider. -- Try the command using shell if possible to check if it works before - setting up the cronjob. - -Simple background updates (since version:1.7.0) ------------------------------------------------ - -If all else fails and you can’t use any of the above methods, you can -enable simple update mode where tt-rss will try to periodically update -feeds while it is open in your web browser. Obviously, no updates will -happen when tt-rss is not open or your computer is not running. - -To enable this mode, set constant SIMPLE\_UPDATE\_MODE to -true in config.php. - -Note that only main tt-rss UI supports this, if you have digest or -mobile open or use an API client (for example, android application), -feeds are not going to be updated. You absolutely have to have tt-rss -open in a browser tab on a running computer somewhere. +You **have** to setup one of this methods before you can start using tt-rss +properly, otherwise your feeds won’t be updated. + +Run update daemon if you are allowed to run background processes on your +tt-rss machine. Otherwise, use one of the other methods. On Debian, +official packages have cronjob-based updating setup out of the box. + +## Update daemon + +**This is the recommended way to update feeds**. Please use it if you +have access to PHP command line interpreter and can run background processes. You +can run single-process update daemon or update\_daemon2.php +(multi-process, runs several update tasks in parallel) using PHP CLI +interpreter. Do not use PHP CGI binary to run command line scripts. + +Please do not ever run update daemon or any PHP processes as root. It is +recommended, but not required, to run the daemon under your website user +id (usually www-data, apache or something like that) to prevent file +ownership issues. + +Run: php ./update.php --daemon (single process) or php ./update\_daemon2.php (multi-process) + +Script doesn’t daemonize (e.g. detach from the terminal). + +### Running under systemd + +You can setup the daemon as a simple systemd service like this: + +```ini +[Unit] +Description=ttrss_backend +After=network.target mysql.service postgresql.service + +[Service] +User=www-data +ExecStart=/path/to/tt-rss/update_daemon2.php + +[Install] +WantedBy=multi-user.target +``` + +Use journalctl -u ttrss_backend to look through daemon console +output. + +## Periodical updating from crontab, using update script (update.php --feeds) + +Use this if you have access to PHP command line interpreter but not +allowed (e.g. by your hosting provider) to run persistent background +processes. Do not try to run cronjobs with a PHP CGI binary, it’s not +going to work. If you see HTTP headers being displayed when you run +php ./update.php you are using an incorrect binary. + +Full example (see man 5 crontab for more information on the syntax): + + */30 * * * * /usr/bin/php /path/to/tt-rss/update.php --feeds --quiet + +Notes: + +- /usr/bin/php should be replaced with the correct path + to PHP CLI binary on your system. If you are not sure which binary + or what path to use, ask your hosting provider. +- Try the command using shell if possible to check if it works before + setting up the cronjob. + +## Simple background updates + +If all else fails and you can’t use any of the above methods, you can +enable simple update mode where tt-rss will try to periodically update +feeds while it is open in your web browser. Obviously, no updates will +happen when tt-rss is not open or your computer is not running. + +To enable this mode, set constant SIMPLE\_UPDATE\_MODE to +true in config.php. + +Note that only main tt-rss UI supports this, if you have digest or +mobile open or use an API client (for example, android application), +feeds are not going to be updated. You absolutely have to have tt-rss +open in a browser tab on a running computer somewhere. -- cgit v1.2.3