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 // avatar_cache (Boolean)
122 // Cache avatar pictures as files (experimental)
123 'avatar_cache' => false,
125 // big_emojis (Boolean)
126 // Display "Emoji Only" posts in big.
127 'big_emojis' => false,
129 // bulk_delivery (Boolean)
130 // Delivers AP messages in a bulk (experimental)
131 'bulk_delivery' => false,
133 // block_local_dir (Boolean)
134 // Deny public access to the local user directory.
135 'block_local_dir' => false,
137 // blocked_tags (String)
138 // Comma separated list of hash tags that shouldn't be displayed in the trending tags
139 'blocked_tags' => '',
141 // community_no_sharer (Boolean)
142 // Don't display sharing accounts on the global community
143 'community_no_sharer' => false,
145 // contact_update_limit (Integer)
146 // How much contacts should be checked at a time?
147 'contact_update_limit' => 100,
149 // cron_interval (Integer)
150 // Minimal period in minutes between two calls of the "Cron" worker job.
151 'cron_interval' => 5,
153 // cache_driver (database|memcache|memcached|redis|apcu)
154 // Whether to use Memcache, Memcached, Redis or APCu to store temporary cache.
155 'cache_driver' => 'database',
157 // distributed_cache_driver (database|memcache|memcached|redis)
158 // Whether to use database, Memcache, Memcached or Redis as a distributed cache.
159 'distributed_cache_driver' => 'database',
161 // config_adapter (jit|preload)
162 // Allow to switch the configuration adapter to improve performances at the cost of memory consumption.
163 'config_adapter' => 'jit',
165 // curl_range_bytes (Integer)
166 // Maximum number of bytes that should be fetched. Default is 0, which mean "no limit".
167 'curl_range_bytes' => 0,
169 // crawl_permit_period (Integer)
170 // Period in seconds between allowed searches when the number of free searches is reached and "permit_crawling" is activated.
171 'crawl_permit_period' => 60,
174 // Name of a logfile to log slow database queries.
177 // db_log_index (Path)
178 // Name of a logfile to log queries with bad indexes.
179 'db_log_index' => '',
181 // db_log_index_watch (Comma-separated list)
182 // Watchlist of indexes to watch.
183 'db_log_index_watch' => '',
185 // db_log_index_denylist (Comma-separated list)
186 // Deny list of indexes that shouldn't be watched.
187 'db_log_index_denylist' => '',
189 // db_loglimit (Integer)
190 // If a database call lasts longer than this value in seconds it is logged.
191 // Inactive if system => db_log is empty.
194 // db_loglimit_index (Integer)
195 // Number of index rows needed to be logged for indexes on the watchlist. 0 to disable.
196 'db_loglimit_index' => 0,
198 // db_loglimit_index_high (Integer)
199 // Number of index rows to be logged anyway (for any index). 0 to disable.
200 'db_loglimit_index_high' => 0,
202 // dbclean_expire_conversation (Integer)
203 // When DBClean is enabled, any entry in the conversation table will be deleted after this many days.
204 // This data is used for ActivityPub, so it shouldn't be lower than the average duration of a discussion.
205 'dbclean_expire_conversation' => 90,
207 // dbclean-expire-limit (Integer)
208 // This defines the number of items that are to be deleted in a single call.
209 // Reduce this value when you are getting lock issues.
210 // A value of 0 disables the deletion process.
211 'dbclean-expire-limit' => 1000,
213 // daemon_watchdog (Boolean)
214 // Enable regular checking if the daemon is running.
215 // If it is not running and hadn't been terminated normally, it will be started automatically.
216 'daemon_watchdog' => false,
218 // delete_sleeping_processes (Boolean)
219 // Periodically delete waiting database processes.
220 'delete_sleeping_processes' => false,
222 // dice_profiler_threshold (Float)
223 // For profiling Dice class creation (0 = disabled, >0 = seconds threshold for profiling)
224 'dice_profiler_threshold' => 0.5,
226 // diaspora_test (Boolean)
227 // For development only. Disables the message transfer.
228 'diaspora_test' => false,
230 // disable_email_validation (Boolean)
231 // Disables the check if a mail address is in a valid format and can be resolved via DNS.
232 'disable_email_validation' => false,
234 // disable_implicit_mentions (Boolean) since 2019.03
235 // Implicit mentions are mentions in the body of replies that are redundant in a thread-enabled system like Friendica.
236 // This config key disables the gathering of implicit mentions in incoming and outgoing posts.
237 // Also disables the default automatic removal of implicit mentions from the body of incoming posts.
238 // Also disables the default automatic addition of implicit mentions in the body of outgoing posts.
239 // Disabling implicit mentions also affects the "explicit_mentions" additional feature by limiting it
240 // to the replied-to post author mention in the comment boxes.
241 'disable_implicit_mentions' => false,
243 // disable_url_validation (Boolean)
244 // Disables the DNS lookup of an URL.
245 'disable_url_validation' => false,
247 // disable_password_exposed (Boolean)
248 // Disable the exposition check against the remote haveibeenpwned API on password change.
249 'disable_password_exposed' => false,
251 // disable_polling (Boolean)
252 // Disable the polling of DFRN and OStatus contacts through onepoll.php.
253 'disable_polling' => false,
255 // display_resharer (Boolean)
256 // Display the first resharer as icon and text on a reshared item.
257 'display_resharer' => false,
260 // location of the developer log file.
264 // restricts develop log writes to requests originating from this IP address.
267 // expire-notify-priority (integer)
268 // Priority for the expirary notification
269 'expire-notify-priority' => PRIORITY_LOW,
271 // free_crawls (Integer)
272 // Number of "free" searches when system => permit_crawling is enabled.
275 // groupedit_image_limit (Integer)
276 // Number of contacts at which the group editor should switch from display the profile pictures of the contacts to only display the names.
277 // This can alternatively be set on a per account basis in the pconfig table.
278 'groupedit_image_limit' => 400,
280 // gserver_update_limit (Integer)
281 // How much servers should be checked at a time?
282 'gserver_update_limit' => 100,
285 // Enables the sending of HTTP Strict Transport Security headers.
288 // ignore_cache (Boolean)
289 // For development only. Disables the item cache.
290 'ignore_cache' => false,
292 // insecure_imap (Boolean)
293 // If enabled, users are allowed to connect to their IMAP servers unencrypted.
294 // For security reasons this is disabled by default.
295 'insecure_imap' => false,
297 // instances_social_key (String)
298 // Key to the API of https://instances.social which retrieves data about mastodon servers.
299 // See https://instances.social/api/token to get an API key.
300 'instances_social_key' => '',
302 // ipv4_resolve (Boolean)
303 // Resolve IPV4 addresses only. Don't resolve to IPV6.
304 'ipv4_resolve' => false,
306 // invitation_only (Boolean)
307 // If set true registration is only possible after a current member of the node has send an invitation.
308 'invitation_only' => false,
310 // itemspage_network (Integer)
311 // default number of items per page in stream pages (network, community, profile/contact statuses, search)
312 'itemspage_network' => 40,
314 // itemspage_network_mobile (Integer)
315 // default number of items per page in stream pages (network, community, profile/contact statuses, search)
316 // on detected mobile devices
317 'itemspage_network_mobile' => 20,
319 // jpeg_quality (Integer)
321 // Lower numbers save space at cost of image detail
322 // where n is between 1 and 100, and with very poor results below about 50
323 'jpeg_quality' => 100,
325 // like_no_comment (Boolean)
326 // Don't update the "commented" value of an item when it is liked.
327 'like_no_comment' => false,
329 // local_block (Boolean)
330 // Used in conjunction with "block_public".
331 'local_block' => false,
333 // local_search (Boolean)
334 // Blocks search for users who are not logged in to prevent crawlers from blocking your system.
335 'local_search' => false,
337 // local_tags (Boolean)
338 // If activated, all hashtags will point to the local server.
339 'local_tags' => false,
341 // logger_config (String)
342 // Sets the logging adapter of Friendica globally (monolog, syslog, stream)
343 'logger_config' => 'stream',
345 // syslog flags (Integer)
346 // Sets the syslog flags in case 'logger_config' is set to 'syslog'
347 'syslog_flags' => LOG_CONS | LOG_PID | LOG_ODELAY,
349 // syslog flags (Integer)
350 // Sets the syslog facility in case 'logger_config' is set to 'syslog'
351 'syslog_facility' => LOG_USER,
353 // maintenance_start (String)
354 // Start of the window for the daily maintenance cron call.
355 // The system timezone is used when no timezone is defined here.
356 'maintenance_start' => '01:00 +00:00',
358 // maintenance_end (String)
359 // End of the window for the daily maintenance cron call
360 // The system timezone is used when no timezone is defined here.
361 'maintenance_end' => '03:00 +00:00',
363 // max_batch_queue (Integer)
364 // Maximum number of batched queue items for a single contact before subsequent messages are discarded.
365 'max_batch_queue' => 1000,
367 // max_connections (Integer)
368 // The maximum number of database connections which can be in use before the worker process is deferred to its next interval.
369 // When the system can't detect the maximum numbers of connection then this value can be used. Use 0 for auto-detection.
370 'max_connections' => 0,
372 // max_connections_level (Integer 0-100)
373 // The maximum percentage of connections that are allowed to let the worker start.
374 'max_connections_level' => 75,
376 // max_contact_queue (Integer)
377 // Maximum number of queue items for a single contact before subsequent messages are discarded.
378 'max_contact_queue' => 500,
380 // max_csv_file_size (Integer)
381 // When uploading a CSV with account addresses to follow
382 // in the user settings, this controls the maximum file
383 // size of the upload file.
384 'max_csv_file_size' => 30720,
386 // max_feed_items (Integer)
387 // Maximum number of feed items that are fetched and processed. For unlimited items set to 0.
388 'max_feed_items' => 20,
390 // max_image_length (Integer)
391 // An alternate way of limiting picture upload sizes.
392 // Specify the maximum pixel length that pictures are allowed to be (for non-square pictures, it will apply to the longest side).
393 // Pictures longer than this length will be resized to be this length (on the longest side, the other side will be scaled appropriately).
394 // If you don't want to set a maximum length, set to -1.
395 'max_image_length' => -1,
397 // max_likers (Integer)
398 // Maximum number of "people who like (or don't like) this" that we will list by name
401 // max_processes_backend (Integer)
402 // Maximum number of concurrent database processes for background tasks.
403 'max_processes_backend' => 5,
405 // max_processes_frontend (Integer)
406 // Maximum number of concurrent database processes for foreground tasks.
407 'max_processes_frontend' => 20,
409 // maximagesize (Integer)
410 // Maximum size in bytes of an uploaded photo.
411 'maximagesize' => 800000,
413 // memcache_host (String)
414 // Host name of the memcache daemon.
415 'memcache_host' => '127.0.0.1',
417 // memcache_port (Integer)
418 // Port number of the memcache daemon.
419 'memcache_port' => 11211,
421 // memcached_hosts (Array)
422 // Array of Memcached servers info [host, port(, weight)], see Memcached::addServers.
423 'memcached_hosts' => [
424 ['127.0.0.1', '11211'],
427 // min_poll_interval (Integer)
428 // minimal distance in minutes between two polls for a contact. Reasonable values are between 1 and 59.
429 'min_poll_interval' => 15,
431 // minimum_posting_interval (Integer)
432 // Minimum interval between two feed posts per user
433 'minimum_posting_interval' => 0,
435 // no_count (Boolean)
436 // Don't do count calculations (currently only when showing photo albums).
439 // no_oembed (Boolean)
440 // Don't use OEmbed to fetch more information about a link.
441 'no_oembed' => false,
443 // no_redirect_list (Array)
444 // List of domains where HTTP redirects should be ignored.
445 'no_redirect_list' => [],
447 // no_smilies (Boolean)
448 // Don't show smilies.
449 'no_smilies' => false,
451 // paranoia (Boolean)
452 // Log out users if their IP address changed.
455 // permit_crawling (Boolean)
456 // Restricts the search for not logged in users to one search per minute.
457 'permit_crawling' => false,
460 // Daemon pid file path. For example: pidfile = /path/to/daemon.pid
463 // png_quality (Integer)
464 // Sets the ImageMagick compression level for PNG images. Values ranges from 0 (uncompressed) to 9 (most compressed).
467 // profiler (Boolean)
468 // Enable internal timings to help optimize code. Needed for "rendertime" addon.
471 // pushpoll_frequency (Integer)
472 // Frequency of contact poll for subhub contact using the DFRM or OStatus network.
479 // - 0 = every minute
480 'pushpoll_frequency' => 3,
482 // redis_host (String)
483 // Host name of the redis daemon.
484 'redis_host' => '127.0.0.1',
486 // redis_port (String)
487 // Port number of the redis daemon.
488 'redis_port' => 6379,
490 // redis_db (Integer)
491 // The sub-database of redis (0 - 15 possible sub-databases)
494 // redis_password (String)
495 // The authentication password for the redis database
496 'redis_password' => null,
498 // session_handler (database|cache|native)
499 // Whether to use Cache to store session data or to use PHP native session storage.
500 'session_handler' => 'database',
502 // remote_avatar_lookup (Boolean)
503 // Perform an avatar lookup via the activated services for remote contacts
504 'remote_avatar_lookup' => false,
506 // remove_multiplicated_lines (Boolean)
507 // If enabled, multiple linefeeds in items are stripped to a single one.
508 'remove_multiplicated_lines' => false,
510 // runtime_ignore (Array)
511 // List of ignored commands for the runtime logging.
512 'runtime_ignore' => [],
514 // runtime_loglimit (Integer)
515 // The runtime is logged, When the program execution time is higher than this value.
516 'runtime_loglimit' => 0,
518 // sendmail_params (Boolean)
519 // Normal sendmail command parameters will be added when the PHP mail() function is called for sending e-mails.
520 // This ensures the Sender Email address setting is applied to the message envelope rather than the host's default address.
521 // Set to false if your non-sendmail agent is incompatible, or to restore old behavior of using the host address.
522 'sendmail_params' => true,
524 // set_creation_date (Boolean)
525 // When enabled, the user can enter a creation date when composing a post.
526 'set_creation_date' => false,
528 // show_global_community_hint (Boolean)
529 // 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.
530 'show_global_community_hint' => false,
532 // show_received (Boolean)
533 // Show the receive data along with the post creation date
534 'show_received' => true,
536 // show_received_seconds (Integer)
537 // Display the received date when the difference between received and created is higher than this.
538 'show_received_seconds' => 500,
540 // show_unsupported_addons (Boolean)
541 // Show all addons including the unsupported ones.
542 'show_unsupported_addons' => false,
544 // show_unsupported_themes (Boolean)
545 // Show all themes including the unsupported ones.
546 'show_unsupported_themes' => false,
548 // throttle_limit_day (Integer)
549 // Maximum number of posts that a user can send per day with the API. 0 to disable daily throttling.
550 'throttle_limit_day' => 0,
552 // throttle_limit_week (Integer)
553 // Maximum number of posts that a user can send per week with the API. 0 to disable weekly throttling.
554 'throttle_limit_week' => 0,
556 // throttle_limit_month (Integer)
557 // Maximum number of posts that a user can send per month with the API. 0 to disable monthly throttling.
558 'throttle_limit_month' => 0,
560 // transmit_pending_events (Boolean)
561 // Transmit pending events upon accepted contact request for forums
562 'transmit_pending_events' => false,
564 // update_active_contacts (Boolean)
565 // When activated, only public contacts will be activated regularly that are used for example in items or tags.
566 'update_active_contacts' => false,
568 // username_min_length (Integer)
569 // The minimum character length a username can be.
570 // This length is check once the username has been trimmed and multiple spaces have been collapsed into one.
571 // Minimum for this config value is 1. Maximum is 64 as the resulting profile URL mustn't be longer than 255 chars.
572 'username_min_length' => 3,
574 // username_max_length (Integer)
575 // The maximum character length a username can be.
576 // This length is check once the username has been trimmed and multiple spaces have been collapsed into one.
577 // Minimum for this config value is 1. Maximum is 64 as the resulting profile URL mustn't be longer than 255 chars.
578 'username_max_length' => 48,
580 // worker_cooldown (Integer)
581 // Cooldown period in seconds after each worker function call.
582 'worker_cooldown' => 0,
584 // worker_debug (Boolean)
585 // If enabled, it prints out the number of running processes split by priority.
586 'worker_debug' => false,
588 // worker_fetch_limit (Integer)
589 // Number of worker tasks that are fetched in a single query.
590 'worker_fetch_limit' => 1,
592 // worker_fork (Boolean)
593 // Experimental setting. Use pcntl_fork to spawn a new worker process.
594 // Does not work when "worker_multiple_fetch" is enabled (Needs more testing)
595 'worker_fork' => false,
597 // worker_jpm (Boolean)
598 // If enabled, it prints out the jobs per minute.
599 'worker_jpm' => false,
601 // worker_jpm_range (String)
602 // List of minutes for the jobs per minute (JPM) calculation
603 'worker_jpm_range' => '1, 10, 60',
605 // worker_load_exponent (Integer)
606 // Default 3, which allows only 25% of the maximum worker queues when server load reaches around 37% of maximum load.
607 // For a linear response where 25% of worker queues are allowed at 75% of maximum load, set this to 1.
608 // Setting 0 would allow maximum worker queues at all times, which is not recommended.
609 'worker_load_exponent' => 3,
611 // worker_multiple_fetch (Boolean)
612 // When activated, the worker fetches jobs for multiple workers (not only for itself).
613 // This is an experimental setting without knowing the performance impact.
614 // Does not work when "worker_fork" is enabled (Needs more testing)
615 'worker_multiple_fetch' => false,
617 // worker_defer_limit (Integer)
618 // Per default the systems tries delivering for 15 times before dropping it.
619 'worker_defer_limit' => 15,
621 // xrd_timeout (Integer)
622 // Timeout in seconds for fetching the XRD links and other requests with an expected shorter timeout
626 // exp_themes (Boolean)
627 // Show experimental themes in user settings.
628 'exp_themes' => false,
631 // hide_eventlist (Boolean)
632 // Don't show the birthdays and events on the profile and network page.
633 'hide_eventlist' => false,
637 // Enable debug level for the jabber account synchronisation.
640 // Must be writable by the ejabberd process. if set then it will prevent the running of multiple processes.
644 // ap_inbox_log (Boolean)
645 // Logs every call to /inbox as a JSON file in Friendica's temporary directory
646 'ap_inbox_log' => false,
648 // total_ap_delivery (Boolean)
649 // Deliver via AP to every possible receiver and we suppress the delivery to these contacts with other protocols
650 'total_ap_delivery' => false,