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,
67 // admin_email (Comma-separated list)
68 // In order to perform system administration via the admin panel,
69 // this must precisely match the email address of the person logged in.
72 // admin_nickname (String)
73 // Nickname of the main admin user, used if there are more than one admin user defined in config => admin_email.
74 'admin_nickname' => '',
76 // max_import_size (Integer)
77 // Maximum body size of DFRN and Mail messages in characters. 0 is unlimited.
78 'max_import_size' => 200000,
81 // Location of PHP command line processor.
85 // allowed_link_protocols (Array)
86 // Allowed protocols in links URLs, add at your own risk. http(s) is always allowed.
87 'allowed_link_protocols' => ['ftp://', 'ftps://', 'mailto:', 'cid:', 'gopher://'],
89 // always_show_preview (Boolean)
90 // Only show small preview pictures.
91 'always_show_preview' => false,
93 // ap_always_bcc (Boolean)
94 // Adresses non-mentioned ActivityPub receivers by BCC instead of CC. Increases privacy, decreases performance.
95 'ap_always_bcc' => false,
97 // archival_days (Integer)
98 // Number of days that we try to deliver content before we archive a contact.
99 'archival_days' => 32,
101 // auth_cookie_lifetime (Integer)
102 // Number of days that should pass without any activity before a user who
103 // chose "Remember me" when logging in is considered logged out.
104 'auth_cookie_lifetime' => 7,
106 // block_local_dir (Boolean)
107 // Deny public access to the local user directory.
108 'block_local_dir' => false,
110 // cron_interval (Integer)
111 // Minimal period in minutes between two calls of the "Cron" worker job.
112 'cron_interval' => 5,
114 // cache_driver (database|memcache|memcached|redis)
115 // Whether to use Memcache or Memcached or Redis to store temporary cache.
116 'cache_driver' => 'database',
118 // config_adapter (jit|preload)
119 // Allow to switch the configuration adapter to improve performances at the cost of memory consumption.
120 'config_adapter' => 'jit',
122 // curl_range_bytes (Integer)
123 // Maximum number of bytes that should be fetched. Default is 0, which mean "no limit".
124 'curl_range_bytes' => 0,
126 // crawl_permit_period (Integer)
127 // Period in seconds between allowed searches when the number of free searches is reached and "permit_crawling" is activated.
128 'crawl_permit_period' => 60,
131 // Name of a logfile to log slow database queries.
134 // db_log_index (Path)
135 // Name of a logfile to log queries with bad indexes.
136 'db_log_index' => '',
138 // db_log_index_watch (Comma-separated list)
139 // Watchlist of indexes to watch.
140 'db_log_index_watch' => '',
142 // db_log_index_blacklist (Comma-separated list)
143 // Blacklist of indexes that shouldn't be watched.
144 'db_log_index_blacklist' => '',
146 // db_loglimit (Integer)
147 // If a database call lasts longer than this value in seconds it is logged.
148 // Inactive if system => db_log is empty.
151 // db_loglimit_index (Integer)
152 // Number of index rows needed to be logged for indexes on the watchlist. 0 to disable.
153 'db_loglimit_index' => 0,
155 // db_loglimit_index_high (Integer)
156 // Number of index rows to be logged anyway (for any index). 0 to disable.
157 'db_loglimit_index_high' => 0,
159 // dbclean_expire_conversation (Integer)
160 // When DBClean is enabled, any entry in the conversation table will be deleted after this many days.
161 // This data is used for ActivityPub, so it shouldn't be lower than the average duration of a discussion.
162 'dbclean_expire_conversation' => 90,
164 // dbclean-expire-limit (Integer)
165 // This defines the number of items that are to be deleted in a single call.
166 // Reduce this value when you are getting memory issues.
167 'dbclean-expire-limit' => 1000,
169 // diaspora_test (Boolean)
170 // For development only. Disables the message transfer.
171 'diaspora_test' => false,
173 // disable_email_validation (Boolean)
174 // Disables the check if a mail address is in a valid format and can be resolved via DNS.
175 'disable_email_validation' => false,
177 // disable_implicit_mentions (Boolean) since 2019.03
178 // Implicit mentions are mentions in the body of replies that are redundant in a thread-enabled system like Friendica.
179 // This config key disables the gathering of implicit mentions in incoming and outgoing posts.
180 // Also disables the default automatic removal of implicit mentions from the body of incoming posts.
181 // Also disables the default automatic addition of implicit mentions in the body of outgoing posts.
182 // Disabling implicit mentions also affects the "explicit_mentions" additional feature by limiting it
183 // to the replied-to post author mention in the comment boxes.
184 'disable_implicit_mentions' => false,
186 // disable_url_validation (Boolean)
187 // Disables the DNS lookup of an URL.
188 'disable_url_validation' => false,
190 // disable_password_exposed (Boolean)
191 // Disable the exposition check against the remote haveibeenpwned API on password change.
192 'disable_password_exposed' => false,
194 // disable_polling (Boolean)
195 // Disable the polling of DFRN and OStatus contacts through onepoll.php.
196 'disable_polling' => false,
199 // location of the developer log file.
203 // restricts develop log writes to requests originating from this IP address.
206 // free_crawls (Integer)
207 // Number of "free" searches when system => permit_crawling is enabled.
210 // frontend_worker_timeout (Integer)
211 // Value in minutes after we think that a frontend task was killed by the webserver.
212 'frontend_worker_timeout' => 10,
214 // groupedit_image_limit (Integer)
215 // Number of contacts at which the group editor should switch from display the profile pictures of the contacts to only display the names.
216 // This can alternatively be set on a per account basis in the pconfig table.
217 'groupedit_image_limit' => 400,
220 // Enables the sending of HTTP Strict Transport Security headers.
223 // ignore_cache (Boolean)
224 // For development only. Disables the item cache.
225 'ignore_cache' => false,
227 // insecure_imap (Boolean)
228 // If enabled, users are allowed to connect to their IMAP servers unencrypted.
229 // For security reasons this is disabled by default.
230 'insecure_imap' => false,
232 // instances_social_key (String)
233 // Key to the API of https://instances.social which retrieves data about mastodon servers.
234 // See https://instances.social/api/token to get an API key.
235 'instances_social_key' => '',
237 // ipv4_resolve (Boolean)
238 // Resolve IPV4 addresses only. Don't resolve to IPV6.
239 'ipv4_resolve' => false,
241 // invitation_only (Boolean)
242 // If set true registration is only possible after a current member of the node has send an invitation.
243 'invitation_only' => false,
245 // itemspage_network (Integer)
246 // default number of items per page in stream pages (network, community, profile/contact statuses, search)
247 'itemspage_network' => 40,
249 // itemspage_network_mobile (Integer)
250 // default number of items per page in stream pages (network, community, profile/contact statuses, search)
251 // on detected mobile devices
252 'itemspage_network_mobile' => 20,
254 // like_no_comment (Boolean)
255 // Don't update the "commented" value of an item when it is liked.
256 'like_no_comment' => false,
258 // local_block (Boolean)
259 // Used in conjunction with "block_public".
260 'local_block' => false,
262 // local_search (Boolean)
263 // Blocks search for users who are not logged in to prevent crawlers from blocking your system.
264 'local_search' => false,
266 // local_tags (Boolean)
267 // If activated, all hashtags will point to the local server.
268 'local_tags' => false,
270 // logger_config (String)
271 // Sets the logging adapter of Friendica globally (monolog, syslog, stream)
272 'logger_config' => 'stream',
274 // max_batch_queue (Integer)
275 // Maximum number of batched queue items for a single contact before subsequent messages are discarded.
276 'max_batch_queue' => 1000,
278 // max_connections (Integer)
279 // The maximum number of database connections which can be in use before the worker process is deferred to its next interval.
280 // When the system can't detect the maximum numbers of connection then this value can be used. Use 0 for auto-detection.
281 'max_connections' => 0,
283 // max_connections_level (Integer 0-100)
284 // The maximum percentage of connections that are allowed to let the worker start.
285 'max_connections_level' => 75,
287 // max_contact_queue (Integer)
288 // Maximum number of queue items for a single contact before subsequent messages are discarded.
289 'max_contact_queue' => 500,
291 // max_feed_items (Integer)
292 // Maximum number of feed items that are fetched and processed. For unlimited items set to 0.
293 'max_feed_items' => 20,
295 // max_image_length (Integer)
296 // An alternate way of limiting picture upload sizes.
297 // Specify the maximum pixel length that pictures are allowed to be (for non-square pictures, it will apply to the longest side).
298 // Pictures longer than this length will be resized to be this length (on the longest side, the other side will be scaled appropriately).
299 // If you don't want to set a maximum length, set to -1.
300 'max_image_length' => -1,
302 // max_processes_backend (Integer)
303 // Maximum number of concurrent database processes for background tasks.
304 'max_processes_backend' => 5,
306 // max_processes_frontend (Integer)
307 // Maximum number of concurrent database processes for foreground tasks.
308 'max_processes_frontend' => 20,
310 // maximagesize (Integer)
311 // Maximum size in bytes of an uploaded photo.
312 'maximagesize' => 800000,
314 // memcache_host (String)
315 // Host name of the memcache daemon.
316 'memcache_host' => '127.0.0.1',
318 // memcache_port (Integer)
319 // Port number of the memcache daemon.
320 'memcache_port' => 11211,
322 // memcached_hosts (Array)
323 // Array of Memcached servers info [host, port(, weight)], see Memcached::addServers.
324 'memcached_hosts' => [
325 ['127.0.0.1', '11211'],
328 // min_poll_interval (Integer)
329 // minimal distance in minutes between two polls for a contact. Reasonable values are between 1 and 59.
330 'min_poll_interval' => 1,
332 // no_count (Boolean)
333 // Don't do count calculations (currently only when showing photo albums).
336 // no_oembed (Boolean)
337 // Don't use OEmbed to fetch more information about a link.
338 'no_oembed' => false,
340 // no_smilies (Boolean)
341 // Don't show smilies.
342 'no_smilies' => false,
344 // optimize_items (Boolean)
345 // Triggers an SQL command to optimize the item table before expiring items.
346 'optimize_items' => false,
348 // paranoia (Boolean)
349 // Log out users if their IP address changed.
352 // permit_crawling (Boolean)
353 // Restricts the search for not logged in users to one search per minute.
354 'permit_crawling' => false,
357 // Daemon pid file path. For example: pidfile = /path/to/daemon.pid
360 // png_quality (Integer)
361 // Sets the ImageMagick compression level for PNG images. Values ranges from 0 (uncompressed) to 9 (most compressed).
364 // profiler (Boolean)
365 // Enable internal timings to help optimize code. Needed for "rendertime" addon.
368 // proxy_cache_time (Integer)
369 // Period in seconds after which the cache is cleared.
370 'proxy_cache_time' => 86400,
372 // pushpoll_frequency (Integer)
373 // Frequency of contact poll for subhub contact using the DFRM or OStatus network.
380 // - 0 = every minute
381 'pushpoll_frequency' => 3,
383 // queue_no_dead_check (Boolean)
384 // Ignore if the target contact or server seems to be dead during queue delivery.
385 'queue_no_dead_check' => false,
387 // redis_host (String)
388 // Host name of the redis daemon.
389 'redis_host' => '127.0.0.1',
391 // redis_port (String)
392 // Port number of the redis daemon.
393 'redis_port' => 6379,
395 // redis_db (Integer)
396 // The sub-database of redis (0 - 15 possible sub-databases)
399 // redis_password (String)
400 // The authentication password for the redis database
401 'redis_password' => null,
403 // session_handler (database|cache|native)
404 // Whether to use Cache to store session data or to use PHP native session storage.
405 'session_handler' => 'database',
407 // remove_multiplicated_lines (Boolean)
408 // If enabled, multiple linefeeds in items are stripped to a single one.
409 'remove_multiplicated_lines' => false,
411 // sendmail_params (Boolean)
412 // Normal sendmail command parameters will be added when the PHP mail() function is called for sending e-mails.
413 // This ensures the Sender Email address setting is applied to the message envelope rather than the host's default address.
414 // Set to false if your non-sendmail agent is incompatible, or to restore old behavior of using the host address.
415 'sendmail_params' => true,
417 // show_global_community_hint (Boolean)
418 // 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.
419 'show_global_community_hint' => false,
421 // show_received (Boolean)
422 // Show the receive data along with the post creation date
423 'show_received' => true,
425 // show_received_seconds (Integer)
426 // Display the received date when the difference between received and created is higher than this.
427 'show_received_seconds' => 500,
429 // show_unsupported_addons (Boolean)
430 // Show all addons including the unsupported ones.
431 'show_unsupported_addons' => false,
433 // show_unsupported_themes (Boolean)
434 // Show all themes including the unsupported ones.
435 'show_unsupported_themes' => false,
437 // throttle_limit_day (Integer)
438 // Maximum number of posts that a user can send per day with the API. 0 to disable daily throttling.
439 'throttle_limit_day' => 0,
441 // throttle_limit_week (Integer)
442 // Maximum number of posts that a user can send per week with the API. 0 to disable weekly throttling.
443 'throttle_limit_week' => 0,
445 // throttle_limit_month (Integer)
446 // Maximum number of posts that a user can send per month with the API. 0 to disable monthly throttling.
447 'throttle_limit_month' => 0,
449 // username_min_length (Integer)
450 // The minimum character length a username can be.
451 // This length is check once the username has been trimmed and multiple spaces have been collapsed into one.
452 // Minimum for this config value is 1. Maximum is 64 as the resulting profile URL mustn't be longer than 255 chars.
453 'username_min_length' => 3,
455 // username_max_length (Integer)
456 // The maximum character length a username can be.
457 // This length is check once the username has been trimmed and multiple spaces have been collapsed into one.
458 // Minimum for this config value is 1. Maximum is 64 as the resulting profile URL mustn't be longer than 255 chars.
459 'username_max_length' => 48,
461 // worker_cooldown (Integer)
462 // Cooldown period in seconds after each worker function call.
463 'worker_cooldown' => 0,
465 // worker_debug (Boolean)
466 // If enabled, it prints out the number of running processes split by priority.
467 'worker_debug' => false,
469 // worker_fetch_limit (Integer)
470 // Number of worker tasks that are fetched in a single query.
471 'worker_fetch_limit' => 1,
473 // worker_jpm (Boolean)
474 // If enabled, it prints out the jobs per minute.
475 'worker_jpm' => false,
477 // worker_jpm_range (String)
478 // List of minutes for the jobs per minute (JPM) calculation
479 'worker_jpm_range' => '1, 10, 60',
481 // worker_load_exponent (Integer)
482 // Default 3, which allows only 25% of the maximum worker queues when server load reaches around 37% of maximum load.
483 // For a linear response where 25% of worker queues are allowed at 75% of maximum load, set this to 1.
484 // Setting 0 would allow maximum worker queues at all times, which is not recommended.
485 'worker_load_exponent' => 3,
487 // worker_defer_limit (Integer)
488 // Per default the systems tries delivering for 15 times before dropping it.
489 'worker_defer_limit' => 15,
491 // xrd_timeout (Integer)
492 // Timeout in seconds for fetching the XRD links.
496 // exp_themes (Boolean)
497 // Show experimental themes in user settings.
498 'exp_themes' => false,
501 // hide_eventlist (Boolean)
502 // Don't show the birthdays and events on the profile and network page.
503 'hide_eventlist' => false,
507 // Enable debug level for the jabber account synchronisation.
510 // Must be writable by the ejabberd process. if set then it will prevent the running of multiple processes.
514 // ap_inbox_log (Boolean)
515 // Logs every call to /inbox as a JSON file in Friendica's temporary directory
516 'ap_inbox_log' => false,
518 // show_direction (Boolean)
519 // Display if a post had been fetched or had been pushed towards our server
520 'show_direction' => false,
522 // total_ap_delivery (Boolean)
523 // Deliver via AP to every possible receiver and we suppress the delivery to these contacts with other protocols
524 'total_ap_delivery' => false,