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 // avatar_cache_path (String)
126 // File path to the avatar cache. Default is /(your basepath)/avatar/
127 // The value has to be an absolute path and has to end with a "/"
128 'avatar_cache_path' => '',
130 // avatar_cache_url (String)
131 // Base URL of the avatar cache. Default is http(s)://(your hostname)/avatar/
132 // The value has to start with the scheme and end with a "/"
133 'avatar_cache_url' => '',
135 // big_emojis (Boolean)
136 // Display "Emoji Only" posts in big.
137 'big_emojis' => false,
139 // bulk_delivery (Boolean)
140 // Delivers AP messages in a bulk (experimental)
141 'bulk_delivery' => false,
143 // block_local_dir (Boolean)
144 // Deny public access to the local user directory.
145 'block_local_dir' => false,
147 // blocked_tags (String)
148 // Comma separated list of hash tags that shouldn't be displayed in the trending tags
149 'blocked_tags' => '',
151 // community_no_sharer (Boolean)
152 // Don't display sharing accounts on the global community
153 'community_no_sharer' => false,
155 // contact_update_limit (Integer)
156 // How much contacts should be checked at a time?
157 'contact_update_limit' => 100,
159 // cron_interval (Integer)
160 // Minimal period in minutes between two calls of the "Cron" worker job.
161 'cron_interval' => 5,
163 // cache_driver (database|memcache|memcached|redis|apcu)
164 // Whether to use Memcache, Memcached, Redis or APCu to store temporary cache.
165 'cache_driver' => 'database',
167 // distributed_cache_driver (database|memcache|memcached|redis)
168 // Whether to use database, Memcache, Memcached or Redis as a distributed cache.
169 'distributed_cache_driver' => 'database',
171 // config_adapter (jit|preload)
172 // Allow to switch the configuration adapter to improve performances at the cost of memory consumption.
173 'config_adapter' => 'jit',
175 // curl_range_bytes (Integer)
176 // Maximum number of bytes that should be fetched. Default is 0, which mean "no limit".
177 'curl_range_bytes' => 0,
179 // crawl_permit_period (Integer)
180 // Period in seconds between allowed searches when the number of free searches is reached and "permit_crawling" is activated.
181 'crawl_permit_period' => 60,
184 // Name of a logfile to log slow database queries.
187 // db_log_index (Path)
188 // Name of a logfile to log queries with bad indexes.
189 'db_log_index' => '',
191 // db_log_index_watch (Comma-separated list)
192 // Watchlist of indexes to watch.
193 'db_log_index_watch' => '',
195 // db_log_index_denylist (Comma-separated list)
196 // Deny list of indexes that shouldn't be watched.
197 'db_log_index_denylist' => '',
199 // db_loglimit (Integer)
200 // If a database call lasts longer than this value in seconds it is logged.
201 // Inactive if system => db_log is empty.
204 // db_loglimit_index (Integer)
205 // Number of index rows needed to be logged for indexes on the watchlist. 0 to disable.
206 'db_loglimit_index' => 0,
208 // db_loglimit_index_high (Integer)
209 // Number of index rows to be logged anyway (for any index). 0 to disable.
210 'db_loglimit_index_high' => 0,
212 // dbclean_expire_conversation (Integer)
213 // When DBClean is enabled, any entry in the conversation table will be deleted after this many days.
214 // This data is used for ActivityPub, so it shouldn't be lower than the average duration of a discussion.
215 'dbclean_expire_conversation' => 90,
217 // dbclean-expire-limit (Integer)
218 // This defines the number of items that are to be deleted in a single call.
219 // Reduce this value when you are getting lock issues.
220 // A value of 0 disables the deletion process.
221 'dbclean-expire-limit' => 1000,
223 // daemon_watchdog (Boolean)
224 // Enable regular checking if the daemon is running.
225 // If it is not running and hadn't been terminated normally, it will be started automatically.
226 'daemon_watchdog' => false,
228 // delete_sleeping_processes (Boolean)
229 // Periodically delete waiting database processes.
230 'delete_sleeping_processes' => false,
232 // dice_profiler_threshold (Float)
233 // For profiling Dice class creation (0 = disabled, >0 = seconds threshold for profiling)
234 'dice_profiler_threshold' => 0.5,
236 // diaspora_test (Boolean)
237 // For development only. Disables the message transfer.
238 'diaspora_test' => false,
240 // disable_email_validation (Boolean)
241 // Disables the check if a mail address is in a valid format and can be resolved via DNS.
242 'disable_email_validation' => false,
244 // disable_implicit_mentions (Boolean) since 2019.03
245 // Implicit mentions are mentions in the body of replies that are redundant in a thread-enabled system like Friendica.
246 // This config key disables the gathering of implicit mentions in incoming and outgoing posts.
247 // Also disables the default automatic removal of implicit mentions from the body of incoming posts.
248 // Also disables the default automatic addition of implicit mentions in the body of outgoing posts.
249 // Disabling implicit mentions also affects the "explicit_mentions" additional feature by limiting it
250 // to the replied-to post author mention in the comment boxes.
251 'disable_implicit_mentions' => false,
253 // disable_url_validation (Boolean)
254 // Disables the DNS lookup of an URL.
255 'disable_url_validation' => false,
257 // disable_password_exposed (Boolean)
258 // Disable the exposition check against the remote haveibeenpwned API on password change.
259 'disable_password_exposed' => false,
261 // disable_polling (Boolean)
262 // Disable the polling of DFRN and OStatus contacts through onepoll.php.
263 'disable_polling' => false,
265 // display_resharer (Boolean)
266 // Display the first resharer as icon and text on a reshared item.
267 'display_resharer' => false,
270 // location of the developer log file.
274 // restricts develop log writes to requests originating from this IP address.
277 // expire-notify-priority (integer)
278 // Priority for the expirary notification
279 'expire-notify-priority' => PRIORITY_LOW,
281 // free_crawls (Integer)
282 // Number of "free" searches when system => permit_crawling is enabled.
285 // groupedit_image_limit (Integer)
286 // Number of contacts at which the group editor should switch from display the profile pictures of the contacts to only display the names.
287 // This can alternatively be set on a per account basis in the pconfig table.
288 'groupedit_image_limit' => 400,
290 // gserver_update_limit (Integer)
291 // How much servers should be checked at a time?
292 'gserver_update_limit' => 100,
295 // Enables the sending of HTTP Strict Transport Security headers.
298 // ignore_cache (Boolean)
299 // For development only. Disables the item cache.
300 'ignore_cache' => false,
302 // insecure_imap (Boolean)
303 // If enabled, users are allowed to connect to their IMAP servers unencrypted.
304 // For security reasons this is disabled by default.
305 'insecure_imap' => false,
307 // instances_social_key (String)
308 // Key to the API of https://instances.social which retrieves data about mastodon servers.
309 // See https://instances.social/api/token to get an API key.
310 'instances_social_key' => '',
312 // ipv4_resolve (Boolean)
313 // Resolve IPV4 addresses only. Don't resolve to IPV6.
314 'ipv4_resolve' => false,
316 // invitation_only (Boolean)
317 // If set true registration is only possible after a current member of the node has send an invitation.
318 'invitation_only' => false,
320 // itemspage_network (Integer)
321 // default number of items per page in stream pages (network, community, profile/contact statuses, search)
322 'itemspage_network' => 40,
324 // itemspage_network_mobile (Integer)
325 // default number of items per page in stream pages (network, community, profile/contact statuses, search)
326 // on detected mobile devices
327 'itemspage_network_mobile' => 20,
329 // jpeg_quality (Integer)
331 // Lower numbers save space at cost of image detail
332 // where n is between 1 and 100, and with very poor results below about 50
333 'jpeg_quality' => 100,
335 // like_no_comment (Boolean)
336 // Don't update the "commented" value of an item when it is liked.
337 'like_no_comment' => false,
339 // local_block (Boolean)
340 // Used in conjunction with "block_public".
341 'local_block' => false,
343 // local_search (Boolean)
344 // Blocks search for users who are not logged in to prevent crawlers from blocking your system.
345 'local_search' => false,
347 // local_tags (Boolean)
348 // If activated, all hashtags will point to the local server.
349 'local_tags' => false,
351 // logger_config (String)
352 // Sets the logging adapter of Friendica globally (monolog, syslog, stream)
353 'logger_config' => 'stream',
355 // syslog flags (Integer)
356 // Sets the syslog flags in case 'logger_config' is set to 'syslog'
357 'syslog_flags' => LOG_CONS | LOG_PID | LOG_ODELAY,
359 // syslog flags (Integer)
360 // Sets the syslog facility in case 'logger_config' is set to 'syslog'
361 'syslog_facility' => LOG_USER,
363 // maintenance_start (String)
364 // Start of the window for the daily maintenance cron call.
365 // The system timezone is used when no timezone is defined here.
366 'maintenance_start' => '01:00 +00:00',
368 // maintenance_end (String)
369 // End of the window for the daily maintenance cron call
370 // The system timezone is used when no timezone is defined here.
371 'maintenance_end' => '03:00 +00:00',
373 // max_batch_queue (Integer)
374 // Maximum number of batched queue items for a single contact before subsequent messages are discarded.
375 'max_batch_queue' => 1000,
377 // max_connections (Integer)
378 // The maximum number of database connections which can be in use before the worker process is deferred to its next interval.
379 // When the system can't detect the maximum numbers of connection then this value can be used. Use 0 for auto-detection.
380 'max_connections' => 0,
382 // max_connections_level (Integer 0-100)
383 // The maximum percentage of connections that are allowed to let the worker start.
384 'max_connections_level' => 75,
386 // max_contact_queue (Integer)
387 // Maximum number of queue items for a single contact before subsequent messages are discarded.
388 'max_contact_queue' => 500,
390 // max_csv_file_size (Integer)
391 // When uploading a CSV with account addresses to follow
392 // in the user settings, this controls the maximum file
393 // size of the upload file.
394 'max_csv_file_size' => 30720,
396 // max_feed_items (Integer)
397 // Maximum number of feed items that are fetched and processed. For unlimited items set to 0.
398 'max_feed_items' => 20,
400 // max_image_length (Integer)
401 // An alternate way of limiting picture upload sizes.
402 // Specify the maximum pixel length that pictures are allowed to be (for non-square pictures, it will apply to the longest side).
403 // Pictures longer than this length will be resized to be this length (on the longest side, the other side will be scaled appropriately).
404 // If you don't want to set a maximum length, set to -1.
405 'max_image_length' => -1,
407 // max_likers (Integer)
408 // Maximum number of "people who like (or don't like) this" that we will list by name
411 // max_processes_backend (Integer)
412 // Maximum number of concurrent database processes for background tasks.
413 'max_processes_backend' => 5,
415 // max_processes_frontend (Integer)
416 // Maximum number of concurrent database processes for foreground tasks.
417 'max_processes_frontend' => 20,
419 // maximagesize (Integer)
420 // Maximum size in bytes of an uploaded photo.
421 'maximagesize' => 800000,
423 // memcache_host (String)
424 // Host name of the memcache daemon.
425 'memcache_host' => '127.0.0.1',
427 // memcache_port (Integer)
428 // Port number of the memcache daemon.
429 'memcache_port' => 11211,
431 // memcached_hosts (Array)
432 // Array of Memcached servers info [host, port(, weight)], see Memcached::addServers.
433 'memcached_hosts' => [
434 ['127.0.0.1', '11211'],
437 // min_poll_interval (Integer)
438 // minimal distance in minutes between two polls for a contact. Reasonable values are between 1 and 59.
439 'min_poll_interval' => 15,
441 // minimum_posting_interval (Integer)
442 // Minimum interval between two feed posts per user
443 'minimum_posting_interval' => 0,
445 // no_count (Boolean)
446 // Don't do count calculations (currently only when showing photo albums).
449 // no_oembed (Boolean)
450 // Don't use OEmbed to fetch more information about a link.
451 'no_oembed' => false,
453 // no_redirect_list (Array)
454 // List of domains where HTTP redirects should be ignored.
455 'no_redirect_list' => [],
457 // no_smilies (Boolean)
458 // Don't show smilies.
459 'no_smilies' => false,
461 // paranoia (Boolean)
462 // Log out users if their IP address changed.
465 // permit_crawling (Boolean)
466 // Restricts the search for not logged in users to one search per minute.
467 'permit_crawling' => false,
470 // Daemon pid file path. For example: pidfile = /path/to/daemon.pid
473 // png_quality (Integer)
474 // Sets the ImageMagick compression level for PNG images. Values ranges from 0 (uncompressed) to 9 (most compressed).
477 // profiler (Boolean)
478 // Enable internal timings to help optimize code. Needed for "rendertime" addon.
481 // pushpoll_frequency (Integer)
482 // Frequency of contact poll for subhub contact using the DFRM or OStatus network.
489 // - 0 = every minute
490 'pushpoll_frequency' => 3,
492 // redis_host (String)
493 // Host name of the redis daemon.
494 'redis_host' => '127.0.0.1',
496 // redis_port (String)
497 // Port number of the redis daemon.
498 'redis_port' => 6379,
500 // redis_db (Integer)
501 // The sub-database of redis (0 - 15 possible sub-databases)
504 // redis_password (String)
505 // The authentication password for the redis database
506 'redis_password' => null,
508 // session_handler (database|cache|native)
509 // Whether to use Cache to store session data or to use PHP native session storage.
510 'session_handler' => 'database',
512 // remote_avatar_lookup (Boolean)
513 // Perform an avatar lookup via the activated services for remote contacts
514 'remote_avatar_lookup' => false,
516 // remove_multiplicated_lines (Boolean)
517 // If enabled, multiple linefeeds in items are stripped to a single one.
518 'remove_multiplicated_lines' => false,
520 // runtime_ignore (Array)
521 // List of ignored commands for the runtime logging.
522 'runtime_ignore' => [],
524 // runtime_loglimit (Integer)
525 // The runtime is logged, When the program execution time is higher than this value.
526 'runtime_loglimit' => 0,
528 // sendmail_params (Boolean)
529 // Normal sendmail command parameters will be added when the PHP mail() function is called for sending e-mails.
530 // This ensures the Sender Email address setting is applied to the message envelope rather than the host's default address.
531 // Set to false if your non-sendmail agent is incompatible, or to restore old behavior of using the host address.
532 'sendmail_params' => true,
534 // set_creation_date (Boolean)
535 // When enabled, the user can enter a creation date when composing a post.
536 'set_creation_date' => false,
538 // show_global_community_hint (Boolean)
539 // 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.
540 'show_global_community_hint' => false,
542 // show_received (Boolean)
543 // Show the receive data along with the post creation date
544 'show_received' => true,
546 // show_received_seconds (Integer)
547 // Display the received date when the difference between received and created is higher than this.
548 'show_received_seconds' => 500,
550 // show_unsupported_addons (Boolean)
551 // Show all addons including the unsupported ones.
552 'show_unsupported_addons' => false,
554 // show_unsupported_themes (Boolean)
555 // Show all themes including the unsupported ones.
556 'show_unsupported_themes' => false,
558 // throttle_limit_day (Integer)
559 // Maximum number of posts that a user can send per day with the API. 0 to disable daily throttling.
560 'throttle_limit_day' => 0,
562 // throttle_limit_week (Integer)
563 // Maximum number of posts that a user can send per week with the API. 0 to disable weekly throttling.
564 'throttle_limit_week' => 0,
566 // throttle_limit_month (Integer)
567 // Maximum number of posts that a user can send per month with the API. 0 to disable monthly throttling.
568 'throttle_limit_month' => 0,
570 // transmit_pending_events (Boolean)
571 // Transmit pending events upon accepted contact request for forums
572 'transmit_pending_events' => false,
574 // update_active_contacts (Boolean)
575 // When activated, only public contacts will be activated regularly that are used for example in items or tags.
576 'update_active_contacts' => false,
578 // username_min_length (Integer)
579 // The minimum character length a username can be.
580 // This length is check once the username has been trimmed and multiple spaces have been collapsed into one.
581 // Minimum for this config value is 1. Maximum is 64 as the resulting profile URL mustn't be longer than 255 chars.
582 'username_min_length' => 3,
584 // username_max_length (Integer)
585 // The maximum character length a username can be.
586 // This length is check once the username has been trimmed and multiple spaces have been collapsed into one.
587 // Minimum for this config value is 1. Maximum is 64 as the resulting profile URL mustn't be longer than 255 chars.
588 'username_max_length' => 48,
590 // worker_cooldown (Integer)
591 // Cooldown period in seconds after each worker function call.
592 'worker_cooldown' => 0,
594 // worker_debug (Boolean)
595 // If enabled, it prints out the number of running processes split by priority.
596 'worker_debug' => false,
598 // worker_fetch_limit (Integer)
599 // Number of worker tasks that are fetched in a single query.
600 'worker_fetch_limit' => 1,
602 // worker_fork (Boolean)
603 // Experimental setting. Use pcntl_fork to spawn a new worker process.
604 // Does not work when "worker_multiple_fetch" is enabled (Needs more testing)
605 'worker_fork' => false,
607 // worker_jpm (Boolean)
608 // If enabled, it prints out the jobs per minute.
609 'worker_jpm' => false,
611 // worker_jpm_range (String)
612 // List of minutes for the jobs per minute (JPM) calculation
613 'worker_jpm_range' => '1, 10, 60',
615 // worker_load_exponent (Integer)
616 // Default 3, which allows only 25% of the maximum worker queues when server load reaches around 37% of maximum load.
617 // For a linear response where 25% of worker queues are allowed at 75% of maximum load, set this to 1.
618 // Setting 0 would allow maximum worker queues at all times, which is not recommended.
619 'worker_load_exponent' => 3,
621 // worker_multiple_fetch (Boolean)
622 // When activated, the worker fetches jobs for multiple workers (not only for itself).
623 // This is an experimental setting without knowing the performance impact.
624 // Does not work when "worker_fork" is enabled (Needs more testing)
625 'worker_multiple_fetch' => false,
627 // worker_defer_limit (Integer)
628 // Per default the systems tries delivering for 15 times before dropping it.
629 'worker_defer_limit' => 15,
631 // xrd_timeout (Integer)
632 // Timeout in seconds for fetching the XRD links and other requests with an expected shorter timeout
636 // exp_themes (Boolean)
637 // Show experimental themes in user settings.
638 'exp_themes' => false,
641 // hide_eventlist (Boolean)
642 // Don't show the birthdays and events on the profile and network page.
643 'hide_eventlist' => false,
647 // Enable debug level for the jabber account synchronisation.
650 // Must be writable by the ejabberd process. if set then it will prevent the running of multiple processes.
654 // ap_inbox_log (Boolean)
655 // Logs every call to /inbox as a JSON file in Friendica's temporary directory
656 'ap_inbox_log' => false,
658 // total_ap_delivery (Boolean)
659 // Deliver via AP to every possible receiver and we suppress the delivery to these contacts with other protocols
660 'total_ap_delivery' => false,