3 * @copyright Copyright (C) 2020, Friendica
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 // emulate_prepares (Boolean) (Experimental)
57 // If enabled, prepared statements will be emulated.
58 // In combination with MySQLi this will cast all return values to strings.
59 'emulate_prepares' => false,
61 // pdo_emulate_prepares (Boolean) (Experimental)
62 // If enabled, the builtin emulation for prepared statements is used.
63 // Due to limitations of that emulation (all return values are casted as strings)
64 // this will most likely cause issues and should not be used on production systems.
65 'pdo_emulate_prepares' => false,
67 // disable_pdo (Boolean)
68 // PDO is used by default (if available). Otherwise MySQLi will be used.
69 'disable_pdo' => false,
71 // persistent (Boolean)
72 // This controls if the system should use persistent connections or not.
73 // Persistent connections increase the performance.
74 // On the other hand the number of open connections are higher,
75 // this will most likely increase the system load.
76 'persistent' => false,
79 // admin_email (Comma-separated list)
80 // In order to perform system administration via the admin panel,
81 // this must precisely match the email address of the person logged in.
84 // admin_nickname (String)
85 // Nickname of the main admin user, used if there are more than one admin user defined in config => admin_email.
86 'admin_nickname' => '',
88 // max_import_size (Integer)
89 // Maximum body size of DFRN and Mail messages in characters. 0 is unlimited.
90 'max_import_size' => 200000,
93 // Location of PHP command line processor.
97 // adjust_poll_frequency (Boolean)
98 // Automatically detect and set the best feed poll frequency.
99 'adjust_poll_frequency' => false,
101 // allowed_link_protocols (Array)
102 // Allowed protocols in links URLs, add at your own risk. http(s) is always allowed.
103 'allowed_link_protocols' => ['ftp://', 'ftps://', 'mailto:', 'cid:', 'gopher://'],
105 // always_show_preview (Boolean)
106 // Only show small preview pictures.
107 'always_show_preview' => false,
109 // ap_always_bcc (Boolean)
110 // Adresses non-mentioned ActivityPub receivers by BCC instead of CC. Increases privacy, decreases performance.
111 'ap_always_bcc' => false,
113 // archival_days (Integer)
114 // Number of days that we try to deliver content before we archive a contact.
115 'archival_days' => 32,
117 // auth_cookie_lifetime (Integer)
118 // Number of days that should pass without any activity before a user who
119 // chose "Remember me" when logging in is considered logged out.
120 'auth_cookie_lifetime' => 7,
122 // big_emojis (Boolean)
123 // Display "Emoji Only" posts in big.
124 'big_emojis' => false,
126 // block_local_dir (Boolean)
127 // Deny public access to the local user directory.
128 'block_local_dir' => false,
130 // community_no_sharer (Boolean)
131 // Don't display sharing accounts on the global community
132 'community_no_sharer' => false,
134 // cron_interval (Integer)
135 // Minimal period in minutes between two calls of the "Cron" worker job.
136 'cron_interval' => 5,
138 // cache_driver (database|memcache|memcached|redis|apcu)
139 // Whether to use Memcache, Memcached, Redis or APCu to store temporary cache.
140 'cache_driver' => 'database',
142 // config_adapter (jit|preload)
143 // Allow to switch the configuration adapter to improve performances at the cost of memory consumption.
144 'config_adapter' => 'jit',
146 // curl_range_bytes (Integer)
147 // Maximum number of bytes that should be fetched. Default is 0, which mean "no limit".
148 'curl_range_bytes' => 0,
150 // crawl_permit_period (Integer)
151 // Period in seconds between allowed searches when the number of free searches is reached and "permit_crawling" is activated.
152 'crawl_permit_period' => 60,
155 // Name of a logfile to log slow database queries.
158 // db_log_index (Path)
159 // Name of a logfile to log queries with bad indexes.
160 'db_log_index' => '',
162 // db_log_index_watch (Comma-separated list)
163 // Watchlist of indexes to watch.
164 'db_log_index_watch' => '',
166 // db_log_index_denylist (Comma-separated list)
167 // Deny list of indexes that shouldn't be watched.
168 'db_log_index_denylist' => '',
170 // db_loglimit (Integer)
171 // If a database call lasts longer than this value in seconds it is logged.
172 // Inactive if system => db_log is empty.
175 // db_loglimit_index (Integer)
176 // Number of index rows needed to be logged for indexes on the watchlist. 0 to disable.
177 'db_loglimit_index' => 0,
179 // db_loglimit_index_high (Integer)
180 // Number of index rows to be logged anyway (for any index). 0 to disable.
181 'db_loglimit_index_high' => 0,
183 // dbclean_expire_conversation (Integer)
184 // When DBClean is enabled, any entry in the conversation table will be deleted after this many days.
185 // This data is used for ActivityPub, so it shouldn't be lower than the average duration of a discussion.
186 'dbclean_expire_conversation' => 90,
188 // dbclean-expire-limit (Integer)
189 // This defines the number of items that are to be deleted in a single call.
190 // Reduce this value when you are getting lock issues.
191 // A value of 0 disables the deletion process.
192 'dbclean-expire-limit' => 1000,
194 // diaspora_test (Boolean)
195 // For development only. Disables the message transfer.
196 'diaspora_test' => false,
198 // disable_email_validation (Boolean)
199 // Disables the check if a mail address is in a valid format and can be resolved via DNS.
200 'disable_email_validation' => false,
202 // disable_implicit_mentions (Boolean) since 2019.03
203 // Implicit mentions are mentions in the body of replies that are redundant in a thread-enabled system like Friendica.
204 // This config key disables the gathering of implicit mentions in incoming and outgoing posts.
205 // Also disables the default automatic removal of implicit mentions from the body of incoming posts.
206 // Also disables the default automatic addition of implicit mentions in the body of outgoing posts.
207 // Disabling implicit mentions also affects the "explicit_mentions" additional feature by limiting it
208 // to the replied-to post author mention in the comment boxes.
209 'disable_implicit_mentions' => false,
211 // disable_url_validation (Boolean)
212 // Disables the DNS lookup of an URL.
213 'disable_url_validation' => false,
215 // disable_password_exposed (Boolean)
216 // Disable the exposition check against the remote haveibeenpwned API on password change.
217 'disable_password_exposed' => false,
219 // disable_polling (Boolean)
220 // Disable the polling of DFRN and OStatus contacts through onepoll.php.
221 'disable_polling' => false,
223 // display_resharer (Boolean)
224 // Display the first resharer as icon and text on a reshared item.
225 'display_resharer' => false,
228 // location of the developer log file.
232 // restricts develop log writes to requests originating from this IP address.
235 // free_crawls (Integer)
236 // Number of "free" searches when system => permit_crawling is enabled.
239 // frontend_worker_timeout (Integer)
240 // Value in minutes after we think that a frontend task was killed by the webserver.
241 'frontend_worker_timeout' => 10,
243 // groupedit_image_limit (Integer)
244 // Number of contacts at which the group editor should switch from display the profile pictures of the contacts to only display the names.
245 // This can alternatively be set on a per account basis in the pconfig table.
246 'groupedit_image_limit' => 400,
249 // Enables the sending of HTTP Strict Transport Security headers.
252 // ignore_cache (Boolean)
253 // For development only. Disables the item cache.
254 'ignore_cache' => false,
256 // insecure_imap (Boolean)
257 // If enabled, users are allowed to connect to their IMAP servers unencrypted.
258 // For security reasons this is disabled by default.
259 'insecure_imap' => false,
261 // instances_social_key (String)
262 // Key to the API of https://instances.social which retrieves data about mastodon servers.
263 // See https://instances.social/api/token to get an API key.
264 'instances_social_key' => '',
266 // ipv4_resolve (Boolean)
267 // Resolve IPV4 addresses only. Don't resolve to IPV6.
268 'ipv4_resolve' => false,
270 // invitation_only (Boolean)
271 // If set true registration is only possible after a current member of the node has send an invitation.
272 'invitation_only' => false,
274 // itemspage_network (Integer)
275 // default number of items per page in stream pages (network, community, profile/contact statuses, search)
276 'itemspage_network' => 40,
278 // itemspage_network_mobile (Integer)
279 // default number of items per page in stream pages (network, community, profile/contact statuses, search)
280 // on detected mobile devices
281 'itemspage_network_mobile' => 20,
283 // like_no_comment (Boolean)
284 // Don't update the "commented" value of an item when it is liked.
285 'like_no_comment' => false,
287 // local_block (Boolean)
288 // Used in conjunction with "block_public".
289 'local_block' => false,
291 // local_search (Boolean)
292 // Blocks search for users who are not logged in to prevent crawlers from blocking your system.
293 'local_search' => false,
295 // local_tags (Boolean)
296 // If activated, all hashtags will point to the local server.
297 'local_tags' => false,
299 // logger_config (String)
300 // Sets the logging adapter of Friendica globally (monolog, syslog, stream)
301 'logger_config' => 'stream',
303 // maintenance_start (String)
304 // Start of the window for the daily maintenance cron call.
305 // The system timezone is used when no timezone is defined here.
306 'maintenance_start' => '01:00 +00:00',
308 // maintenance_end (String)
309 // End of the window for the daily maintenance cron call
310 // The system timezone is used when no timezone is defined here.
311 'maintenance_end' => '03:00 +00:00',
313 // max_batch_queue (Integer)
314 // Maximum number of batched queue items for a single contact before subsequent messages are discarded.
315 'max_batch_queue' => 1000,
317 // max_connections (Integer)
318 // The maximum number of database connections which can be in use before the worker process is deferred to its next interval.
319 // When the system can't detect the maximum numbers of connection then this value can be used. Use 0 for auto-detection.
320 'max_connections' => 0,
322 // max_connections_level (Integer 0-100)
323 // The maximum percentage of connections that are allowed to let the worker start.
324 'max_connections_level' => 75,
326 // max_contact_queue (Integer)
327 // Maximum number of queue items for a single contact before subsequent messages are discarded.
328 'max_contact_queue' => 500,
330 // max_csv_file_size (Integer)
331 // When uploading a CSV with account addresses to follow
332 // in the user settings, this controls the maximum file
333 // size of the upload file.
334 'max_csv_file_size' => 30720,
336 // max_feed_items (Integer)
337 // Maximum number of feed items that are fetched and processed. For unlimited items set to 0.
338 'max_feed_items' => 20,
340 // max_image_length (Integer)
341 // An alternate way of limiting picture upload sizes.
342 // Specify the maximum pixel length that pictures are allowed to be (for non-square pictures, it will apply to the longest side).
343 // Pictures longer than this length will be resized to be this length (on the longest side, the other side will be scaled appropriately).
344 // If you don't want to set a maximum length, set to -1.
345 'max_image_length' => -1,
347 // max_processes_backend (Integer)
348 // Maximum number of concurrent database processes for background tasks.
349 'max_processes_backend' => 5,
351 // max_processes_frontend (Integer)
352 // Maximum number of concurrent database processes for foreground tasks.
353 'max_processes_frontend' => 20,
355 // maximagesize (Integer)
356 // Maximum size in bytes of an uploaded photo.
357 'maximagesize' => 800000,
359 // memcache_host (String)
360 // Host name of the memcache daemon.
361 'memcache_host' => '127.0.0.1',
363 // memcache_port (Integer)
364 // Port number of the memcache daemon.
365 'memcache_port' => 11211,
367 // memcached_hosts (Array)
368 // Array of Memcached servers info [host, port(, weight)], see Memcached::addServers.
369 'memcached_hosts' => [
370 ['127.0.0.1', '11211'],
373 // min_poll_interval (Integer)
374 // minimal distance in minutes between two polls for a contact. Reasonable values are between 1 and 59.
375 'min_poll_interval' => 15,
377 // no_count (Boolean)
378 // Don't do count calculations (currently only when showing photo albums).
381 // no_oembed (Boolean)
382 // Don't use OEmbed to fetch more information about a link.
383 'no_oembed' => false,
385 // no_redirect_list (Array)
386 // List of domains where HTTP redirects should be ignored.
387 'no_redirect_list' => [],
389 // no_smilies (Boolean)
390 // Don't show smilies.
391 'no_smilies' => false,
393 // optimize_items (Boolean)
394 // Triggers an SQL command to optimize the item table before expiring items.
395 'optimize_items' => false,
397 // paranoia (Boolean)
398 // Log out users if their IP address changed.
401 // permit_crawling (Boolean)
402 // Restricts the search for not logged in users to one search per minute.
403 'permit_crawling' => false,
406 // Daemon pid file path. For example: pidfile = /path/to/daemon.pid
409 // png_quality (Integer)
410 // Sets the ImageMagick compression level for PNG images. Values ranges from 0 (uncompressed) to 9 (most compressed).
413 // profiler (Boolean)
414 // Enable internal timings to help optimize code. Needed for "rendertime" addon.
417 // proxy_cache_time (Integer)
418 // Period in seconds after which the cache is cleared.
419 'proxy_cache_time' => 86400,
421 // pushpoll_frequency (Integer)
422 // Frequency of contact poll for subhub contact using the DFRM or OStatus network.
429 // - 0 = every minute
430 'pushpoll_frequency' => 3,
432 // redis_host (String)
433 // Host name of the redis daemon.
434 'redis_host' => '127.0.0.1',
436 // redis_port (String)
437 // Port number of the redis daemon.
438 'redis_port' => 6379,
440 // redis_db (Integer)
441 // The sub-database of redis (0 - 15 possible sub-databases)
444 // redis_password (String)
445 // The authentication password for the redis database
446 'redis_password' => null,
448 // session_handler (database|cache|native)
449 // Whether to use Cache to store session data or to use PHP native session storage.
450 'session_handler' => 'database',
452 // remove_multiplicated_lines (Boolean)
453 // If enabled, multiple linefeeds in items are stripped to a single one.
454 'remove_multiplicated_lines' => false,
456 // sendmail_params (Boolean)
457 // Normal sendmail command parameters will be added when the PHP mail() function is called for sending e-mails.
458 // This ensures the Sender Email address setting is applied to the message envelope rather than the host's default address.
459 // Set to false if your non-sendmail agent is incompatible, or to restore old behavior of using the host address.
460 'sendmail_params' => true,
462 // show_global_community_hint (Boolean)
463 // 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.
464 'show_global_community_hint' => false,
466 // show_received (Boolean)
467 // Show the receive data along with the post creation date
468 'show_received' => true,
470 // show_received_seconds (Integer)
471 // Display the received date when the difference between received and created is higher than this.
472 'show_received_seconds' => 500,
474 // show_unsupported_addons (Boolean)
475 // Show all addons including the unsupported ones.
476 'show_unsupported_addons' => false,
478 // show_unsupported_themes (Boolean)
479 // Show all themes including the unsupported ones.
480 'show_unsupported_themes' => false,
482 // throttle_limit_day (Integer)
483 // Maximum number of posts that a user can send per day with the API. 0 to disable daily throttling.
484 'throttle_limit_day' => 0,
486 // throttle_limit_week (Integer)
487 // Maximum number of posts that a user can send per week with the API. 0 to disable weekly throttling.
488 'throttle_limit_week' => 0,
490 // throttle_limit_month (Integer)
491 // Maximum number of posts that a user can send per month with the API. 0 to disable monthly throttling.
492 'throttle_limit_month' => 0,
494 // update_active_contacts (Boolean)
495 // When activated, only public contacts will be activated regularly that are used for example in items or tags.
496 'update_active_contacts' => false,
498 // username_min_length (Integer)
499 // The minimum character length a username can be.
500 // This length is check once the username has been trimmed and multiple spaces have been collapsed into one.
501 // Minimum for this config value is 1. Maximum is 64 as the resulting profile URL mustn't be longer than 255 chars.
502 'username_min_length' => 3,
504 // username_max_length (Integer)
505 // The maximum character length a username can be.
506 // This length is check once the username has been trimmed and multiple spaces have been collapsed into one.
507 // Minimum for this config value is 1. Maximum is 64 as the resulting profile URL mustn't be longer than 255 chars.
508 'username_max_length' => 48,
510 // worker_cooldown (Integer)
511 // Cooldown period in seconds after each worker function call.
512 'worker_cooldown' => 0,
514 // worker_debug (Boolean)
515 // If enabled, it prints out the number of running processes split by priority.
516 'worker_debug' => false,
518 // worker_fetch_limit (Integer)
519 // Number of worker tasks that are fetched in a single query.
520 'worker_fetch_limit' => 1,
522 // worker_jpm (Boolean)
523 // If enabled, it prints out the jobs per minute.
524 'worker_jpm' => false,
526 // worker_jpm_range (String)
527 // List of minutes for the jobs per minute (JPM) calculation
528 'worker_jpm_range' => '1, 10, 60',
530 // worker_load_exponent (Integer)
531 // Default 3, which allows only 25% of the maximum worker queues when server load reaches around 37% of maximum load.
532 // For a linear response where 25% of worker queues are allowed at 75% of maximum load, set this to 1.
533 // Setting 0 would allow maximum worker queues at all times, which is not recommended.
534 'worker_load_exponent' => 3,
536 // worker_multiple_fetch (Boolean)
537 // When activated, the worker fetches jobs for multiple workers (not only for itself).
538 // This is an experimental setting without knowing the performance impact.
539 'worker_multiple_fetch' => false,
541 // worker_defer_limit (Integer)
542 // Per default the systems tries delivering for 15 times before dropping it.
543 'worker_defer_limit' => 15,
545 // xrd_timeout (Integer)
546 // Timeout in seconds for fetching the XRD links.
550 // exp_themes (Boolean)
551 // Show experimental themes in user settings.
552 'exp_themes' => false,
555 // hide_eventlist (Boolean)
556 // Don't show the birthdays and events on the profile and network page.
557 'hide_eventlist' => false,
561 // Enable debug level for the jabber account synchronisation.
564 // Must be writable by the ejabberd process. if set then it will prevent the running of multiple processes.
568 // ap_inbox_log (Boolean)
569 // Logs every call to /inbox as a JSON file in Friendica's temporary directory
570 'ap_inbox_log' => false,
572 // show_direction (Boolean)
573 // Display if a post had been fetched or had been pushed towards our server
574 'show_direction' => false,
576 // total_ap_delivery (Boolean)
577 // Deliver via AP to every possible receiver and we suppress the delivery to these contacts with other protocols
578 'total_ap_delivery' => false,