3 * @copyright Copyright (C) 2010-2022, 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 // Socket of the database server.
42 // Can be used instead of adding a socket location to the hostname
46 // Database user name. Please don't use "root".
50 // Database user password. Please don't use empty passwords.
58 // Database connection charset. Changing this value will likely corrupt special characters.
59 'charset' => 'utf8mb4',
61 // pdo_emulate_prepares (Boolean)
62 // If enabled, the builtin emulation for prepared statements is used.
63 // This can be used as a workaround for the database error "Prepared statement needs to be re-prepared".
64 'pdo_emulate_prepares' => true,
66 // disable_pdo (Boolean)
67 // PDO is used by default (if available). Otherwise MySQLi will be used.
68 'disable_pdo' => false,
70 // persistent (Boolean)
71 // This controls if the system should use persistent connections or not.
72 // Persistent connections increase the performance.
73 // On the other hand the number of open connections are higher,
74 // this will most likely increase the system load.
75 'persistent' => false,
78 // admin_email (Comma-separated list)
79 // In order to perform system administration via the admin panel,
80 // this must precisely match the email address of the person logged in.
83 // admin_nickname (String)
84 // Nickname of the main admin user, used if there are more than one admin user defined in config => admin_email.
85 'admin_nickname' => '',
87 // max_import_size (Integer)
88 // Maximum body size of DFRN and Mail messages in characters. 0 is unlimited.
89 'max_import_size' => 200000,
92 // Location of PHP command line processor.
96 // adjust_poll_frequency (Boolean)
97 // Automatically detect and set the best feed poll frequency.
98 'adjust_poll_frequency' => false,
100 // allowed_link_protocols (Array)
101 // Allowed protocols in links URLs, add at your own risk. http(s) is always allowed.
102 'allowed_link_protocols' => ['ftp://', 'ftps://', 'mailto:', 'cid:', 'gopher://'],
104 // always_show_preview (Boolean)
105 // Only show small preview pictures.
106 'always_show_preview' => false,
108 // ap_always_bcc (Boolean)
109 // Adresses non-mentioned ActivityPub receivers by BCC instead of CC. Increases privacy, decreases performance.
110 'ap_always_bcc' => false,
112 // archival_days (Integer)
113 // Number of days that we try to deliver content before we archive a contact.
114 'archival_days' => 32,
116 // auth_cookie_lifetime (Integer)
117 // Number of days that should pass without any activity before a user who
118 // chose "Remember me" when logging in is considered logged out.
119 'auth_cookie_lifetime' => 7,
121 // big_emojis (Boolean)
122 // Display "Emoji Only" posts in big.
123 'big_emojis' => false,
125 // block_local_dir (Boolean)
126 // Deny public access to the local user directory.
127 'block_local_dir' => false,
129 // blocked_tags (String)
130 // Comma separated list of hash tags that shouldn't be displayed in the trending tags
131 'blocked_tags' => '',
133 // community_no_sharer (Boolean)
134 // Don't display sharing accounts on the global community
135 'community_no_sharer' => false,
137 // contact_update_limit (Integer)
138 // How much contacts should be checked at a time?
139 'contact_update_limit' => 100,
141 // cron_interval (Integer)
142 // Minimal period in minutes between two calls of the "Cron" worker job.
143 'cron_interval' => 5,
145 // cache_driver (database|memcache|memcached|redis|apcu)
146 // Whether to use Memcache, Memcached, Redis or APCu to store temporary cache.
147 'cache_driver' => 'database',
149 // distributed_cache_driver (database|memcache|memcached|redis)
150 // Whether to use database, Memcache, Memcached or Redis as a distributed cache.
151 'distributed_cache_driver' => 'database',
153 // config_adapter (jit|preload)
154 // Allow to switch the configuration adapter to improve performances at the cost of memory consumption.
155 'config_adapter' => 'jit',
157 // curl_range_bytes (Integer)
158 // Maximum number of bytes that should be fetched. Default is 0, which mean "no limit".
159 'curl_range_bytes' => 0,
161 // crawl_permit_period (Integer)
162 // Period in seconds between allowed searches when the number of free searches is reached and "permit_crawling" is activated.
163 'crawl_permit_period' => 60,
166 // Name of a logfile to log slow database queries.
169 // db_log_index (Path)
170 // Name of a logfile to log queries with bad indexes.
171 'db_log_index' => '',
173 // db_log_index_watch (Comma-separated list)
174 // Watchlist of indexes to watch.
175 'db_log_index_watch' => '',
177 // db_log_index_denylist (Comma-separated list)
178 // Deny list of indexes that shouldn't be watched.
179 'db_log_index_denylist' => '',
181 // db_loglimit (Integer)
182 // If a database call lasts longer than this value in seconds it is logged.
183 // Inactive if system => db_log is empty.
186 // db_loglimit_index (Integer)
187 // Number of index rows needed to be logged for indexes on the watchlist. 0 to disable.
188 'db_loglimit_index' => 0,
190 // db_loglimit_index_high (Integer)
191 // Number of index rows to be logged anyway (for any index). 0 to disable.
192 'db_loglimit_index_high' => 0,
194 // dbclean_expire_conversation (Integer)
195 // When DBClean is enabled, any entry in the conversation table will be deleted after this many days.
196 // This data is used for ActivityPub, so it shouldn't be lower than the average duration of a discussion.
197 'dbclean_expire_conversation' => 90,
199 // dbclean-expire-limit (Integer)
200 // This defines the number of items that are to be deleted in a single call.
201 // Reduce this value when you are getting lock issues.
202 // A value of 0 disables the deletion process.
203 'dbclean-expire-limit' => 1000,
205 // daemon_watchdog (Boolean)
206 // Enable regular checking if the daemon is running.
207 // If it is not running and hadn't been terminated normally, it will be started automatically.
208 'daemon_watchdog' => false,
210 // delete_sleeping_processes (Boolean)
211 // Periodically delete waiting database processes.
212 'delete_sleeping_processes' => false,
214 // dice_profiler_threshold (Float)
215 // For profiling Dice class creation (0 = disabled, >0 = seconds threshold for profiling)
216 'dice_profiler_threshold' => 0.5,
218 // diaspora_test (Boolean)
219 // For development only. Disables the message transfer.
220 'diaspora_test' => false,
222 // disable_email_validation (Boolean)
223 // Disables the check if a mail address is in a valid format and can be resolved via DNS.
224 'disable_email_validation' => false,
226 // disable_implicit_mentions (Boolean) since 2019.03
227 // Implicit mentions are mentions in the body of replies that are redundant in a thread-enabled system like Friendica.
228 // This config key disables the gathering of implicit mentions in incoming and outgoing posts.
229 // Also disables the default automatic removal of implicit mentions from the body of incoming posts.
230 // Also disables the default automatic addition of implicit mentions in the body of outgoing posts.
231 // Disabling implicit mentions also affects the "explicit_mentions" additional feature by limiting it
232 // to the replied-to post author mention in the comment boxes.
233 'disable_implicit_mentions' => false,
235 // disable_url_validation (Boolean)
236 // Disables the DNS lookup of an URL.
237 'disable_url_validation' => false,
239 // disable_password_exposed (Boolean)
240 // Disable the exposition check against the remote haveibeenpwned API on password change.
241 'disable_password_exposed' => false,
243 // disable_polling (Boolean)
244 // Disable the polling of DFRN and OStatus contacts through onepoll.php.
245 'disable_polling' => false,
247 // display_resharer (Boolean)
248 // Display the first resharer as icon and text on a reshared item.
249 'display_resharer' => false,
252 // location of the developer log file.
256 // restricts develop log writes to requests originating from this IP address.
259 // expire-notify-priority (integer)
260 // Priority for the expirary notification
261 'expire-notify-priority' => PRIORITY_LOW,
263 // free_crawls (Integer)
264 // Number of "free" searches when system => permit_crawling is enabled.
267 // groupedit_image_limit (Integer)
268 // Number of contacts at which the group editor should switch from display the profile pictures of the contacts to only display the names.
269 // This can alternatively be set on a per account basis in the pconfig table.
270 'groupedit_image_limit' => 400,
272 // gserver_update_limit (Integer)
273 // How much servers should be checked at a time?
274 'gserver_update_limit' => 100,
277 // Enables the sending of HTTP Strict Transport Security headers.
280 // ignore_cache (Boolean)
281 // For development only. Disables the item cache.
282 'ignore_cache' => false,
284 // insecure_imap (Boolean)
285 // If enabled, users are allowed to connect to their IMAP servers unencrypted.
286 // For security reasons this is disabled by default.
287 'insecure_imap' => false,
289 // instances_social_key (String)
290 // Key to the API of https://instances.social which retrieves data about mastodon servers.
291 // See https://instances.social/api/token to get an API key.
292 'instances_social_key' => '',
294 // ipv4_resolve (Boolean)
295 // Resolve IPV4 addresses only. Don't resolve to IPV6.
296 'ipv4_resolve' => false,
298 // invitation_only (Boolean)
299 // If set true registration is only possible after a current member of the node has send an invitation.
300 'invitation_only' => false,
302 // itemspage_network (Integer)
303 // default number of items per page in stream pages (network, community, profile/contact statuses, search)
304 'itemspage_network' => 40,
306 // itemspage_network_mobile (Integer)
307 // default number of items per page in stream pages (network, community, profile/contact statuses, search)
308 // on detected mobile devices
309 'itemspage_network_mobile' => 20,
311 // jpeg_quality (Integer)
313 // Lower numbers save space at cost of image detail
314 // where n is between 1 and 100, and with very poor results below about 50
315 'jpeg_quality' => 100,
317 // like_no_comment (Boolean)
318 // Don't update the "commented" value of an item when it is liked.
319 'like_no_comment' => false,
321 // local_block (Boolean)
322 // Used in conjunction with "block_public".
323 'local_block' => false,
325 // local_search (Boolean)
326 // Blocks search for users who are not logged in to prevent crawlers from blocking your system.
327 'local_search' => false,
329 // local_tags (Boolean)
330 // If activated, all hashtags will point to the local server.
331 'local_tags' => false,
333 // logger_config (String)
334 // Sets the logging adapter of Friendica globally (monolog, syslog, stream)
335 'logger_config' => 'stream',
337 // syslog flags (Integer)
338 // Sets the syslog flags in case 'logger_config' is set to 'syslog'
339 'syslog_flags' => LOG_CONS | LOG_PID | LOG_ODELAY,
341 // syslog flags (Integer)
342 // Sets the syslog facility in case 'logger_config' is set to 'syslog'
343 'syslog_facility' => LOG_USER,
345 // maintenance_start (String)
346 // Start of the window for the daily maintenance cron call.
347 // The system timezone is used when no timezone is defined here.
348 'maintenance_start' => '01:00 +00:00',
350 // maintenance_end (String)
351 // End of the window for the daily maintenance cron call
352 // The system timezone is used when no timezone is defined here.
353 'maintenance_end' => '03:00 +00:00',
355 // max_batch_queue (Integer)
356 // Maximum number of batched queue items for a single contact before subsequent messages are discarded.
357 'max_batch_queue' => 1000,
359 // max_connections (Integer)
360 // The maximum number of database connections which can be in use before the worker process is deferred to its next interval.
361 // When the system can't detect the maximum numbers of connection then this value can be used. Use 0 for auto-detection.
362 'max_connections' => 0,
364 // max_connections_level (Integer 0-100)
365 // The maximum percentage of connections that are allowed to let the worker start.
366 'max_connections_level' => 75,
368 // max_contact_queue (Integer)
369 // Maximum number of queue items for a single contact before subsequent messages are discarded.
370 'max_contact_queue' => 500,
372 // max_csv_file_size (Integer)
373 // When uploading a CSV with account addresses to follow
374 // in the user settings, this controls the maximum file
375 // size of the upload file.
376 'max_csv_file_size' => 30720,
378 // max_feed_items (Integer)
379 // Maximum number of feed items that are fetched and processed. For unlimited items set to 0.
380 'max_feed_items' => 20,
382 // max_image_length (Integer)
383 // An alternate way of limiting picture upload sizes.
384 // Specify the maximum pixel length that pictures are allowed to be (for non-square pictures, it will apply to the longest side).
385 // Pictures longer than this length will be resized to be this length (on the longest side, the other side will be scaled appropriately).
386 // If you don't want to set a maximum length, set to -1.
387 'max_image_length' => -1,
389 // max_likers (Integer)
390 // Maximum number of "people who like (or don't like) this" that we will list by name
393 // max_processes_backend (Integer)
394 // Maximum number of concurrent database processes for background tasks.
395 'max_processes_backend' => 5,
397 // max_processes_frontend (Integer)
398 // Maximum number of concurrent database processes for foreground tasks.
399 'max_processes_frontend' => 20,
401 // maximagesize (Integer)
402 // Maximum size in bytes of an uploaded photo.
403 'maximagesize' => 800000,
405 // memcache_host (String)
406 // Host name of the memcache daemon.
407 'memcache_host' => '127.0.0.1',
409 // memcache_port (Integer)
410 // Port number of the memcache daemon.
411 'memcache_port' => 11211,
413 // memcached_hosts (Array)
414 // Array of Memcached servers info [host, port(, weight)], see Memcached::addServers.
415 'memcached_hosts' => [
416 ['127.0.0.1', '11211'],
419 // min_poll_interval (Integer)
420 // minimal distance in minutes between two polls for a contact. Reasonable values are between 1 and 59.
421 'min_poll_interval' => 15,
423 // minimum_posting_interval (Integer)
424 // Minimum interval between two feed posts per user
425 'minimum_posting_interval' => 0,
427 // no_count (Boolean)
428 // Don't do count calculations (currently only when showing photo albums).
431 // no_oembed (Boolean)
432 // Don't use OEmbed to fetch more information about a link.
433 'no_oembed' => false,
435 // no_redirect_list (Array)
436 // List of domains where HTTP redirects should be ignored.
437 'no_redirect_list' => [],
439 // no_smilies (Boolean)
440 // Don't show smilies.
441 'no_smilies' => false,
443 // paranoia (Boolean)
444 // Log out users if their IP address changed.
447 // permit_crawling (Boolean)
448 // Restricts the search for not logged in users to one search per minute.
449 'permit_crawling' => false,
452 // Daemon pid file path. For example: pidfile = /path/to/daemon.pid
455 // png_quality (Integer)
456 // Sets the ImageMagick compression level for PNG images. Values ranges from 0 (uncompressed) to 9 (most compressed).
459 // profiler (Boolean)
460 // Enable internal timings to help optimize code. Needed for "rendertime" addon.
463 // pushpoll_frequency (Integer)
464 // Frequency of contact poll for subhub contact using the DFRM or OStatus network.
471 // - 0 = every minute
472 'pushpoll_frequency' => 3,
474 // redis_host (String)
475 // Host name of the redis daemon.
476 'redis_host' => '127.0.0.1',
478 // redis_port (String)
479 // Port number of the redis daemon.
480 'redis_port' => 6379,
482 // redis_db (Integer)
483 // The sub-database of redis (0 - 15 possible sub-databases)
486 // redis_password (String)
487 // The authentication password for the redis database
488 'redis_password' => null,
490 // session_handler (database|cache|native)
491 // Whether to use Cache to store session data or to use PHP native session storage.
492 'session_handler' => 'database',
494 // remote_avatar_lookup (Boolean)
495 // Perform an avatar lookup via the activated services for remote contacts
496 'remote_avatar_lookup' => false,
498 // remove_multiplicated_lines (Boolean)
499 // If enabled, multiple linefeeds in items are stripped to a single one.
500 'remove_multiplicated_lines' => false,
502 // sendmail_params (Boolean)
503 // Normal sendmail command parameters will be added when the PHP mail() function is called for sending e-mails.
504 // This ensures the Sender Email address setting is applied to the message envelope rather than the host's default address.
505 // Set to false if your non-sendmail agent is incompatible, or to restore old behavior of using the host address.
506 'sendmail_params' => true,
508 // show_global_community_hint (Boolean)
509 // 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.
510 'show_global_community_hint' => false,
512 // show_received (Boolean)
513 // Show the receive data along with the post creation date
514 'show_received' => true,
516 // show_received_seconds (Integer)
517 // Display the received date when the difference between received and created is higher than this.
518 'show_received_seconds' => 500,
520 // show_unsupported_addons (Boolean)
521 // Show all addons including the unsupported ones.
522 'show_unsupported_addons' => false,
524 // show_unsupported_themes (Boolean)
525 // Show all themes including the unsupported ones.
526 'show_unsupported_themes' => false,
528 // throttle_limit_day (Integer)
529 // Maximum number of posts that a user can send per day with the API. 0 to disable daily throttling.
530 'throttle_limit_day' => 0,
532 // throttle_limit_week (Integer)
533 // Maximum number of posts that a user can send per week with the API. 0 to disable weekly throttling.
534 'throttle_limit_week' => 0,
536 // throttle_limit_month (Integer)
537 // Maximum number of posts that a user can send per month with the API. 0 to disable monthly throttling.
538 'throttle_limit_month' => 0,
540 // update_active_contacts (Boolean)
541 // When activated, only public contacts will be activated regularly that are used for example in items or tags.
542 'update_active_contacts' => false,
544 // username_min_length (Integer)
545 // The minimum character length a username can be.
546 // This length is check once the username has been trimmed and multiple spaces have been collapsed into one.
547 // Minimum for this config value is 1. Maximum is 64 as the resulting profile URL mustn't be longer than 255 chars.
548 'username_min_length' => 3,
550 // username_max_length (Integer)
551 // The maximum character length a username can be.
552 // This length is check once the username has been trimmed and multiple spaces have been collapsed into one.
553 // Minimum for this config value is 1. Maximum is 64 as the resulting profile URL mustn't be longer than 255 chars.
554 'username_max_length' => 48,
556 // worker_cooldown (Integer)
557 // Cooldown period in seconds after each worker function call.
558 'worker_cooldown' => 0,
560 // worker_debug (Boolean)
561 // If enabled, it prints out the number of running processes split by priority.
562 'worker_debug' => false,
564 // worker_fetch_limit (Integer)
565 // Number of worker tasks that are fetched in a single query.
566 'worker_fetch_limit' => 1,
568 // worker_fork (Boolean)
569 // Experimental setting. Use pcntl_fork to spawn a new worker process.
570 // Does not work when "worker_multiple_fetch" is enabled (Needs more testing)
571 'worker_fork' => false,
573 // worker_jpm (Boolean)
574 // If enabled, it prints out the jobs per minute.
575 'worker_jpm' => false,
577 // worker_jpm_range (String)
578 // List of minutes for the jobs per minute (JPM) calculation
579 'worker_jpm_range' => '1, 10, 60',
581 // worker_load_exponent (Integer)
582 // Default 3, which allows only 25% of the maximum worker queues when server load reaches around 37% of maximum load.
583 // For a linear response where 25% of worker queues are allowed at 75% of maximum load, set this to 1.
584 // Setting 0 would allow maximum worker queues at all times, which is not recommended.
585 'worker_load_exponent' => 3,
587 // worker_multiple_fetch (Boolean)
588 // When activated, the worker fetches jobs for multiple workers (not only for itself).
589 // This is an experimental setting without knowing the performance impact.
590 // Does not work when "worker_fork" is enabled (Needs more testing)
591 'worker_multiple_fetch' => false,
593 // worker_defer_limit (Integer)
594 // Per default the systems tries delivering for 15 times before dropping it.
595 'worker_defer_limit' => 15,
597 // xrd_timeout (Integer)
598 // Timeout in seconds for fetching the XRD links and other requests with an expected shorter timeout
602 // exp_themes (Boolean)
603 // Show experimental themes in user settings.
604 'exp_themes' => false,
607 // hide_eventlist (Boolean)
608 // Don't show the birthdays and events on the profile and network page.
609 'hide_eventlist' => false,
613 // Enable debug level for the jabber account synchronisation.
616 // Must be writable by the ejabberd process. if set then it will prevent the running of multiple processes.
620 // ap_inbox_log (Boolean)
621 // Logs every call to /inbox as a JSON file in Friendica's temporary directory
622 'ap_inbox_log' => false,
624 // total_ap_delivery (Boolean)
625 // Deliver via AP to every possible receiver and we suppress the delivery to these contacts with other protocols
626 'total_ap_delivery' => false,