3 * @copyright Copyright (C) 2010-2023, 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 username. 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 // add_missing_posts (boolean)
97 // Checks for missing entries in "post", "post-thread" or "post-thread-user" and creates them
98 'add_missing_posts' => 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 // Addresses non-mentioned ActivityPub receivers by BCC instead of CC. Increases privacy, decreases performance.
110 'ap_always_bcc' => false,
112 // auth_cookie_lifetime (Integer)
113 // Number of days that should pass without any activity before a user who
114 // chose "Remember me" when logging in is considered logged out.
115 'auth_cookie_lifetime' => 7,
117 // avatar_cache (Boolean)
118 // Cache avatar pictures as files (experimental)
119 'avatar_cache' => false,
121 // avatar_cache_path (String)
122 // File path to the avatar cache. Default is /(your basepath)/avatar/
123 // The value has to be an absolute path and has to end with a "/"
124 'avatar_cache_path' => '',
126 // avatar_cache_url (String)
127 // Base URL of the avatar cache. Default is http(s)://(your hostname)/avatar/
128 // The value has to start with the scheme and end with a "/"
129 'avatar_cache_url' => '',
131 // basicauth (Boolean)
132 // Controls if login via BasicAuth is possible (default is true)
135 // big_emojis (Boolean)
136 // Display "Emoji Only" posts in big.
137 'big_emojis' => true,
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 // contact_update_limit (Integer)
148 // How many contacts should be checked at a time?
149 'contact_update_limit' => 100,
151 // cache_driver (database|memcache|memcached|redis|apcu)
152 // Whether to use Memcache, Memcached, Redis or APCu to store temporary cache.
153 'cache_driver' => 'database',
155 // distributed_cache_driver (database|memcache|memcached|redis)
156 // Whether to use database, Memcache, Memcached or Redis as a distributed cache.
157 'distributed_cache_driver' => 'database',
159 // fetch_parents (Boolean)
160 // Fetch missing parent posts
161 'fetch_parents' => true,
163 // config_adapter (jit|preload)
164 // Allow to switch the configuration adapter to improve performances at the cost of memory consumption.
165 'config_adapter' => 'jit',
167 // crawl_permit_period (Integer)
168 // Period in seconds between allowed searches when the number of free searches is reached and "permit_crawling" is activated.
169 'crawl_permit_period' => 60,
172 // Name of a logfile to log slow database queries.
175 // db_log_index (Path)
176 // Name of a logfile to log queries with bad indexes.
177 'db_log_index' => '',
179 // db_log_index_watch (Comma-separated list)
180 // Watchlist of indexes to watch.
181 'db_log_index_watch' => '',
183 // db_log_index_denylist (Comma-separated list)
184 // Deny list of indexes that shouldn't be watched.
185 'db_log_index_denylist' => '',
187 // db_loglimit (Integer)
188 // If a database call lasts longer than this value in seconds it is logged.
189 // Inactive if system => db_log is empty.
192 // db_loglimit_index (Integer)
193 // Number of index rows needed to be logged for indexes on the watchlist. 0 to disable.
194 'db_loglimit_index' => 0,
196 // db_loglimit_index_high (Integer)
197 // Number of index rows to be logged anyway (for any index). 0 to disable.
198 'db_loglimit_index_high' => 0,
200 // dbclean_expire_conversation (Integer)
201 // When DBClean is enabled, any entry in the conversation table will be deleted after this many days.
202 // This data is used for ActivityPub, so it shouldn't be lower than the average duration of a discussion.
203 'dbclean_expire_conversation' => 90,
205 // dbclean-expire-limit (Integer)
206 // This defines the number of items that are to be deleted in a single call.
207 // Reduce this value when you are getting lock issues.
208 // A value of 0 disables the deletion process.
209 'dbclean-expire-limit' => 1000,
211 // daemon_watchdog (Boolean)
212 // Enable regular checking if the daemon is running.
213 // If it is not running and hadn't been terminated normally, it will be started automatically.
214 'daemon_watchdog' => false,
216 // delete_sleeping_processes (Boolean)
217 // Periodically delete waiting database processes.
218 'delete_sleeping_processes' => false,
220 // delete-blocked-servers (Boolean)
221 // Delete blocked servers if there are no foreign key violations.
222 'delete-blocked-servers' => false,
224 // dice_profiler_threshold (Float)
225 // For profiling Dice class creation (0 = disabled, >0 = seconds threshold for profiling)
226 'dice_profiler_threshold' => 0.5,
228 // diaspora_test (Boolean)
229 // For development only. Disables the message transfer.
230 'diaspora_test' => false,
232 // disable_email_validation (Boolean)
233 // Disables the check if a mail address is in a valid format and can be resolved via DNS.
234 'disable_email_validation' => false,
236 // disable_implicit_mentions (Boolean) since 2019.03
237 // Implicit mentions are mentions in the body of replies that are redundant in a thread-enabled system like Friendica.
238 // This config key disables the gathering of implicit mentions in incoming and outgoing posts.
239 // Also disables the default automatic removal of implicit mentions from the body of incoming posts.
240 // Also disables the default automatic addition of implicit mentions in the body of outgoing posts.
241 // Disabling implicit mentions also affects the "explicit_mentions" additional feature by limiting it
242 // to the replied-to post author mention in the comment boxes.
243 'disable_implicit_mentions' => false,
245 // disable_url_validation (Boolean)
246 // Disables the DNS lookup of a URL.
247 'disable_url_validation' => false,
249 // disable_password_exposed (Boolean)
250 // Disable the exposition check against the remote haveibeenpwned API on password change.
251 'disable_password_exposed' => false,
253 // display_resharer (Boolean)
254 // Display the first resharer as icon and text on a reshared item.
255 'display_resharer' => false,
258 // location of the developer log file.
262 // restricts develop log writes to requests originating from this IP address.
265 // legacy_activities (Boolean)
266 // Display received activities (like, dislike, reshare) as detailed list
267 'legacy_activities' => true,
269 // expire-notify-priority (integer)
270 // Priority for the expiry notification
271 'expire-notify-priority' => Friendica\Core\Worker::PRIORITY_LOW,
273 // fetch_featured_posts (Boolean)
274 // Fetch featured posts from all contacts
275 'fetch_featured_posts' => false,
277 // free_crawls (Integer)
278 // Number of "free" searches when system => permit_crawling is enabled.
281 // circle_edit_image_limit (Integer)
282 // Number of contacts at which the circle editor should switch from display the profile pictures of the contacts to only display the names.
283 // This can alternatively be set on a per-account basis in the pconfig table.
284 'circle_edit_image_limit' => 400,
286 // gserver_update_limit (Integer)
287 // How many servers should be checked at a time?
288 'gserver_update_limit' => 100,
291 // Enables the sending of HTTP Strict Transport Security headers.
294 // ignore_cache (Boolean)
295 // For development only. Disables the item cache.
296 'ignore_cache' => false,
298 // insecure_imap (Boolean)
299 // If enabled, users are allowed to connect to their IMAP servers unencrypted.
300 // For security reasons this is disabled by default.
301 'insecure_imap' => false,
303 // instances_social_key (String)
304 // Key to the API of https://instances.social which retrieves data about mastodon servers.
305 // See https://instances.social/api/token to get an API key.
306 'instances_social_key' => '',
308 // ipv4_resolve (Boolean)
309 // Resolve IPV4 addresses only. Don't resolve to IPV6.
310 'ipv4_resolve' => false,
312 // ini_max_execution_time (False|Integer)
313 // Set the number of seconds a script is allowed to run. Default unlimited for Friendica, false to use the system value.
314 'ini_max_execution_time' => 0,
316 // ini_pcre_backtrack_limit (False|Integer)
317 // This has to be quite large to deal with embedded private photos. False to use the system value.
318 'ini_pcre_backtrack_limit' => 500000,
320 // invitation_only (Boolean)
321 // If set true registration is only possible after a current member of the node has sent an invitation.
322 'invitation_only' => false,
324 // like_no_comment (Boolean)
325 // Don't update the "commented" value of an item when it is liked.
326 'like_no_comment' => false,
328 // local_tags (Boolean)
329 // If activated, all hashtags will point to the local server.
330 'local_tags' => true,
332 // lock_driver (semaphore|database|memcache|memcached|redis|apcu)
333 // Whether to use semaphores, the database, Memcache, Memcached, Redis or APCu to handle locks.
334 // Default is auto detection which tries semaphores first, then falls back to the cache driver.
337 // logger_config (String)
338 // Sets the logging adapter of Friendica globally (monolog, syslog, stream)
339 'logger_config' => 'stream',
341 // syslog_flags (Integer)
342 // Sets the syslog flags in case 'logger_config' is set to 'syslog'
343 'syslog_flags' => LOG_CONS | LOG_PID | LOG_ODELAY,
345 // syslog_facility (Integer)
346 // Sets the syslog facility in case 'logger_config' is set to 'syslog'
347 'syslog_facility' => LOG_USER,
349 // maintenance_start (String)
350 // Start of the window for the daily maintenance cron call.
351 // The system timezone is used when no timezone is defined here.
352 'maintenance_start' => '01:00 +00:00',
354 // maintenance_end (String)
355 // End of the window for the daily maintenance cron call
356 // The system timezone is used when no timezone is defined here.
357 'maintenance_end' => '03:00 +00:00',
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_csv_file_size (Integer)
369 // When uploading a CSV with account addresses to follow
370 // in the user settings, this controls the maximum file
371 // size of the upload file.
372 'max_csv_file_size' => 30720,
374 // max_feed_items (Integer)
375 // Maximum number of feed items that are fetched and processed. For unlimited items set to 0.
376 'max_feed_items' => 20,
378 // max_image_length (Integer)
379 // An alternate way of limiting picture upload sizes.
380 // Specify the maximum pixel length that pictures are allowed to be (for non-square pictures, it will apply to the longest side).
381 // Pictures longer than this length will be resized to be this length (on the longest side, the other side will be scaled appropriately).
382 // If you don't want to set a maximum length, set to -1.
383 'max_image_length' => -1,
385 // max_likers (Integer)
386 // Maximum number of "people who like (or don't like) this" that we will list by name
389 // max_processes_backend (Integer)
390 // Maximum number of concurrent database processes for background tasks.
391 'max_processes_backend' => 5,
393 // max_processes_frontend (Integer)
394 // Maximum number of concurrent database processes for foreground tasks.
395 'max_processes_frontend' => 20,
397 // max_receivers (Integer)
398 // The maximum number of displayed receivers of posts
399 'max_receivers' => 10,
401 // max_recursion_depth (Integer)
402 // Maximum recursion depth when fetching posts until the job is delegated to a worker task or finished.
403 'max_recursion_depth' => 50,
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 // minimum_posting_interval (Integer)
420 // Minimum interval between two feed posts per user
421 'minimum_posting_interval' => 0,
423 // no_count (Boolean)
424 // Don't do count calculations (currently only when showing photo albums).
427 // no_oembed (Boolean)
428 // Don't use OEmbed to fetch more information about a link.
429 'no_oembed' => false,
431 // no_redirect_list (Array)
432 // List of domains where HTTP redirects should be ignored.
433 'no_redirect_list' => [],
435 // no_smilies (Boolean)
436 // Don't show smilies.
437 'no_smilies' => false,
439 // optimize_all_tables (Boolean)
440 // Optimizes all tables instead of only tables like workerqueue or the cache
441 'optimize_all_tables' => 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 range from 0 (uncompressed) to 9 (most compressed).
459 // profiler (Boolean)
460 // Enable internal timings to help optimize code. Needed for "rendertime" addon.
463 // redis_host (String)
464 // Host name or the path to the Unix domain socket of the Redis daemon.
465 'redis_host' => '127.0.0.1',
467 // redis_port (Integer)
468 // Port number of the Redis daemon, should be -1 for unix domain socket
469 'redis_port' => 6379,
471 // redis_db (Integer)
472 // The sub-database of redis (0 - 15 possible sub-databases)
475 // redis_password (String)
476 // The authentication password for the redis database
477 'redis_password' => null,
479 // redistribute_activities (Boolean)
480 // Redistribute incoming activities via ActivityPub
481 'redistribute_activities' => true,
483 // session_handler (database|cache|native)
484 // Whether to use Cache to store session data or to use PHP native session storage.
485 'session_handler' => 'database',
487 // remote_avatar_lookup (Boolean)
488 // Perform an avatar lookup via the activated services for remote contacts
489 'remote_avatar_lookup' => false,
491 // remove_multiplicated_lines (Boolean)
492 // If enabled, multiple linefeeds in items are stripped to a single one.
493 'remove_multiplicated_lines' => false,
495 // runtime_ignore (Array)
496 // List of ignored commands for the runtime logging.
497 'runtime_ignore' => [],
499 // runtime_loglimit (Integer)
500 // The runtime is logged, When the program execution time is higher than this value.
501 'runtime_loglimit' => 0,
503 // sendmail_params (Boolean)
504 // Normal sendmail command parameters will be added when the PHP mail() function is called for sending e-mails.
505 // This ensures the Sender Email address setting is applied to the message envelope rather than the host's default address.
506 // Set to false if your non-sendmail agent is incompatible, or to restore old behavior of using the host address.
507 'sendmail_params' => true,
509 // set_creation_date (Boolean)
510 // When enabled, the user can enter a creation date when composing a post.
511 'set_creation_date' => false,
513 // show_global_community_hint (Boolean)
514 // 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 at your node.
515 'show_global_community_hint' => false,
517 // show_received (Boolean)
518 // Show the received date along with the post creation date
519 'show_received' => true,
521 // show_received_seconds (Integer)
522 // Display the received date when the difference between received and created is higher than this.
523 'show_received_seconds' => 500,
525 // show_unsupported_addons (Boolean)
526 // Show all addons including the unsupported ones.
527 'show_unsupported_addons' => false,
529 // show_unsupported_themes (Boolean)
530 // Show all themes including the unsupported ones.
531 'show_unsupported_themes' => false,
533 // throttle_limit_day (Integer)
534 // Maximum number of posts that a user can send per day with the API. 0 to disable daily throttling.
535 'throttle_limit_day' => 0,
537 // throttle_limit_week (Integer)
538 // Maximum number of posts that a user can send per week with the API. 0 to disable weekly throttling.
539 'throttle_limit_week' => 0,
541 // throttle_limit_month (Integer)
542 // Maximum number of posts that a user can send per month with the API. 0 to disable monthly throttling.
543 'throttle_limit_month' => 0,
545 // transmit_pending_events (Boolean)
546 // Transmit pending events upon accepted contact request for groups
547 'transmit_pending_events' => false,
549 // username_min_length (Integer)
550 // The minimum character length a username can be.
551 // This length is checked once the username has been trimmed and multiple spaces have been collapsed into one.
552 // Minimum for this config value is 1. Maximum is 64 as the resulting profile URL mustn't be longer than 255 chars.
553 'username_min_length' => 3,
555 // username_max_length (Integer)
556 // The maximum character length a username can be.
557 // This length is checked once the username has been trimmed and multiple spaces have been collapsed into one.
558 // Minimum for this config value is 1. Maximum is 64 as the resulting profile URL mustn't be longer than 255 chars.
559 'username_max_length' => 48,
561 // worker_cooldown (Float)
562 // Cooldown period in seconds before each worker function call.
563 'worker_cooldown' => 0,
565 // worker_debug (Boolean)
566 // If enabled, it prints out the number of running processes split by priority.
567 'worker_debug' => false,
569 // worker_fork (Boolean)
570 // Experimental setting. Use pcntl_fork to spawn a new worker process.
571 // Does not work when "worker_multiple_fetch" is enabled (Needs more testing)
572 'worker_fork' => false,
574 // worker_jpm (Boolean)
575 // If enabled, it prints out the jobs per minute.
576 'worker_jpm' => false,
578 // worker_jpm_range (String)
579 // List of minutes for the jobs per minute (JPM) calculation
580 'worker_jpm_range' => '1, 10, 60',
582 // worker_load_exponent (Integer)
583 // Default 3, which allows only 25% of the maximum worker queues when server load reaches around 37% of maximum load.
584 // For a linear response where 25% of worker queues are allowed at 75% of maximum load, set this to 1.
585 // Setting 0 would allow maximum worker queues at all times, which is not recommended.
586 'worker_load_exponent' => 3,
588 // worker_max_duration (Array)
589 // Maximum runtime per priority. Worker processes that exceed this runtime will be terminated.
590 'worker_max_duration' => [
591 Friendica\Core\Worker::PRIORITY_CRITICAL => 720,
592 Friendica\Core\Worker::PRIORITY_HIGH => 10,
593 Friendica\Core\Worker::PRIORITY_MEDIUM => 60,
594 Friendica\Core\Worker::PRIORITY_LOW => 180,
595 Friendica\Core\Worker::PRIORITY_NEGLIGIBLE => 720
598 // worker_processes_cooldown (Integer)
599 // Maximum number per processes that causes a cooldown before each worker function call.
600 'worker_processes_cooldown' => 0,
602 // worker_multiple_fetch (Boolean)
603 // When activated, the worker fetches jobs for multiple workers (not only for itself).
604 // This is an experimental setting without knowing the performance impact.
605 // Does not work when "worker_fork" is enabled (Needs more testing)
606 'worker_multiple_fetch' => false,
608 // xrd_timeout (Integer)
609 // Timeout in seconds for fetching the XRD links and other requests with an expected shorter timeout
613 // forwarded_for_headers (String)
614 // A comma separated list of all allowed header values to retrieve the real client IP
615 // The headers are evaluated in order.
616 'forwarded_for_headers' => 'HTTP_X_FORWARDED_FOR',
618 // trusted_proxies (String)
619 // A comma separated list of all trusted proxies, which will get skipped during client IP retrieval
620 // IP ranges and CIDR notations are allowed
621 'trusted_proxies' => '',
624 // exp_themes (Boolean)
625 // Show experimental themes in user settings.
626 'exp_themes' => false,
629 // hide_eventlist (Boolean)
630 // Don't show the birthdays and events on the profile and network page.
631 'hide_eventlist' => false,
635 // Enable debug level for the jabber account synchronisation.
638 // Must be writable by the ejabberd process. if set then it will prevent the running of multiple processes.
642 // native_photos (Boolean)
643 // If enabled, photos to Diaspora will be transmitted via the "photo" element instead of embedding them to the body.
644 // This is some visual improvement over the embedding but comes with the cost of losing accessibility.
645 // Is is disabled by default until Diaspora eventually will work on issue https://github.com/diaspora/diaspora/issues/8297
646 'native_photos' => false,
649 // ap_inbox_log (Boolean)
650 // Logs every call to /inbox as a JSON file in Friendica's temporary directory
651 'ap_inbox_log' => false,
653 // ap_inbox_store_untrusted (Boolean)
654 // Store untrusted content in the inbox entries
655 'ap_inbox_store_untrusted' => false,
657 // ap_log_unknown (Boolean)
658 // Logs every unknown ActivityPub activity
659 'ap_log_unknown' => false,
661 // ap_log_failure (Boolean)
662 // Logs every ActivityPub activity that couldn't be compacted
663 'ap_log_failure' => false,
665 // store_source (Boolean)
666 // Store the source of any post that arrived
667 'store_source' => false,
670 // config_dir (String)
671 // Base working directory for the templating engine, must be writeable by the webserver user
672 'config_dir' => 'view/smarty3',
674 // use_sub_dirs (Boolean)
675 // By default the template cache is stored in several subdirectories.
676 'use_sub_dirs' => true,
679 // mastodon_banner (String)
680 // Default banner image for Mastodon API, must be a relative path from the base Friendica folder
682 // Default picture credits:
683 // Author: Lostinlight <https://mastodon.xyz/@lightone>
684 // License: CC0 https://creativecommons.org/share-your-work/public-domain/cc0/
685 // Link to original work: https://gitlab.com/lostinlight/per_aspera_ad_astra/-/blob/master/friendica-404/friendica-promo-bubbles.jpg
686 'mastodon_banner' => '/images/friendica-banner.jpg',
690 // Wether the blocklist is publicly listed under /about (or in any later API)