Configuration Parameters
Miniflux 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 ¶
DEBUG-
Toggle debug mode (increase log level).
Disabled by default.
LOG_DATE_TIME-
Show date and time in log messages.
Disabled by default.
WORKER_POOL_SIZE-
Number of background workers to refresh feeds.
Default is 5 workers.
POLLING_FREQUENCY-
Refresh interval in minutes for feeds.
Default is 60 minutes.
BATCH_SIZE-
Number of feeds to send to the queue for each interval.
Default is 10 feeds.
POLLING_SCHEDULER-
Scheduler used for polling feeds. Possible values are
round_robinorentry_frequency.The maximum number of feeds polled for a given period is subject to
POLLING_FREQUENCYandBATCH_SIZE.When
entry_frequencyis selected, the refresh 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. SCHEDULER_ENTRY_FREQUENCY_MAX_INTERVAL-
Maximum interval in minutes for the entry frequency scheduler.
Default is 24 hours.
SCHEDULER_ENTRY_FREQUENCY_MIN_INTERVAL-
Minimum interval in minutes for the entry frequency scheduler.
Default is 5 minutes.
DATABASE_URL-
Postgresql connection parameters. See lib/pq for more details.
Default is
user=postgres password=postgres dbname=miniflux2 sslmode=disable DATABASE_MAX_CONNS-
Maximum number of database connections.
Default is
20 DATABASE_MIN_CONNS-
Minimum number of database connections.
Default is
1 LISTEN_ADDR-
Address to listen on. Use absolute path for a Unix socket.
Default is
127.0.0.1:8080. PORT-
Override
LISTEN_ADDRto0.0.0.0:$PORT(Automatic configuration for PaaS).Default is empty.
BASE_URL-
Base URL to generate HTML links and base path for cookies.
Default is
http://localhost/. CLEANUP_FREQUENCY_HOURS-
Cleanup job frequency to remove old sessions and archive entries.
Default is 24 hours.
CLEANUP_ARCHIVE_UNREAD_DAYS-
Number of days after marking unread items as removed. Use
-1to disable this feature.Default is 180 days.
CLEANUP_ARCHIVE_READ_DAYS-
Number of days after which marking read items as removed. Use
-1to disable this feature.Default is 60 days.
CLEANUP_REMOVE_SESSIONS_DAYS-
Number of days after removing old user sessions from the database.
Default is 30 days.
HTTPS-
Forces cookies to use secure flag. Send HSTS HTTP header. Enabled automatically if the HTTP header
X-Forwarded-Protois set tohttps.Default is empty.
DISABLE_HSTS-
Disable HTTP Strict Transport Security header if
$HTTPSis set.Default is empty.
DISABLE_HTTP_SERVICE-
Disable HTTP service.
Default is empty.
DISABLE_SCHEDULER_SERVICE-
Disable scheduler service.
Default is empty.
CERT_FILE-
Path to SSL certificate.
Default is empty.
KEY_FILE-
Path to SSL private key.
Default is empty.
CERT_DOMAIN-
Use Let's Encrypt to get automatically a certificate for the domain specified in
$CERT_DOMAIN.Default is empty.
CERT_CACHE-
Let's Encrypt cache directory.
Default is
/tmp/cert_cache METRICS_COLLECTOR-
Set to
1to enable metrics collection. It exposes a/metricsendpoint that can be used with Prometheus Monitoring software.Disabled by default.
METRICS_REFRESH_INTERVAL-
Refresh interval to collect database metrics.
Default is 60 seconds.
METRICS_ALLOWED_NETWORKS-
List of networks allowed to access the
/metricsendpoint (comma-separated values).Default is
127.0.0.1/8. OAUTH2_PROVIDER-
OAuth2 provider. Possible values are
googleoroidcfor a generic OpenID Connect provider.Default is empty.
OAUTH2_CLIENT_ID-
OAuth2 client ID.
Default is empty.
OAUTH2_CLIENT_ID_FILE-
Path to a client ID exposed as a file, it should contain
$OAUTH2_CLIENT_IDvalue.Default is empty.
OAUTH2_CLIENT_SECRET-
OAuth2 client secret.
Default is empty.
OAUTH2_CLIENT_SECRET_FILE-
Path to a secret key exposed as a file, it should contain
$OAUTH2_CLIENT_SECRETvalue.Default is empty.
OAUTH2_REDIRECT_URL-
OAuth2 redirect URL. This URL must be registered with the provider and is something like
https://miniflux.example.org/oauth2/oidc/callbackDefault is empty.
OAUTH2_OIDC_DISCOVERY_ENDPOINT-
OpenID Connect discovery endpoint.
Default is empty.
OAUTH2_USER_CREATION-
Set to
1to authorize OAuth2 user creation.Default is empty.
RUN_MIGRATIONS-
Set to
1to run database migrations during application startup.Default is empty.
CREATE_ADMIN-
Set to
1to create an admin user from environment variables.Default is empty.
ADMIN_USERNAME-
Admin user login, it's used only if
CREATE_ADMINis enabled.Default is empty.
ADMIN_USERNAME_FILE-
Path to a secret key exposed as a file, it should contain
$ADMIN_USERNAMEvalue.Default is empty.
ADMIN_PASSWORD-
Admin user password, it's used only if
CREATE_ADMINis enabled.Default is empty.
ADMIN_PASSWORD_FILE-
Path to a secret key exposed as a file, it should contain
$ADMIN_PASSWORDvalue.Default is empty.
POCKET_CONSUMER_KEY-
Pocket consumer API key for all users.
Default is empty.
POCKET_CONSUMER_KEY_FILE-
Path to a secret key exposed as a file, it should contain
$POCKET_CONSUMER_KEYvalue.Default is empty.
PROXY_IMAGES-
Avoids mixed content warnings for external images:
http-only,all, ornone.Default is
http-only. HTTP_CLIENT_TIMEOUT-
Time limit in seconds before the HTTP client cancel the request.
Default is 20 seconds.
HTTP_CLIENT_MAX_BODY_SIZE-
Maximum body size for HTTP requests in Mebibyte (MiB).
Default is 15 MiB.
HTTP_CLIENT_PROXY-
Proxy 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.
AUTH_PROXY_HEADER-
Proxy authentication HTTP header.
Default is empty.
AUTH_PROXY_USER_CREATION-
Enable user creation based on proxy authentication information.
Default is empty.
MAINTENANCE_MODE-
Set to 1 to enable maintenance mode.
Default is empty.
MAINTENANCE_MESSAGE-
Define a custom maintenance message.
Default is empty.
Configuration File ¶
The configuration file is optional. It’s a text file that follow these rules:
- Miniflux 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/miniflux.conf to populate environment variables.
Database Connection Parameters ¶
Miniflux uses the Golang library pq to communicate with PostgreSQL. The list of connection parameters are available on this page.
The default value for DATABASE_URL is user=postgres password=postgres dbname=miniflux2 sslmode=disable.
You could also use the URL format postgres://postgres:postgres@localhost/miniflux2?sslmode=disable.
net/url: invalid userinfo.
To avoid this issue, do not use the URL format for DATABASE_URL or make sure the password is URL encoded.