Configuration Parameters
Noflux can use a configuration file and environment variables.
The configuration file is loaded first if specified. Environment variables takes precedence over the options defined in the configuration file.
Configuration Options ¶
ADMIN_PASSWORDAdmin user password, it's used only if
CREATE_ADMINis enabled.Default is empty.
ADMIN_PASSWORD_FILEPath to a secret key exposed as a file, it should contain
$ADMIN_PASSWORDvalue.Default is empty.
ADMIN_USERNAMEAdmin user login, it's used only if
CREATE_ADMINis enabled.Default is empty.
ADMIN_USERNAME_FILEPath to a secret key exposed as a file, it should contain
$ADMIN_USERNAMEvalue.Default is empty.
AUTH_PROXY_HEADERProxy authentication HTTP header.
Default is empty.
AUTH_PROXY_USER_CREATIONEnable user creation based on proxy authentication information.
Default is empty.
BASE_URLBase URL to generate HTML links and base path for cookies.
Default is
http://localhost/.BATCH_SIZEThe maximum number of feeds to send to the work queue for each polling interval.
The actual number of feeds added to the work queue is subject to the scheduler.
Default is 100.
CERT_DOMAINUse Let's Encrypt to get automatically a certificate for the domain specified in
$CERT_DOMAIN.Default is empty.
CERT_FILEPath to SSL certificate.
Default is empty.
CLEANUP_ARCHIVE_BATCH_SIZENumber of entries to archive for each job interval.
Default is 10000 entries.
CLEANUP_ARCHIVE_READ_DAYSNumber of days after which marking read items as removed. Use
-1to disable this feature.Default is 60 days.
CLEANUP_ARCHIVE_UNREAD_DAYSNumber of days after marking unread items as removed. Use
-1to disable this feature.Default is 180 days.
CLEANUP_FREQUENCY_HOURSCleanup job frequency to remove old sessions and archive entries.
Default is 24 hours.
CLEANUP_REMOVE_SESSIONS_DAYSNumber of days after removing old user sessions from the database.
Default is 30 days.
CREATE_ADMINSet to
1to create an admin user from environment variables.Default is empty.
DATABASE_CONNECTION_LIFETIMESet the maximum amount of time a connection may be reused.
Default is 5 minutes
DATABASE_MAX_CONNSMaximum number of database connections.
Default is
20DATABASE_MIN_CONNSMinimum number of database connections.
Default is
1DATABASE_URLPostgresql connection parameters. See lib/pq for more details.
Default is
user=postgres password=postgres dbname=noflux sslmode=disableDATABASE_URL_FILEPath to a secret key exposed as a file, it should contain
$DATABASE_URLvalue.Default is empty.
DISABLE_HSTSDisable HTTP Strict Transport Security header if
$HTTPSis set.Default is empty.
DISABLE_HTTP_SERVICEDisable HTTP service.
Default is empty.
DISABLE_LOCAL_AUTHDisable local authentication.
When set to true, the username/password form is hidden from the login screen, and the options to change username/password or unlink OAuth2 account are hidden from the settings page.
Default is empty.
DISABLE_SCHEDULER_SERVICEDisable scheduler service.
Default is empty.
FETCH_BILIBILI_WATCH_TIMESet the value to 1 to scrape video duration from Bilibili website and use it as a reading time.
Disabled by default.
FETCH_NEBULA_WATCH_TIMESet the value to 1 to scrape video duration from Nebula website and use it as a reading time.
Disabled by default.
FETCH_ODYSEE_WATCH_TIMESet the value to 1 to scrape video duration from Odysee website and use it as a reading time.
Disabled by default.
FETCH_YOUTUBE_WATCH_TIMESet the value to 1 to scrape video duration from YouTube website and use it as a reading time.
Disabled by default.
FILTER_ENTRY_MAX_AGE_DAYSNumber of days after which new entries should be retained. Set 7 to fetch only entries 7 days old.
Default is 30 days.
FORCE_REFRESH_INTERVALThe minimum interval for manual refresh.
Default is 30 minutes.
HTTP_CLIENT_MAX_BODY_SIZEMaximum body size for HTTP requests in Mebibyte (MiB).
Default is 15 MiB.
HTTP_CLIENT_PROXYProxy URL for the HTTP client. For example:
http://127.0.0.1:8888.This proxy is used only when the feed has the option "Fetch via proxy" enabled.
If you prefer to have a proxy for all outgoing requests, use the environment variables
HTTP_PROXYorHTTPS_PROXY, look at the official Golang documentation for more details.Default is empty.
HTTP_CLIENT_TIMEOUTTime limit in seconds before the HTTP client cancel the request.
Default is 20 seconds.
HTTP_CLIENT_USER_AGENTThe default User-Agent header to use for the HTTP client. Can be overridden in per-feed settings. When empty, Noflux uses a default User-Agent that includes the Noflux version.
Default is empty.
HTTP_SERVER_TIMEOUTTime limit in seconds before the HTTP client cancel the request.
Default is 300 seconds.
HTTPSForces cookies to use secure flag and send HSTS header.
Default is empty.
INVIDIOUS_INSTANCESet a custom invidious instance to use.
Default is yewtu.be.
KEY_FILEPath to SSL private key.
Default is empty.
LISTEN_ADDRAddress to listen on. Use absolute path for a Unix socket.
Default is
127.0.0.1:8080.LOG_DATE_TIMEShow date and time in log messages.
Disabled by default.
LOG_FILESupported values are
stderr,stdout, or a file name.Default is
stderr.LOG_FORMATSupported log formats are
textorjson.Default is
text.LOG_LEVELSupported values are
debug,info,warning, orerror.Default is
info.MAINTENANCE_MESSAGEDefine a custom maintenance message.
Default is empty.
MAINTENANCE_MODESet to 1 to enable maintenance mode. Maintenance mode disables the web ui and show a text message to the users.
Default is empty.
MEDIA_PROXY_CUSTOM_URLSets a server to proxy media through.
Default is empty, noflux does the proxying.
MEDIA_PROXY_HTTP_CLIENT_TIMEOUTTime limit in seconds before the proxy HTTP client cancel the request.
Default is 120 seconds.
MEDIA_PROXY_RESOURCE_TYPESA comma-separated list of media types to proxify. Supported values are:
image,audio,video.Default is
image.MEDIA_PROXY_MODEAvoids mixed content warnings for external media. Possible values:
http-only,all, ornone.Default is
http-only.MEDIA_PROXY_PRIVATE_KEYSet a custom custom private key used to sign proxified media URLs.
By default, a secret key is randomly generated during startup.
METRICS_ALLOWED_NETWORKSList of networks allowed to access the
/metricsendpoint (comma-separated values).Default is
127.0.0.1/8.METRICS_COLLECTORSet to
1to enable metrics collection. It exposes a/metricsendpoint that can be used with Prometheus Monitoring software.Disabled by default.
METRICS_PASSWORDMetrics endpoint password for basic HTTP authentication.
Default is empty.
METRICS_PASSWORD_FILEPath to a file that contains the password for the metrics endpoint HTTP authentication.
Default is empty.
METRICS_REFRESH_INTERVALRefresh interval to collect database metrics.
Default is 60 seconds.
METRICS_USERNAMEMetrics endpoint username for basic HTTP authentication.
Default is empty.
METRICS_USERNAME_FILEPath to a file that contains the username for the metrics endpoint HTTP authentication.
Default is empty.
OAUTH2_CLIENT_IDOAuth2 client ID.
Default is empty.
OAUTH2_CLIENT_ID_FILEPath to a client ID exposed as a file, it should contain
$OAUTH2_CLIENT_IDvalue.Default is empty.
OAUTH2_CLIENT_SECRETOAuth2 client secret.
Default is empty.
OAUTH2_CLIENT_SECRET_FILEPath to a secret key exposed as a file, it should contain
$OAUTH2_CLIENT_SECRETvalue.Default is empty.
OAUTH2_OIDC_DISCOVERY_ENDPOINTOpenID Connect discovery endpoint.
Note that the OIDC library automatically appends the
.well-known/openid-configuration, this part has to be removed from the URL when settingOAUTH2_OIDC_DISCOVERY_ENDPOINT.Default is empty.
OAUTH2_OIDC_PROVIDER_NAMEName to display for the OIDC provider.
Default is OpenID Connect.
OAUTH2_PROVIDEROAuth2 provider. Possible values are
googleoroidcfor a generic OpenID Connect provider.Default is empty.
OAUTH2_REDIRECT_URLOAuth2 redirect URL. This URL must be registered with the provider and is something like
https://noflux.example.org/oauth2/oidc/callbackDefault is empty.
OAUTH2_USER_CREATIONSet to
1to authorize OAuth2 user creation.Default is empty.
POCKET_CONSUMER_KEYPocket consumer API key for all users.
Default is empty.
POCKET_CONSUMER_KEY_FILEPath to a secret key exposed as a file, it should contain
$POCKET_CONSUMER_KEYvalue.Default is empty.
POLLING_FREQUENCYThe interval in minutes that noflux adds qualified feeds to the work queue.
Default is 60 minutes.
POLLING_PARSING_ERROR_LIMITThe maximum number of parsing errors that the program will try before stopping polling a feed. Once the limit is reached, the user must refresh the feed manually. Set to 0 for unlimited.
Default is 3.
POLLING_SCHEDULERScheduler used for polling feeds. Possible values are
round_robinorentry_frequency.The scheduler does not alter the polling interval, instead it throttles the number of qualified feeds for polling. The feeds will be added to the work queue, when the current time exceeds the targeting refreshing time. The maximum number of feeds polled for a given period is subject to
POLLING_FREQUENCYandBATCH_SIZE.When
entry_frequencyis selected, the targeting refreshing interval for a given feed is equal to the average updating interval of the last week of the feed. The actual number of feeds polled will not exceed the maximum number of feeds that could be polled for a given period.Default is
round_robin.PORTOverride
LISTEN_ADDRto0.0.0.0:$PORT(Automatic configuration for PaaS).Default is empty.
RUN_MIGRATIONSSet to
1to run database migrations during application startup.Default is empty.
SCHEDULER_ENTRY_FREQUENCY_FACTORFactor to increase refresh frequency for the entry frequency scheduler.
Default is 1.
SCHEDULER_ENTRY_FREQUENCY_MAX_INTERVALMaximum interval in minutes for the entry frequency scheduler.
Default is 24 hours.
SCHEDULER_ENTRY_FREQUENCY_MIN_INTERVALMinimum interval in minutes for the entry frequency scheduler.
Default is 5 minutes.
SCHEDULER_ROUND_ROBIN_MIN_INTERVALMinimum interval in minutes for the round robin scheduler.
Default is 60 minutes.
SERVER_TIMING_HEADERSet the value to 1 to enable server-timing headers.
Default is empty.
WATCHDOGEnable or disable Systemd watchdog.
Enabled by default.
WEBAUTHNEnable or disable WebAuthn/Passkey authentication.
You must enter the username on the login page if you are using a security key (also known as non-resident key in the WebAuthn protocol). This is not required for Passkeys which are discoverable credentials stored in the platform secure enclave, or in a trusted platform module (TPM).
Default is disabled
WORKER_POOL_SIZENumber of background workers to refresh feeds. Workers fetch information of feeds from a work queue.
Default is 5 workers.
YOUTUBE_API_KEYYouTube API key for use with
FETCH_YOUTUBE_WATCH_TIME. If non-empty, the duration will be fetched from the YouTube API. Otherwise, the duration will be fetched from the YouTube website.Default is empty.
YOUTUBE_EMBED_URL_OVERRIDEYouTube URL which will be used for embeds.
Default is https://www.youtube-nocookie.com/embed/
Configuration File ¶
The configuration file is optional. It’s a text file that follow these rules:
- Noflux expects each line to be in
KEY=VALUEformat. - Lines beginning with
#are processed as comments and ignored. - Blank lines are ignored.
- There is no variable interpolation.
Keys are the same as the environment variables described above.
Example:
DEBUG=on
WORKER_POOL_SIZE=20
Environment variables override the values defined in the config file.
To specify a configuration file, use the command line argument -config-file or -c.
You can also dump interpreted values with the flag -config-dump for debugging.
Systemd uses the file /etc/noflux.conf to populate environment variables.