1 Config values that can only be set in config/local.config.php
2 ==========================================================
6 Friendica's configuration is done in two places: in PHP array configuration files and in the `config` database table.
7 Database config values overwrite the same file config values.
11 The configuration format for file configuration is an array returned from a PHP file.
12 This prevents your webserver from displaying your private configuration. It interprets the configuration files and displays nothing.
14 A typical configuration file looks like this:
29 'array' => ['value0', 'value1', 'value2'],
34 ### Configuration location
36 The `config` directory holds key configuration files and can have different config files.
37 All of them have to end with `.config.php` and must not include `-sample` in their name.
39 Some examples of common known configuration files:
40 - `local.config.php` holds the current node custom configuration.
41 - `addon.config.php` is optional and holds the custom configuration for specific addons.
43 Addons can define their own default configuration values in `addon/[addon]/config/[addon].config.php` which is loaded when the addon is activated.
45 ### Static Configuration location
47 The `static` directory holds the codebase default configurations files.
48 They must not be changed by users, because they can get changed from release to release.
50 Currently, the following configurations are included:
51 - `defaults.config.php` holds the default values for all the configuration keys that can only be set in `local.config.php`.
52 - `settings.config.php` holds the default values for some configuration keys that are set through the admin settings page.
54 #### Migrating from .htconfig.php to config/local.config.php
56 The legacy `.htconfig.php` configuration file is still supported, but is deprecated and will be removed in a subsequent Friendica release.
58 The migration is pretty straightforward:
59 If you had any addon-specific configuration in your `.htconfig.php`, just copy `config/addon-sample.config.php` to `config/addon.config.php` and move your configuration values.
60 Afterwards, copy `config/local-sample.config.php` to `config/local.config.php`, move the remaining configuration values to it according to the following conversion chart, then rename your `.htconfig.php` to check your node is working as expected before deleting it.
65 background-color: #f9f9f9;
66 border: 1px solid #aaa;
67 border-collapse: collapse;
72 table.config > tr > th,
73 table.config > tr > td,
74 table.config > * > tr > th,
75 table.config > * > tr > td {
76 border: 1px solid #aaa;
80 table.config > tr > th,
81 table.config > * > tr > th {
82 background-color: #f2f2f2;
88 <table class="config">
91 <th>.htconfig.php</th>
92 <th>config/local.config.php</th>
98 $db_host = 'localhost';
99 $db_user = 'mysqlusername';
100 $db_pass = 'mysqlpassword';
101 $db_data = 'mysqldatabasename';
102 $a->config["system"]["db_charset"] = 'utf8mb4';
106 'hostname' => 'localhost',
107 'username' => 'mysqlusername',
108 'password' => 'mysqlpassword',
109 'database' => 'database',
110 'charset' => 'utf8mb4',
116 $a->config["section"]["key"] = "value";
126 $a->config["section"]["key"] = array(
134 'key' => ['value1', 'value2', 'value3'],
140 $a->config["key"] = "value";
150 $a->config['register_policy'] = REGISTER_CLOSED;
154 'register_policy' => \Friendica\Module\Register::CLOSED,
164 'urlpath' => 'value',
170 $default_timezone = "value";
174 'default_timezone' => 'value',
184 'pidfile' => 'value',
194 'language' => 'value',
201 #### Migrating from config/local.ini.php to config/local.config.php
203 The legacy `config/local.ini.php` configuration file is still supported, but is deprecated and will be removed in a subsequent Friendica release.
205 The migration is pretty straightforward:
206 If you had any addon-specific configuration in your `config/addon.ini.php`, just copy `config/addon-sample.config.php` to `config/addon.config.php` and move your configuration values.
207 Afterwards, copy `config/local-sample.config.php` to `config/local.config.php`, move the remaining configuration values to it according to the following conversion chart, then rename your `config/local.ini.php` file to check your node is working as expected before deleting it.
209 <table class="config">
212 <th>config/local.ini.php</th>
213 <th>config/local.config.php</th>
221 username = mysqlusername
222 password = mysqlpassword
223 database = mysqldatabasename
228 'hostname' => 'localhost',
229 'username' => 'mysqlusername',
230 'password' => 'mysqlpassword',
231 'database' => 'database',
232 'charset' => 'utf8mb4',
250 register_policty = REGISTER_CLOSED
254 'register_policy' => \Friendica\Module\Register::CLOSED,
267 'key' => ['value1', 'value2', 'value3'],
276 ### Database Settings
278 The configuration variables database.hostname, database.username, database.password, database.database and database.charset are holding your credentials for the database connection.
279 If you need to specify a port to access the database, you can do so by appending ":portnumber" to the database.hostname variable.
282 'hostname' => 'your.mysqlhost.com:123456',
285 If all of the following environment variables are set, Friendica will use them instead of the previously configured variables for the db:
293 ## Config values that can only be set in config/local.config.php
295 There are some config values that haven't found their way into the administration page.
296 This has several reasons.
297 Maybe they are part of a current development that isn't considered stable and will be added later in the administration page when it is considered safe.
298 Or it triggers something that isn't expected to be of public interest.
299 Or it is for testing purposes only.
301 **Attention:** Please be warned that you shouldn't use one of these values without the knowledge what it could trigger.
302 Especially don't do that with undocumented values.
304 These configurations keys and their default value are listed in `static/defaults.config.php` and should be overwritten in `config/local.config.php`.
306 ## Administrator Options
308 Enabling the admin panel for an account, and thus making the account holder admin of the node, is done by setting the variable
311 'admin_email' => 'someone@example.com',
315 Where you have to match the email address used for the account with the one you enter to the `config/local.config.php` file.
316 If more then one account should be able to access the admin panel, separate the email addresses with a comma.
319 'admin_email' => 'someone@example.com,someoneelse@example.com',
322 If you want to have a more personalized closing line for the notification emails you can set a variable for the `admin_name`.
325 'admin_name' => 'Marvin',