3 * @copyright Copyright (C) 2010-2021, the Friendica project
5 * @license GNU AGPL version 3 or any later version
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Affero General Public License as
9 * published by the Free Software Foundation, either version 3 of the
10 * License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Affero General Public License for more details.
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 * This file declares the default values for the base config of Friendica.
22 * These configuration values aren't accessible from the admin settings page and custom values must be set in config/local.config.php
24 * Please don't edit this file directly as its content may change in the upcoming versions.
31 // Hostname or IP address of the database server.
32 // Can contain the port number with the syntax "hostname:port".
36 // Port of the database server.
37 // Can be used instead of adding a port number to the hostname
41 // Database user name. Please don't use "root".
45 // Database user password. Please don't use empty passwords.
53 // Database connection charset. Changing this value will likely corrupt special characters.
54 'charset' => 'utf8mb4',
56 // pdo_emulate_prepares (Boolean)
57 // If enabled, the builtin emulation for prepared statements is used.
58 // This can be used as a workaround for the database error "Prepared statement needs to be re-prepared".
59 'pdo_emulate_prepares' => true,
61 // disable_pdo (Boolean)
62 // PDO is used by default (if available). Otherwise MySQLi will be used.
63 'disable_pdo' => false,
65 // persistent (Boolean)
66 // This controls if the system should use persistent connections or not.
67 // Persistent connections increase the performance.
68 // On the other hand the number of open connections are higher,
69 // this will most likely increase the system load.
70 'persistent' => false,
73 // admin_email (Comma-separated list)
74 // In order to perform system administration via the admin panel,
75 // this must precisely match the email address of the person logged in.
78 // admin_nickname (String)
79 // Nickname of the main admin user, used if there are more than one admin user defined in config => admin_email.
80 'admin_nickname' => '',
82 // max_import_size (Integer)
83 // Maximum body size of DFRN and Mail messages in characters. 0 is unlimited.
84 'max_import_size' => 200000,
87 // Location of PHP command line processor.
91 // adjust_poll_frequency (Boolean)
92 // Automatically detect and set the best feed poll frequency.
93 'adjust_poll_frequency' => false,
95 // allowed_link_protocols (Array)
96 // Allowed protocols in links URLs, add at your own risk. http(s) is always allowed.
97 'allowed_link_protocols' => ['ftp://', 'ftps://', 'mailto:', 'cid:', 'gopher://'],
99 // always_show_preview (Boolean)
100 // Only show small preview pictures.
101 'always_show_preview' => false,
103 // ap_always_bcc (Boolean)
104 // Adresses non-mentioned ActivityPub receivers by BCC instead of CC. Increases privacy, decreases performance.
105 'ap_always_bcc' => false,
107 // archival_days (Integer)
108 // Number of days that we try to deliver content before we archive a contact.
109 'archival_days' => 32,
111 // auth_cookie_lifetime (Integer)
112 // Number of days that should pass without any activity before a user who
113 // chose "Remember me" when logging in is considered logged out.
114 'auth_cookie_lifetime' => 7,
116 // big_emojis (Boolean)
117 // Display "Emoji Only" posts in big.
118 'big_emojis' => false,
120 // block_local_dir (Boolean)
121 // Deny public access to the local user directory.
122 'block_local_dir' => false,
124 // blocked_tags (String)
125 // Comma separated list of hash tags that shouldn't be displayed in the trending tags
126 'blocked_tags' => '',
128 // community_no_sharer (Boolean)
129 // Don't display sharing accounts on the global community
130 'community_no_sharer' => false,
132 // contact_update_limit (Integer)
133 // How much contacts should be checked at a time?
134 'contact_update_limit' => 100,
136 // cron_interval (Integer)
137 // Minimal period in minutes between two calls of the "Cron" worker job.
138 'cron_interval' => 5,
140 // cache_driver (database|memcache|memcached|redis|apcu)
141 // Whether to use Memcache, Memcached, Redis or APCu to store temporary cache.
142 'cache_driver' => 'database',
144 // config_adapter (jit|preload)
145 // Allow to switch the configuration adapter to improve performances at the cost of memory consumption.
146 'config_adapter' => 'jit',
148 // curl_range_bytes (Integer)
149 // Maximum number of bytes that should be fetched. Default is 0, which mean "no limit".
150 'curl_range_bytes' => 0,
152 // crawl_permit_period (Integer)
153 // Period in seconds between allowed searches when the number of free searches is reached and "permit_crawling" is activated.
154 'crawl_permit_period' => 60,
157 // Name of a logfile to log slow database queries.
160 // db_log_index (Path)
161 // Name of a logfile to log queries with bad indexes.
162 'db_log_index' => '',
164 // db_log_index_watch (Comma-separated list)
165 // Watchlist of indexes to watch.
166 'db_log_index_watch' => '',
168 // db_log_index_denylist (Comma-separated list)
169 // Deny list of indexes that shouldn't be watched.
170 'db_log_index_denylist' => '',
172 // db_loglimit (Integer)
173 // If a database call lasts longer than this value in seconds it is logged.
174 // Inactive if system => db_log is empty.
177 // db_loglimit_index (Integer)
178 // Number of index rows needed to be logged for indexes on the watchlist. 0 to disable.
179 'db_loglimit_index' => 0,
181 // db_loglimit_index_high (Integer)
182 // Number of index rows to be logged anyway (for any index). 0 to disable.
183 'db_loglimit_index_high' => 0,
185 // dbclean_expire_conversation (Integer)
186 // When DBClean is enabled, any entry in the conversation table will be deleted after this many days.
187 // This data is used for ActivityPub, so it shouldn't be lower than the average duration of a discussion.
188 'dbclean_expire_conversation' => 90,
190 // dbclean-expire-limit (Integer)
191 // This defines the number of items that are to be deleted in a single call.
192 // Reduce this value when you are getting lock issues.
193 // A value of 0 disables the deletion process.
194 'dbclean-expire-limit' => 1000,
196 // daemon_watchdog (Boolean)
197 // Enable regular checking if the daemon is running.
198 // If it is not running and hadn't been terminated normally, it will be started automatically.
199 'daemon_watchdog' => false,
201 // delete_sleeping_processes (Boolean)
202 // Periodically delete waiting database processes.
203 'delete_sleeping_processes' => false,
205 // diaspora_test (Boolean)
206 // For development only. Disables the message transfer.
207 'diaspora_test' => false,
209 // disable_email_validation (Boolean)
210 // Disables the check if a mail address is in a valid format and can be resolved via DNS.
211 'disable_email_validation' => false,
213 // disable_implicit_mentions (Boolean) since 2019.03
214 // Implicit mentions are mentions in the body of replies that are redundant in a thread-enabled system like Friendica.
215 // This config key disables the gathering of implicit mentions in incoming and outgoing posts.
216 // Also disables the default automatic removal of implicit mentions from the body of incoming posts.
217 // Also disables the default automatic addition of implicit mentions in the body of outgoing posts.
218 // Disabling implicit mentions also affects the "explicit_mentions" additional feature by limiting it
219 // to the replied-to post author mention in the comment boxes.
220 'disable_implicit_mentions' => false,
222 // disable_url_validation (Boolean)
223 // Disables the DNS lookup of an URL.
224 'disable_url_validation' => false,
226 // disable_password_exposed (Boolean)
227 // Disable the exposition check against the remote haveibeenpwned API on password change.
228 'disable_password_exposed' => false,
230 // disable_polling (Boolean)
231 // Disable the polling of DFRN and OStatus contacts through onepoll.php.
232 'disable_polling' => false,
234 // display_resharer (Boolean)
235 // Display the first resharer as icon and text on a reshared item.
236 'display_resharer' => false,
239 // location of the developer log file.
243 // restricts develop log writes to requests originating from this IP address.
246 // expire-notify-priority (integer)
247 // Priority for the expirary notification
248 'expire-notify-priority' => PRIORITY_LOW,
250 // free_crawls (Integer)
251 // Number of "free" searches when system => permit_crawling is enabled.
254 // groupedit_image_limit (Integer)
255 // Number of contacts at which the group editor should switch from display the profile pictures of the contacts to only display the names.
256 // This can alternatively be set on a per account basis in the pconfig table.
257 'groupedit_image_limit' => 400,
259 // gserver_update_limit (Integer)
260 // How much servers should be checked at a time?
261 'gserver_update_limit' => 100,
264 // Enables the sending of HTTP Strict Transport Security headers.
267 // ignore_cache (Boolean)
268 // For development only. Disables the item cache.
269 'ignore_cache' => false,
271 // insecure_imap (Boolean)
272 // If enabled, users are allowed to connect to their IMAP servers unencrypted.
273 // For security reasons this is disabled by default.
274 'insecure_imap' => false,
276 // instances_social_key (String)
277 // Key to the API of https://instances.social which retrieves data about mastodon servers.
278 // See https://instances.social/api/token to get an API key.
279 'instances_social_key' => '',
281 // ipv4_resolve (Boolean)
282 // Resolve IPV4 addresses only. Don't resolve to IPV6.
283 'ipv4_resolve' => false,
285 // invitation_only (Boolean)
286 // If set true registration is only possible after a current member of the node has send an invitation.
287 'invitation_only' => false,
289 // itemspage_network (Integer)
290 // default number of items per page in stream pages (network, community, profile/contact statuses, search)
291 'itemspage_network' => 40,
293 // itemspage_network_mobile (Integer)
294 // default number of items per page in stream pages (network, community, profile/contact statuses, search)
295 // on detected mobile devices
296 'itemspage_network_mobile' => 20,
298 // like_no_comment (Boolean)
299 // Don't update the "commented" value of an item when it is liked.
300 'like_no_comment' => false,
302 // local_block (Boolean)
303 // Used in conjunction with "block_public".
304 'local_block' => false,
306 // local_search (Boolean)
307 // Blocks search for users who are not logged in to prevent crawlers from blocking your system.
308 'local_search' => false,
310 // local_tags (Boolean)
311 // If activated, all hashtags will point to the local server.
312 'local_tags' => false,
314 // logger_config (String)
315 // Sets the logging adapter of Friendica globally (monolog, syslog, stream)
316 'logger_config' => 'stream',
318 // maintenance_start (String)
319 // Start of the window for the daily maintenance cron call.
320 // The system timezone is used when no timezone is defined here.
321 'maintenance_start' => '01:00 +00:00',
323 // maintenance_end (String)
324 // End of the window for the daily maintenance cron call
325 // The system timezone is used when no timezone is defined here.
326 'maintenance_end' => '03:00 +00:00',
328 // max_batch_queue (Integer)
329 // Maximum number of batched queue items for a single contact before subsequent messages are discarded.
330 'max_batch_queue' => 1000,
332 // max_connections (Integer)
333 // The maximum number of database connections which can be in use before the worker process is deferred to its next interval.
334 // When the system can't detect the maximum numbers of connection then this value can be used. Use 0 for auto-detection.
335 'max_connections' => 0,
337 // max_connections_level (Integer 0-100)
338 // The maximum percentage of connections that are allowed to let the worker start.
339 'max_connections_level' => 75,
341 // max_contact_queue (Integer)
342 // Maximum number of queue items for a single contact before subsequent messages are discarded.
343 'max_contact_queue' => 500,
345 // max_csv_file_size (Integer)
346 // When uploading a CSV with account addresses to follow
347 // in the user settings, this controls the maximum file
348 // size of the upload file.
349 'max_csv_file_size' => 30720,
351 // max_feed_items (Integer)
352 // Maximum number of feed items that are fetched and processed. For unlimited items set to 0.
353 'max_feed_items' => 20,
355 // max_image_length (Integer)
356 // An alternate way of limiting picture upload sizes.
357 // Specify the maximum pixel length that pictures are allowed to be (for non-square pictures, it will apply to the longest side).
358 // Pictures longer than this length will be resized to be this length (on the longest side, the other side will be scaled appropriately).
359 // If you don't want to set a maximum length, set to -1.
360 'max_image_length' => -1,
362 // max_processes_backend (Integer)
363 // Maximum number of concurrent database processes for background tasks.
364 'max_processes_backend' => 5,
366 // max_processes_frontend (Integer)
367 // Maximum number of concurrent database processes for foreground tasks.
368 'max_processes_frontend' => 20,
370 // maximagesize (Integer)
371 // Maximum size in bytes of an uploaded photo.
372 'maximagesize' => 800000,
374 // memcache_host (String)
375 // Host name of the memcache daemon.
376 'memcache_host' => '127.0.0.1',
378 // memcache_port (Integer)
379 // Port number of the memcache daemon.
380 'memcache_port' => 11211,
382 // memcached_hosts (Array)
383 // Array of Memcached servers info [host, port(, weight)], see Memcached::addServers.
384 'memcached_hosts' => [
385 ['127.0.0.1', '11211'],
388 // min_poll_interval (Integer)
389 // minimal distance in minutes between two polls for a contact. Reasonable values are between 1 and 59.
390 'min_poll_interval' => 15,
392 // minimum_posting_interval (Integer)
393 // Minimum interval between two feed posts per user
394 'minimum_posting_interval' => 0,
396 // no_count (Boolean)
397 // Don't do count calculations (currently only when showing photo albums).
400 // no_oembed (Boolean)
401 // Don't use OEmbed to fetch more information about a link.
402 'no_oembed' => false,
404 // no_redirect_list (Array)
405 // List of domains where HTTP redirects should be ignored.
406 'no_redirect_list' => [],
408 // no_smilies (Boolean)
409 // Don't show smilies.
410 'no_smilies' => false,
412 // paranoia (Boolean)
413 // Log out users if their IP address changed.
416 // permit_crawling (Boolean)
417 // Restricts the search for not logged in users to one search per minute.
418 'permit_crawling' => false,
421 // Daemon pid file path. For example: pidfile = /path/to/daemon.pid
424 // png_quality (Integer)
425 // Sets the ImageMagick compression level for PNG images. Values ranges from 0 (uncompressed) to 9 (most compressed).
428 // profiler (Boolean)
429 // Enable internal timings to help optimize code. Needed for "rendertime" addon.
432 // proxy_cache_time (Integer)
433 // Period in seconds after which the cache is cleared.
434 'proxy_cache_time' => 86400,
436 // pushpoll_frequency (Integer)
437 // Frequency of contact poll for subhub contact using the DFRM or OStatus network.
444 // - 0 = every minute
445 'pushpoll_frequency' => 3,
447 // redis_host (String)
448 // Host name of the redis daemon.
449 'redis_host' => '127.0.0.1',
451 // redis_port (String)
452 // Port number of the redis daemon.
453 'redis_port' => 6379,
455 // redis_db (Integer)
456 // The sub-database of redis (0 - 15 possible sub-databases)
459 // redis_password (String)
460 // The authentication password for the redis database
461 'redis_password' => null,
463 // session_handler (database|cache|native)
464 // Whether to use Cache to store session data or to use PHP native session storage.
465 'session_handler' => 'database',
467 // remote_avatar_lookup (Boolean)
468 // Perform an avatar lookup via the activated services for remote contacts
469 'remote_avatar_lookup' => false,
471 // remove_multiplicated_lines (Boolean)
472 // If enabled, multiple linefeeds in items are stripped to a single one.
473 'remove_multiplicated_lines' => false,
475 // sendmail_params (Boolean)
476 // Normal sendmail command parameters will be added when the PHP mail() function is called for sending e-mails.
477 // This ensures the Sender Email address setting is applied to the message envelope rather than the host's default address.
478 // Set to false if your non-sendmail agent is incompatible, or to restore old behavior of using the host address.
479 'sendmail_params' => true,
481 // show_global_community_hint (Boolean)
482 // When the global community page is enabled, use this option to display a hint above the stream, that this is a collection of all public top-level postings that arrive on your node.
483 'show_global_community_hint' => false,
485 // show_received (Boolean)
486 // Show the receive data along with the post creation date
487 'show_received' => true,
489 // show_received_seconds (Integer)
490 // Display the received date when the difference between received and created is higher than this.
491 'show_received_seconds' => 500,
493 // show_unsupported_addons (Boolean)
494 // Show all addons including the unsupported ones.
495 'show_unsupported_addons' => false,
497 // show_unsupported_themes (Boolean)
498 // Show all themes including the unsupported ones.
499 'show_unsupported_themes' => false,
501 // throttle_limit_day (Integer)
502 // Maximum number of posts that a user can send per day with the API. 0 to disable daily throttling.
503 'throttle_limit_day' => 0,
505 // throttle_limit_week (Integer)
506 // Maximum number of posts that a user can send per week with the API. 0 to disable weekly throttling.
507 'throttle_limit_week' => 0,
509 // throttle_limit_month (Integer)
510 // Maximum number of posts that a user can send per month with the API. 0 to disable monthly throttling.
511 'throttle_limit_month' => 0,
513 // update_active_contacts (Boolean)
514 // When activated, only public contacts will be activated regularly that are used for example in items or tags.
515 'update_active_contacts' => false,
517 // username_min_length (Integer)
518 // The minimum character length a username can be.
519 // This length is check once the username has been trimmed and multiple spaces have been collapsed into one.
520 // Minimum for this config value is 1. Maximum is 64 as the resulting profile URL mustn't be longer than 255 chars.
521 'username_min_length' => 3,
523 // username_max_length (Integer)
524 // The maximum character length a username can be.
525 // This length is check once the username has been trimmed and multiple spaces have been collapsed into one.
526 // Minimum for this config value is 1. Maximum is 64 as the resulting profile URL mustn't be longer than 255 chars.
527 'username_max_length' => 48,
529 // worker_cooldown (Integer)
530 // Cooldown period in seconds after each worker function call.
531 'worker_cooldown' => 0,
533 // worker_debug (Boolean)
534 // If enabled, it prints out the number of running processes split by priority.
535 'worker_debug' => false,
537 // worker_fetch_limit (Integer)
538 // Number of worker tasks that are fetched in a single query.
539 'worker_fetch_limit' => 1,
541 // worker_fork (Boolean)
542 // Experimental setting. Use pcntl_fork to spawn a new worker process.
543 // Does not work when "worker_multiple_fetch" is enabled (Needs more testing)
544 'worker_fork' => false,
546 // worker_jpm (Boolean)
547 // If enabled, it prints out the jobs per minute.
548 'worker_jpm' => false,
550 // worker_jpm_range (String)
551 // List of minutes for the jobs per minute (JPM) calculation
552 'worker_jpm_range' => '1, 10, 60',
554 // worker_load_exponent (Integer)
555 // Default 3, which allows only 25% of the maximum worker queues when server load reaches around 37% of maximum load.
556 // For a linear response where 25% of worker queues are allowed at 75% of maximum load, set this to 1.
557 // Setting 0 would allow maximum worker queues at all times, which is not recommended.
558 'worker_load_exponent' => 3,
560 // worker_multiple_fetch (Boolean)
561 // When activated, the worker fetches jobs for multiple workers (not only for itself).
562 // This is an experimental setting without knowing the performance impact.
563 // Does not work when "worker_fork" is enabled (Needs more testing)
564 'worker_multiple_fetch' => false,
566 // worker_defer_limit (Integer)
567 // Per default the systems tries delivering for 15 times before dropping it.
568 'worker_defer_limit' => 15,
570 // xrd_timeout (Integer)
571 // Timeout in seconds for fetching the XRD links.
575 // exp_themes (Boolean)
576 // Show experimental themes in user settings.
577 'exp_themes' => false,
580 // hide_eventlist (Boolean)
581 // Don't show the birthdays and events on the profile and network page.
582 'hide_eventlist' => false,
586 // Enable debug level for the jabber account synchronisation.
589 // Must be writable by the ejabberd process. if set then it will prevent the running of multiple processes.
593 // ap_inbox_log (Boolean)
594 // Logs every call to /inbox as a JSON file in Friendica's temporary directory
595 'ap_inbox_log' => false,
597 // show_direction (Boolean)
598 // Display if a post had been fetched or had been pushed towards our server
599 'show_direction' => false,
601 // total_ap_delivery (Boolean)
602 // Deliver via AP to every possible receiver and we suppress the delivery to these contacts with other protocols
603 'total_ap_delivery' => false,