]> git.mxchange.org Git - friendica.git/blobdiff - doc/Config.md
setting current date to the CHANGELOG
[friendica.git] / doc / Config.md
index 7eae371c285a9dca8c90d639e315c60569d71081..3e0459f9c8aa480f9fa6429fde8164a34b365f45 100644 (file)
@@ -33,21 +33,33 @@ return [
 
 ### Configuration location
 
-The `config` directory holds key configuration files:
+The `config` directory holds key configuration files and can have different config files.
+All of them have to end with `.config.php` and must not include `-sample` in their name.
 
-- `defaults.config.php` holds the default values for all the configuration keys that can only be set in `local.config.php`.
-- `settings.config.php` holds the default values for some configuration keys that are set through the admin settings page.
-- `local.config.php` holds the current node custom configuration.
-- `addon.config.php` is optional and holds the custom configuration for specific addons.
+Some examples of common known configuration files:
+- `local.config.php` holds the base node custom configuration.
+- Any other file in this folder is meant for additional configuration (e.g. for addons).
 
 Addons can define their own default configuration values in `addon/[addon]/config/[addon].config.php` which is loaded when the addon is activated.
 
+If needed, an alternative `config` path can be used by using the `FRIENDICA_CONFIG_DIR` environment variable (full path required!).
+This is useful in case of hardening the system by separating configuration from program binaries. 
+
+### Static Configuration location
+
+The `static` directory holds the codebase default configurations files.
+They must not be changed by users, because they can get changed from release to release.
+
+Currently, the following configurations are included:
+- `defaults.config.php` holds the default values for all the configuration keys that can only be set in `local.config.php`.
+- `settings.config.php` holds the default values for some configuration keys that are set through the admin settings page.
+
 #### Migrating from .htconfig.php to config/local.config.php
 
 The legacy `.htconfig.php` configuration file is still supported, but is deprecated and will be removed in a subsequent Friendica release.
 
 The migration is pretty straightforward:
-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.
+If you had any addon-specific configuration in your `.htconfig.php`, copy `config/local-sample.config.php` to `config/addon.config.php` and move your configuration values.
 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.
 
 <style>
@@ -194,7 +206,7 @@ $lang = "value";
 The legacy `config/local.ini.php` configuration file is still supported, but is deprecated and will be removed in a subsequent Friendica release.
 
 The migration is pretty straightforward:
-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.
+If you had any addon-specific configuration in your `config/addon.ini.php`, copy `config/local-sample.config.php` to `config/addon.config.php` and move your configuration values.
 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.
 
 <table class="config">
@@ -238,7 +250,7 @@ key = value
                <tr>
             <td><pre>
 [config]
-register_policty = REGISTER_CLOSED
+register_policy = REGISTER_CLOSED
 </pre></td>
                                <td><pre>
 'config' => [
@@ -266,16 +278,16 @@ key[] = value3
 
 ### Database Settings
 
-The configuration variables database.hostname, database.username, database.password, database.database and database.charset are holding your credentials for the database connection.
-If you need to specify a port to access the database, you can do so by appending ":portnumber" to the database.hostname variable.
+The configuration variables `database.hostname` (or `database.socket`), `database.username`, `database.password`, `database.database` and optionally `database.charset` are holding your credentials for the database connection.
+If you need to specify a port to access the database, you can do so by appending ":portnumber" to the `database.hostname` variable.
 
     'database' => [
         'hostname' => 'your.mysqlhost.com:123456',
     ]
 
-If all of the following environment variables are set, Friendica will use them instead of the previously configured variables for the db:
+If all the following environment variables are set, Friendica will use them instead of the previously configured variables for the db:
 
-    MYSQL_HOST
+    MYSQL_HOST or MYSQL_SOCKET
     MYSQL_PORT
     MYSQL_USERNAME
     MYSQL_PASSWORD
@@ -292,7 +304,7 @@ Or it is for testing purposes only.
 **Attention:** Please be warned that you shouldn't use one of these values without the knowledge what it could trigger.
 Especially don't do that with undocumented values.
 
-These configurations keys and their default value are listed in `config/defaults.config.php` and should be overwritten in `config/local.config.php`.
+These configurations keys and their default value are listed in `static/defaults.config.php` and should be overwritten in `config/local.config.php`.
 
 ## Administrator Options
 
@@ -304,7 +316,7 @@ Enabling the admin panel for an account, and thus making the account holder admi
     
 
 Where you have to match the email address used for the account with the one you enter to the `config/local.config.php` file.
-If more then one account should be able to access the admin panel, separate the email addresses with a comma.
+If more than one account should be able to access the admin panel, separate the email addresses with a comma.
 
     'config' => [
         'admin_email' => 'someone@example.com,someoneelse@example.com',