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 // Database user name. Please don't use "root".
40 // Database user password. Please don't use empty passwords.
48 // Database connection charset. Changing this value will likely corrupt special characters.
49 'charset' => 'utf8mb4',
51 // emulate_prepares (Boolean) (Experimental)
52 // If enabled, prepared statements will be emulated.
53 // In combination with MySQLi this will cast all return values to strings.
54 'emulate_prepares' => false,
56 // pdo_emulate_prepares (Boolean) (Experimental)
57 // If enabled, the builtin emulation for prepared statements is used.
58 // Due to limitations of that emulation (all return values are casted as strings)
59 // this will most likely cause issues and should not be used on production systems.
60 'pdo_emulate_prepares' => false,
62 // disable_pdo (Boolean)
63 // PDO is used by default (if available). Otherwise MySQLi will be used.
64 'disable_pdo' => false,
66 // persistent (Boolean)
67 // This controls if the system should use persistent connections or not.
68 // Persistent connections increase the performance.
69 // On the other hand the number of open connections are higher,
70 // this will most likely increase the system load.
71 'persistent' => false,
74 // admin_email (Comma-separated list)
75 // In order to perform system administration via the admin panel,
76 // this must precisely match the email address of the person logged in.
79 // admin_nickname (String)
80 // Nickname of the main admin user, used if there are more than one admin user defined in config => admin_email.
81 'admin_nickname' => '',
83 // max_import_size (Integer)
84 // Maximum body size of DFRN and Mail messages in characters. 0 is unlimited.
85 'max_import_size' => 200000,
88 // Location of PHP command line processor.
92 // adjust_poll_frequency (Boolean)
93 // Automatically detect and set the best feed poll frequency.
94 'adjust_poll_frequency' => false,
96 // allowed_link_protocols (Array)
97 // Allowed protocols in links URLs, add at your own risk. http(s) is always allowed.
98 'allowed_link_protocols' => ['ftp://', 'ftps://', 'mailto:', 'cid:', 'gopher://'],
100 // always_show_preview (Boolean)
101 // Only show small preview pictures.
102 'always_show_preview' => false,
104 // ap_always_bcc (Boolean)
105 // Adresses non-mentioned ActivityPub receivers by BCC instead of CC. Increases privacy, decreases performance.
106 'ap_always_bcc' => false,
108 // archival_days (Integer)
109 // Number of days that we try to deliver content before we archive a contact.
110 'archival_days' => 32,
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 // big_emojis (Boolean)
118 // Display "Emoji Only" posts in big.
119 'big_emojis' => false,
121 // block_local_dir (Boolean)
122 // Deny public access to the local user directory.
123 'block_local_dir' => false,
125 // cron_interval (Integer)
126 // Minimal period in minutes between two calls of the "Cron" worker job.
127 'cron_interval' => 5,
129 // cache_driver (database|memcache|memcached|redis|apcu)
130 // Whether to use Memcache, Memcached, Redis or APCu to store temporary cache.
131 'cache_driver' => 'database',
133 // config_adapter (jit|preload)
134 // Allow to switch the configuration adapter to improve performances at the cost of memory consumption.
135 'config_adapter' => 'jit',
137 // curl_range_bytes (Integer)
138 // Maximum number of bytes that should be fetched. Default is 0, which mean "no limit".
139 'curl_range_bytes' => 0,
141 // crawl_permit_period (Integer)
142 // Period in seconds between allowed searches when the number of free searches is reached and "permit_crawling" is activated.
143 'crawl_permit_period' => 60,
146 // Name of a logfile to log slow database queries.
149 // db_log_index (Path)
150 // Name of a logfile to log queries with bad indexes.
151 'db_log_index' => '',
153 // db_log_index_watch (Comma-separated list)
154 // Watchlist of indexes to watch.
155 'db_log_index_watch' => '',
157 // db_log_index_denylist (Comma-separated list)
158 // Deny list of indexes that shouldn't be watched.
159 'db_log_index_denylist' => '',
161 // db_loglimit (Integer)
162 // If a database call lasts longer than this value in seconds it is logged.
163 // Inactive if system => db_log is empty.
166 // db_loglimit_index (Integer)
167 // Number of index rows needed to be logged for indexes on the watchlist. 0 to disable.
168 'db_loglimit_index' => 0,
170 // db_loglimit_index_high (Integer)
171 // Number of index rows to be logged anyway (for any index). 0 to disable.
172 'db_loglimit_index_high' => 0,
174 // dbclean_expire_conversation (Integer)
175 // When DBClean is enabled, any entry in the conversation table will be deleted after this many days.
176 // This data is used for ActivityPub, so it shouldn't be lower than the average duration of a discussion.
177 'dbclean_expire_conversation' => 90,
179 // dbclean-expire-limit (Integer)
180 // This defines the number of items that are to be deleted in a single call.
181 // Reduce this value when you are getting memory issues.
182 'dbclean-expire-limit' => 1000,
184 // diaspora_test (Boolean)
185 // For development only. Disables the message transfer.
186 'diaspora_test' => false,
188 // disable_email_validation (Boolean)
189 // Disables the check if a mail address is in a valid format and can be resolved via DNS.
190 'disable_email_validation' => false,
192 // disable_implicit_mentions (Boolean) since 2019.03
193 // Implicit mentions are mentions in the body of replies that are redundant in a thread-enabled system like Friendica.
194 // This config key disables the gathering of implicit mentions in incoming and outgoing posts.
195 // Also disables the default automatic removal of implicit mentions from the body of incoming posts.
196 // Also disables the default automatic addition of implicit mentions in the body of outgoing posts.
197 // Disabling implicit mentions also affects the "explicit_mentions" additional feature by limiting it
198 // to the replied-to post author mention in the comment boxes.
199 'disable_implicit_mentions' => false,
201 // disable_url_validation (Boolean)
202 // Disables the DNS lookup of an URL.
203 'disable_url_validation' => false,
205 // disable_password_exposed (Boolean)
206 // Disable the exposition check against the remote haveibeenpwned API on password change.
207 'disable_password_exposed' => false,
209 // disable_polling (Boolean)
210 // Disable the polling of DFRN and OStatus contacts through onepoll.php.
211 'disable_polling' => false,
214 // location of the developer log file.
218 // restricts develop log writes to requests originating from this IP address.
221 // free_crawls (Integer)
222 // Number of "free" searches when system => permit_crawling is enabled.
225 // frontend_worker_timeout (Integer)
226 // Value in minutes after we think that a frontend task was killed by the webserver.
227 'frontend_worker_timeout' => 10,
229 // groupedit_image_limit (Integer)
230 // Number of contacts at which the group editor should switch from display the profile pictures of the contacts to only display the names.
231 // This can alternatively be set on a per account basis in the pconfig table.
232 'groupedit_image_limit' => 400,
235 // Enables the sending of HTTP Strict Transport Security headers.
238 // ignore_cache (Boolean)
239 // For development only. Disables the item cache.
240 'ignore_cache' => false,
242 // insecure_imap (Boolean)
243 // If enabled, users are allowed to connect to their IMAP servers unencrypted.
244 // For security reasons this is disabled by default.
245 'insecure_imap' => false,
247 // instances_social_key (String)
248 // Key to the API of https://instances.social which retrieves data about mastodon servers.
249 // See https://instances.social/api/token to get an API key.
250 'instances_social_key' => '',
252 // ipv4_resolve (Boolean)
253 // Resolve IPV4 addresses only. Don't resolve to IPV6.
254 'ipv4_resolve' => false,
256 // invitation_only (Boolean)
257 // If set true registration is only possible after a current member of the node has send an invitation.
258 'invitation_only' => false,
260 // itemspage_network (Integer)
261 // default number of items per page in stream pages (network, community, profile/contact statuses, search)
262 'itemspage_network' => 40,
264 // itemspage_network_mobile (Integer)
265 // default number of items per page in stream pages (network, community, profile/contact statuses, search)
266 // on detected mobile devices
267 'itemspage_network_mobile' => 20,
269 // like_no_comment (Boolean)
270 // Don't update the "commented" value of an item when it is liked.
271 'like_no_comment' => false,
273 // local_block (Boolean)
274 // Used in conjunction with "block_public".
275 'local_block' => false,
277 // local_search (Boolean)
278 // Blocks search for users who are not logged in to prevent crawlers from blocking your system.
279 'local_search' => false,
281 // local_tags (Boolean)
282 // If activated, all hashtags will point to the local server.
283 'local_tags' => false,
285 // logger_config (String)
286 // Sets the logging adapter of Friendica globally (monolog, syslog, stream)
287 'logger_config' => 'stream',
289 // max_batch_queue (Integer)
290 // Maximum number of batched queue items for a single contact before subsequent messages are discarded.
291 'max_batch_queue' => 1000,
293 // max_connections (Integer)
294 // The maximum number of database connections which can be in use before the worker process is deferred to its next interval.
295 // When the system can't detect the maximum numbers of connection then this value can be used. Use 0 for auto-detection.
296 'max_connections' => 0,
298 // max_connections_level (Integer 0-100)
299 // The maximum percentage of connections that are allowed to let the worker start.
300 'max_connections_level' => 75,
302 // max_contact_queue (Integer)
303 // Maximum number of queue items for a single contact before subsequent messages are discarded.
304 'max_contact_queue' => 500,
306 // max_feed_items (Integer)
307 // Maximum number of feed items that are fetched and processed. For unlimited items set to 0.
308 'max_feed_items' => 20,
310 // max_image_length (Integer)
311 // An alternate way of limiting picture upload sizes.
312 // Specify the maximum pixel length that pictures are allowed to be (for non-square pictures, it will apply to the longest side).
313 // Pictures longer than this length will be resized to be this length (on the longest side, the other side will be scaled appropriately).
314 // If you don't want to set a maximum length, set to -1.
315 'max_image_length' => -1,
317 // max_processes_backend (Integer)
318 // Maximum number of concurrent database processes for background tasks.
319 'max_processes_backend' => 5,
321 // max_processes_frontend (Integer)
322 // Maximum number of concurrent database processes for foreground tasks.
323 'max_processes_frontend' => 20,
325 // maximagesize (Integer)
326 // Maximum size in bytes of an uploaded photo.
327 'maximagesize' => 800000,
329 // memcache_host (String)
330 // Host name of the memcache daemon.
331 'memcache_host' => '127.0.0.1',
333 // memcache_port (Integer)
334 // Port number of the memcache daemon.
335 'memcache_port' => 11211,
337 // memcached_hosts (Array)
338 // Array of Memcached servers info [host, port(, weight)], see Memcached::addServers.
339 'memcached_hosts' => [
340 ['127.0.0.1', '11211'],
343 // min_poll_interval (Integer)
344 // minimal distance in minutes between two polls for a contact. Reasonable values are between 1 and 59.
345 'min_poll_interval' => 15,
347 // no_count (Boolean)
348 // Don't do count calculations (currently only when showing photo albums).
351 // no_oembed (Boolean)
352 // Don't use OEmbed to fetch more information about a link.
353 'no_oembed' => false,
355 // no_smilies (Boolean)
356 // Don't show smilies.
357 'no_smilies' => false,
359 // optimize_items (Boolean)
360 // Triggers an SQL command to optimize the item table before expiring items.
361 'optimize_items' => false,
363 // paranoia (Boolean)
364 // Log out users if their IP address changed.
367 // permit_crawling (Boolean)
368 // Restricts the search for not logged in users to one search per minute.
369 'permit_crawling' => false,
372 // Daemon pid file path. For example: pidfile = /path/to/daemon.pid
375 // png_quality (Integer)
376 // Sets the ImageMagick compression level for PNG images. Values ranges from 0 (uncompressed) to 9 (most compressed).
379 // profiler (Boolean)
380 // Enable internal timings to help optimize code. Needed for "rendertime" addon.
383 // proxy_cache_time (Integer)
384 // Period in seconds after which the cache is cleared.
385 'proxy_cache_time' => 86400,
387 // pushpoll_frequency (Integer)
388 // Frequency of contact poll for subhub contact using the DFRM or OStatus network.
395 // - 0 = every minute
396 'pushpoll_frequency' => 3,
398 // queue_no_dead_check (Boolean)
399 // Ignore if the target contact or server seems to be dead during queue delivery.
400 'queue_no_dead_check' => false,
402 // redis_host (String)
403 // Host name of the redis daemon.
404 'redis_host' => '127.0.0.1',
406 // redis_port (String)
407 // Port number of the redis daemon.
408 'redis_port' => 6379,
410 // redis_db (Integer)
411 // The sub-database of redis (0 - 15 possible sub-databases)
414 // redis_password (String)
415 // The authentication password for the redis database
416 'redis_password' => null,
418 // session_handler (database|cache|native)
419 // Whether to use Cache to store session data or to use PHP native session storage.
420 'session_handler' => 'database',
422 // remove_multiplicated_lines (Boolean)
423 // If enabled, multiple linefeeds in items are stripped to a single one.
424 'remove_multiplicated_lines' => false,
426 // sendmail_params (Boolean)
427 // Normal sendmail command parameters will be added when the PHP mail() function is called for sending e-mails.
428 // This ensures the Sender Email address setting is applied to the message envelope rather than the host's default address.
429 // Set to false if your non-sendmail agent is incompatible, or to restore old behavior of using the host address.
430 'sendmail_params' => true,
432 // show_global_community_hint (Boolean)
433 // 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.
434 'show_global_community_hint' => false,
436 // show_received (Boolean)
437 // Show the receive data along with the post creation date
438 'show_received' => true,
440 // show_received_seconds (Integer)
441 // Display the received date when the difference between received and created is higher than this.
442 'show_received_seconds' => 500,
444 // show_unsupported_addons (Boolean)
445 // Show all addons including the unsupported ones.
446 'show_unsupported_addons' => false,
448 // show_unsupported_themes (Boolean)
449 // Show all themes including the unsupported ones.
450 'show_unsupported_themes' => false,
452 // throttle_limit_day (Integer)
453 // Maximum number of posts that a user can send per day with the API. 0 to disable daily throttling.
454 'throttle_limit_day' => 0,
456 // throttle_limit_week (Integer)
457 // Maximum number of posts that a user can send per week with the API. 0 to disable weekly throttling.
458 'throttle_limit_week' => 0,
460 // throttle_limit_month (Integer)
461 // Maximum number of posts that a user can send per month with the API. 0 to disable monthly throttling.
462 'throttle_limit_month' => 0,
464 // username_min_length (Integer)
465 // The minimum character length a username can be.
466 // This length is check once the username has been trimmed and multiple spaces have been collapsed into one.
467 // Minimum for this config value is 1. Maximum is 64 as the resulting profile URL mustn't be longer than 255 chars.
468 'username_min_length' => 3,
470 // username_max_length (Integer)
471 // The maximum character length a username can be.
472 // This length is check once the username has been trimmed and multiple spaces have been collapsed into one.
473 // Minimum for this config value is 1. Maximum is 64 as the resulting profile URL mustn't be longer than 255 chars.
474 'username_max_length' => 48,
476 // worker_cooldown (Integer)
477 // Cooldown period in seconds after each worker function call.
478 'worker_cooldown' => 0,
480 // worker_debug (Boolean)
481 // If enabled, it prints out the number of running processes split by priority.
482 'worker_debug' => false,
484 // worker_fetch_limit (Integer)
485 // Number of worker tasks that are fetched in a single query.
486 'worker_fetch_limit' => 1,
488 // worker_jpm (Boolean)
489 // If enabled, it prints out the jobs per minute.
490 'worker_jpm' => false,
492 // worker_jpm_range (String)
493 // List of minutes for the jobs per minute (JPM) calculation
494 'worker_jpm_range' => '1, 10, 60',
496 // worker_load_exponent (Integer)
497 // Default 3, which allows only 25% of the maximum worker queues when server load reaches around 37% of maximum load.
498 // For a linear response where 25% of worker queues are allowed at 75% of maximum load, set this to 1.
499 // Setting 0 would allow maximum worker queues at all times, which is not recommended.
500 'worker_load_exponent' => 3,
502 // worker_defer_limit (Integer)
503 // Per default the systems tries delivering for 15 times before dropping it.
504 'worker_defer_limit' => 15,
506 // xrd_timeout (Integer)
507 // Timeout in seconds for fetching the XRD links.
511 // exp_themes (Boolean)
512 // Show experimental themes in user settings.
513 'exp_themes' => false,
516 // hide_eventlist (Boolean)
517 // Don't show the birthdays and events on the profile and network page.
518 'hide_eventlist' => false,
522 // Enable debug level for the jabber account synchronisation.
525 // Must be writable by the ejabberd process. if set then it will prevent the running of multiple processes.
529 // ap_inbox_log (Boolean)
530 // Logs every call to /inbox as a JSON file in Friendica's temporary directory
531 'ap_inbox_log' => false,
533 // show_direction (Boolean)
534 // Display if a post had been fetched or had been pushed towards our server
535 'show_direction' => false,
537 // total_ap_delivery (Boolean)
538 // Deliver via AP to every possible receiver and we suppress the delivery to these contacts with other protocols
539 'total_ap_delivery' => false,