diff --git a/404.html b/404.html new file mode 100644 index 0000000..e6bfc0e --- /dev/null +++ b/404.html @@ -0,0 +1,3188 @@ + + + +
+ + + + + + + + + + + + + + + +Friendica's configuration is done in two places: in PHP array configuration files and in the config
database table.
+Database config values overwrite the same file config values.
The configuration format for file configuration is an array returned from a PHP file. +This prevents your webserver from displaying your private configuration. It interprets the configuration files and displays nothing.
+A typical configuration file looks like this:
+<?php
+
+/*
+ * Comment block
+ */
+
+return [
+ 'section1' => [
+ // Comment line
+ 'key' => 'value',
+ ],
+ 'section2' => [
+ 'array' => ['value0', 'value1', 'value2'],
+ ],
+];
+
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.
Some examples of common known configuration files:
+- local.config.php
holds the current node custom configuration.
+- addon.config.php
is optional and holds the custom configuration for specific 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.
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.
.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.
+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.
.htconfig.php | +config/local.config.php | +
---|---|
+$db_host = 'localhost'; +$db_user = 'mysqlusername'; +$db_pass = 'mysqlpassword'; +$db_data = 'mysqldatabasename'; +$a->config["system"]["db_charset"] = 'utf8mb4'; + |
+ +'database' => [ + 'hostname' => 'localhost', + 'username' => 'mysqlusername', + 'password' => 'mysqlpassword', + 'database' => 'database', + 'charset' => 'utf8mb4', +], + |
+
+$a->config["section"]["key"] = "value"; + |
+ +'section' => [ + 'key' => 'value', +], + |
+
+$a->config["section"]["key"] = array( + "value1", + "value2", + "value3" +); + |
+ +'section' => [ + 'key' => ['value1', 'value2', 'value3'], +], + |
+
+$a->config["key"] = "value"; + |
+ +'config' => [ + 'key' => 'value', +], + |
+
+$a->config['register_policy'] = REGISTER_CLOSED; + |
+ +'config' => [ + 'register_policy' => \Friendica\Module\Register::CLOSED, +], + |
+
+$a->path = "value"; + |
+ +'system' => [ + 'urlpath' => 'value', +], + |
+
+$default_timezone = "value"; + |
+ +'system' => [ + 'default_timezone' => 'value', +], + |
+
+$pidfile = "value"; + |
+ +'system' => [ + 'pidfile' => 'value', +], + |
+
+$lang = "value"; + |
+ +'system' => [ + 'language' => '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.
+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.
config/local.ini.php | +config/local.config.php | +
---|---|
+[database] +hostname = localhost +username = mysqlusername +password = mysqlpassword +database = mysqldatabasename +charset = utf8mb4 + |
+ +'database' => [ + 'hostname' => 'localhost', + 'username' => 'mysqlusername', + 'password' => 'mysqlpassword', + 'database' => 'database', + 'charset' => 'utf8mb4', +], + |
+
+[section] +key = value + |
+ +'section' => [ + 'key' => 'value', +], + |
+
+[config] +register_policty = REGISTER_CLOSED + |
+ +'config' => [ + 'register_policy' => \Friendica\Module\Register::CLOSED, +], + |
+
+[section] +key[] = value1 +key[] = value2 +key[] = value3 + |
+ +'section' => [ + 'key' => ['value1', 'value2', 'value3'], +], + |
+
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.
'database' => [
+ 'hostname' => 'your.mysqlhost.com:123456',
+]
+
If all the following environment variables are set, Friendica will use them instead of the previously configured variables for the db:
+MYSQL_HOST
+MYSQL_PORT
+MYSQL_USERNAME
+MYSQL_PASSWORD
+MYSQL_DATABASE
+
There are some config values that haven't found their way into the administration page. +This has several reasons. +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. +Or it triggers something that isn't expected to be of public interest. +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 static/defaults.config.php
and should be overwritten in config/local.config.php
.
Enabling the admin panel for an account, and thus making the account holder admin of the node, is done by setting the variable
+'config' => [
+ 'admin_email' => 'someone@example.com',
+]
+
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 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',
+]
+
If you want to have a more personalized closing line for the notification emails you can set a variable for the admin_name
.
'config' => [
+ 'admin_name' => 'Marvin',
+]
+
No, this function is no longer supported as of Friendica 3.3 onwards.
+You can find the main repository here. +There you will always find the current stable version of friendica.
+Addons are listed at this page.
+If you are searching for new themes, you can find them at github.com/bkil/friendica-themes
+Have a look into your config/local.config.php and fix your email address there.
+Yes.
+You just have to list more than one email address in the config/local.config.php
file.
+The listed emails need to be separated by a comma.
Please have a look at the Admin panel under DB updates (/admin/dbsync/
) and follow the link to check database structure.
+This will start a background process to check if the structure is up to the current definition.
You can manually execute the structure update from the CLI in the base directory of your Friendica installation by running the following command:
+ +if there occur any errors, please contact the support forum.
+ + +Feel free to ask in the Friendica support forum if you need some clarification about the following instructions or if you need help in any other way.
+Please go to /admin/site/ on your system and change the following values:
+Set "JPEG image quality" to 50.
+
This value reduces the data that is sent from the server to the client. 50 is a value that doesn't influence image quality too much.
+Set "OStatus conversation completion interval" to "never".
+
If you have many OStatus contacts then completing of conversations can take some time. Since you will miss several comments in OStatus threads, you maybe should consider the option "At post arrival" instead.
+Enable "Use MySQL full text engine"
+
When using MyISAM (default) or InnoDB on MariaDB 10 this speeds up search.
+Active the following addons:
+rendertime
+
This addon doesn't speed up your system. +It helps to analyze your bottlenecks.
+When enabled you see some values at the bottom of every page. +They show your performance problems.
+Performance: Database: 0.244, Network: 0.002, Rendering: 0.044, Parser: 0.001, I/O: 0.021, Other: 0.237, Total: 0.548
+
+Database: This is the time for all database queries
+Network: Time that is needed to fetch content from external sites
+Rendering: Time for theme rendering
+Parser: The time that the BBCode parser needed to create the output
+I/O: Time for local file access
+Others: Everything else :)
+Total: The sum of all above values
+
The following Apache modules are recommended:
+This module tells the client to cache the content of static files so that they aren't fetched with every request.
+Enable the module mod_expires
by typing in a2enmod expires
as root.
+Please add the following lines to your site configuration in the "directory" context.
ExpiresActive on ExpiresDefault "access plus 1 week"
+
Also see the Apache 2.2 / 2.4 documentation.
+This module compresses the traffic between the web server and the client.
+Enable the module mod_deflate
by typing in a2enmod deflate
as root.
Also see the Apache 2.2 / 2.4 documentation.
+When using Apache think about using FCGI.
+In a Debian-based distribution you will need to install the packages named php5-cgi
and libapache2-mod-fcgid
.
Please refer to external documentation for a more detailed explanation how to set up a system based upon FCGI.
+There are scripts like tuning-primer.sh and mysqltuner.pl that analyze your database server and give hints on values that could be changed.
+Please enable the slow query log. This helps to find performance problems.
+ + +Ejabberd is a chat server that uses XMPP as messaging protocol that you can use with a large amount of clients. +In conjunction with the "xmpp" addon it can be used for a web based chat solution for your users.
+Change its owner to whichever user is running the server, i.e. ejabberd
+$ chown ejabberd:ejabberd /path/to/friendica/bin/auth_ejabberd.php
+
Change the access mode, so it is readable only to the user ejabberd and has exec
+$ chmod 700 /path/to/friendica/bin/auth_ejabberd.php
+
Edit your ejabberd.cfg file, comment out your auth_method and add:
+{auth_method, external}.
+{extauth_program, "/path/to/friendica/bin/auth_ejabberd.php"}.
+
Disable the module "mod_register" and disable the registration:
+{access, register, [{deny, all}]}.
+
Enable BOSH:
+Edit this line:
+{5280, ejabberd_http, [captcha, http_poll, http_bind]}
+
In your apache configuration for your site add this line:
+ProxyPass /http-bind http://127.0.0.1:5280/http-bind retry=0
+
Restart your ejabberd service, you should be able to log in with your friendica credentials
+We've tried very hard to ensure that Friendica will run on commodity hosting platforms - such as those used to host WordPress blogs and Drupal websites. +We offer a manual and an automatic installation. +But be aware that Friendica is more than a simple web application.
+It is a complex communications system which more closely resembles an email server than a web server. +For reliability and performance, messages are delivered in the background and are queued for later delivery when sites are down. +This kind of functionality requires a bit more of the host system than the typical blog.
+Not every PHP/MySQL hosting provider will be able to support Friendica. +Many will.
+But please review the requirements and confirm these with your hosting provider prior to installation.
+If you encounter installation issues, please let us know via the helper or the developer forum or file an issue.
+Please be as clear as you can about your operating environment and provide as much detail as possible about any error messages you may see, so that we can prevent it from happening in the future. +Due to the large variety of operating systems and PHP platforms in existence we may have only limited ability to debug your PHP installation or acquire any missing modules - but we will do our best to solve any general code issues.
+.htaccess
fileIf your hosting provider doesn't allow Unix shell access, you might have trouble getting everything to work.
+For alternative server configurations (such as Nginx server and MariaDB database engine), refer to the Friendica wiki.
+This guide will walk you through the manual installation process of Friendica. +If this is nothing for you, you might be interested in
+Download the full archive of the stable release of Friendica core and the addons from the project homepage. +Make sure that the version of the Friendica archive and the addons match. +Unpack the Friendica files into the root of your web server document area.
+If you copy the directory tree to your webserver, make sure that you also copy .htaccess-dist
- as "dot" files are often hidden and aren't normally copied.
OR
+Clone the friendica/friendica GitHub repository and import dependencies. +This makes the software much easier to update.
+The Linux commands to clone the repository into a directory "mywebsite" would be
+git clone https://github.com/friendica/friendica.git -b stable mywebsite
+cd mywebsite
+bin/composer.phar install --no-dev
+
Make sure the folder view/smarty3 exists and is writable by the webserver user, in this case www-data
+mkdir -p view/smarty3
+chown www-data:www-data view/smarty3
+chmod 775 view/smarty3
+
Get the addons by going into your website folder.
+cd mywebsite
+
Clone the addon repository (separately):
+git clone https://github.com/friendica/friendica-addons.git -b stable addon
+
If you want to use the development version of Friendica you can switch to the develop branch in the repository by running
+git checkout develop
+bin/composer.phar install
+cd addon
+git checkout develop
+
Be aware that the develop branch is unstable and may break your Friendica node at any time. +You should have a recent backup before updating. +If you encounter a bug, please let us know.
+Create an empty database and note the access details (hostname, username, password, database name). +Generate a strong password, then enter mysql with:
+mysql
+
Then use the following script using the password you just generated:
+CREATE DATABASE friendicadb;
+CREATE USER 'friendica'@'localhost' IDENTIFIED BY '<<your mysql password here>>';
+GRANT ALL ON friendicadb.* TO 'friendica'@'localhost';
+FLUSH PRIVILEGES;
+EXIT;
+
Friendica needs the permission to create and delete fields and tables in its own database.
+Please check the troubleshooting section if running on MySQL 5.7.17 or newer.
+Before you point your web browser to the new site you need to copy .htaccess-dist
to .htaccess
for Apache installs.
+Follow the instructions.
+Please note any error messages and correct these before continuing.
If you need to specify a port for the connection to the database, you can do so in the host name setting for the database.
+If the manual installation fails for any reason, check the following:
+config/local.config.php
exist? If not, edit config/local-sample.config.php
and change the system settings.config/local.config.php
.database.sql
with phpmyadmin or the mysql command line.At this point visit your website again, and register your personal account.
+Registration errors should all be recoverable automatically.
+If you get any critical failure at this point, it generally indicates the database was not installed correctly.
+You might wish to move/rename config/local.config.php
to another name and empty (called 'dropping') the database tables, so that you can start fresh.
You have the following options to automatically install Friendica:
+- creating a prepared config file (f.e. prepared.config.php
)
+- using environment variables (f.e. MYSQL_HOST
)
+- using options (f.e. --dbhost <host>
)
You can combine environment variables and options, but be aware that options are prioritized over environment variables.
+For more information during the installation, you can use this command line option
+bin/console autoinstall -v
+
If you wish to include all optional checks, use -a
like this statement:
bin/console autoinstall -a
+
If the automatic installation fails for any reason, check the following:
+config/local.config.php
already exist? If yes, the automatic installation won't startconfig/local.config.php
correct? If not, edit them directly.You can use a prepared config file like "local-sample.config.php".
+Navigate to the main Friendica directory and execute the following command:
+bin/console autoinstall -f <prepared.config.php>
+
There are two types of environment variables. +- those you can use in normal mode too (Currently just database credentials) +- those you can only use during installation (because Friendica will normally ignore it)
+You can use the options during installation too and skip some environment variables.
+Database credentials
+if you don't use the option --savedb
during installation, the DB credentials will not be saved in the config/local.config.php
.
MYSQL_HOST
The host of the mysql/mariadb databaseMYSQL_PORT
The port of the mysql/mariadb databaseMYSQL_USERNAME
The username of the mysql database login (used for mysql)MYSQL_USER
The username of the mysql database login (used for mariadb)MYSQL_PASSWORD
The password of the mysql/mariadb database loginMYSQL_DATABASE
The name of the mysql/mariadb databaseFriendica settings
+These variables won't be used at normal Friendica runtime.
+Instead, they get saved into config/local.config.php
.
FRIENDICA_URL_PATH
The URL path of Friendica (f.e. '/friendica')FRIENDICA_PHP_PATH
The path of the PHP binaryFRIENDICA_ADMIN_MAIL
The admin email address of Friendica (this email will be used for admin access)FRIENDICA_TZ
The timezone of FriendicaFRIENDICA_LANG
The language of FriendicaNavigate to the main Friendica directory and execute the following command:
+bin/console autoinstall [--savedb]
+
All options will be saved in the config/local.config.php
and are overruling the associated environment variables.
-H|--dbhost <host>
The host of the mysql/mariadb database (env MYSQL_HOST
)-p|--dbport <port>
The port of the mysql/mariadb database (env MYSQL_PORT
)-U|--dbuser <username>
The username of the mysql/mariadb database login (env MYSQL_USER
or MYSQL_USERNAME
)-P|--dbpass <password>
The password of the mysql/mariadb database login (env MYSQL_PASSWORD
)-d|--dbdata <database>
The name of the mysql/mariadb database (env MYSQL_DATABASE
)-u|--urlpath <url_path>
The URL path of Friendica - f.e. '/friendica' (env FRIENDICA_URL_PATH
)-b|--phppath <php_path>
The path of the PHP binary (env FRIENDICA_PHP_PATH
)-A|--admin <mail>
The admin email address of Friendica (env FRIENDICA_ADMIN_MAIL
)-T|--tz <timezone>
The timezone of Friendica (env FRIENDICA_TZ
)-L|--lang <language>
The language of Friendica (env FRIENDICA_LANG
)Navigate to the main Friendica directory and execute the following command:
+bin/console autoinstall [options]
+
Copy .htaccess-dist
to .htaccess
(be careful under Windows) to have working mod-rewrite again. If you have installed Friendica into a subdirectory, like /friendica/ set this path in RewriteBase
accordingly.
Example:
+cp .htacces-dist .htaccess
+
Note: Do not rename the .htaccess-dist
file as it is tracked by GIT and renaming will cause a dirty working directory.
Friendica should respond automatically to important addresses under the /.well-known/ rewrite path.
+One critical URL would look like, for example: https://example.com/.well-known/host-meta
+It must be visible to the public and must respond with an XML file that is automatically customized to your site.
If that URL is not working, it is possible that some other software is using the /.well-known/ path. +Other symptoms may include an error message in the Admin settings that says "host-meta is not reachable on your system. +This is a severe configuration issue that prevents server to server communication." +Another common error related to host-meta is the "Invalid profile URL."
+Check for a .well-known
directory that did not come with Friendica.
+The preferred configuration is to remove the directory, however this is not always possible.
+If there is any /.well-known/.htaccess file, it could interfere with this Friendica core requirement.
+You should remove any RewriteRules from that file, or remove that whole file if appropriate.
+It may be necessary to chmod the /.well-known/.htaccess file if you were not given write permissions by default.
At this point visit your website again, and register your personal account with the same email as in the config.admin_email
config value.
+Registration errors should all be recoverable automatically.
If you get any critical failure at this point, it generally indicates the database was not installed correctly.
+You might wish to delete/rename config/local.config.php
to another name and drop all the database tables so that you can start fresh.
Set up a cron job or scheduled task to run the worker once every 5-10 minutes in order to perform background processing. +Example:
+cd /base/directory; /path/to/php bin/worker.php
+
Change "/base/directory", and "/path/to/php" as appropriate for your situation.
+If you are using a Linux server, run "crontab -e" and add a line like the +one shown, substituting for your unique paths and settings:
+*/10 * * * * cd /home/myname/mywebsite; /usr/bin/php bin/worker.php
+
You can generally find the location of PHP by executing "which php". +If you run into trouble with this section please contact your hosting provider for assistance. +Friendica will not work correctly if you cannot perform this step.
+If it is not possible to set up a cron job then please activate the "frontend worker" in the administration interface.
+Once you have installed Friendica and created an admin account as part of the process, you can access the admin panel of your installation and do most of the server wide configuration from there.
+Otherwise, you’ll need to use the command line on your remote server and start the Friendica daemon (background task) using the following command:
+cd /path/to/friendica; php bin/daemon.php start
+
Once started, you can check the daemon status using the following command:
+cd /path/to/friendica; php bin/daemon.php status
+
After a server restart or any other failure, the daemon needs to be restarted. +This could be achieved by a cronjob.
+At this point it is recommended that you set up logging and logrotate. +To do so please visit Settings and search the 'Logs' section for more information.
+Bad things will happen. +Let there be a hardware failure, a corrupted database or whatever you can think of. +So once the installation of your Friendica node is done, you should make yourself a backup plan.
+The most important file is the config/local.config.php
file.
+As it stores all your data, you should also have a recent dump of your Friendica database at hand, should you have to recover your node.
Friendica looks for some well-known HTTP headers indicating a reverse-proxy
+terminating an HTTPS connection.
+While the standard from RFC 7239 specifies the use of the Forwarded
header.
Forwarded: for=192.0.2.1; proto=https; by=192.0.2.2
+
Friendica also supports a number on non-standard headers in common use.
+X-Forwarded-Proto: https
+
+Front-End-Https: on
+
+X-Forwarded-Ssl: on
+
It is however preferable to use the standard approach if configuring a new server.
+Check your database settings. +It usually means your database could not be opened or accessed. +If the database resides on the same machine, check that the database server name is "localhost".
+This could be the result of one of our Apache directives not being supported by your version of Apache. Examine your apache server logs.
+You might remove the line "Options -Indexes" from the .htaccess
file if you are using a Windows server as this has been known to cause problems.
+Also check your file permissions. Your website and all contents must generally be world-readable.
It is likely that your web server reported the source of the problem in its error log files. +Please review these system error logs to determine what caused the issue. +Often this will need to be resolved with your hosting provider or (if self-hosted) your web server configuration.
+First check your file permissions. +Your website and all contents must generally be world-readable.
+Ensure that mod-rewrite is installed and working, and that your .htaccess
file
+is being used. To verify the latter, create a file test.out
containing the
+word "test" in the top directory of Friendica, make it world readable and point
+your web browser to
http://yoursitenamehere.com/test.out
+
This file should be blocked. You should get a permission denied message.
+If you see the word "test" your Apache configuration is not allowing your
+.htaccess
file to be used (there are rules in this file to block access to any
+file with .out at the end, as these are typically used for system logs).
Make certain the .htaccess
file exists and is readable by everybody, then look
+for the existence of "AllowOverride None" in the Apache server configuration for your site.
+This will need to be changed to "AllowOverride All".
If you do not see the word "test", your .htaccess
is working, but it is likely
+that mod-rewrite is not installed in your web server or is not working.
On most Linux flavors:
+% a2enmod rewrite
+% /etc/init.d/apache2 restart
+
Consult your hosting provider, experts on your particular Linux distribution or +(if Windows) the provider of your Apache server software if you need to change +either of these and can not figure out how. There is a lot of help available on +the web. Search "mod-rewrite" along with the name of your operating system +distribution or Apache package (if using Windows).
+Create an empty config/local.config.php
file and apply world-write permission.
On Linux:
+% touch config/local.config.php
+% chmod 664 config/local.config.php
+
Retry the installation. As soon as the database has been created,
+* this is important ***
+% chmod 644 config/local.config.php
+
Some configurations with "suhosin" security are configured without an ability to +run external processes. Friendica requires this ability. Following are some notes +provided by one of our members.
+++On my server I use the php protection system Suhosin [http://www.hardened-php.net/suhosin/]. +One of the things it does is to block certain functions like proc_open, as +configured in
+/etc/php5/conf.d/suhosin.ini
:+suhosin.executor.func.blacklist = proc_open, ... +
For those sites like Friendica that really need these functions they can be +enabled, e.g. in
+/etc/apache2/sites-available/friendica
:+
+ php_admin_value suhosin.executor.func.blacklist none + php_admin_value suhosin.executor.eval.blacklist none + This enables every function for Friendica if accessed via browser, but not for +the cronjob that is called via php command line. I attempted to enable it for +cron by using something like:
+/10 * * * cd /var/www/friendica/friendica/ && sudo -u www-data /usr/bin/php \ + -d suhosin.executor.func.blacklist=none \ + -d suhosin.executor.eval.blacklist=none -f bin/worker.php
+This worked well for simple test cases, but the friendica-cron still failed +with a fatal error:
+suhosin[22962]: ALERT - function within blacklist called: proc_open() + (attacker 'REMOTE_ADDR not set', file '/var/www/friendica/friendica/boot.php', + line 1341)
+After a while I noticed, that
+bin/worker.php
calls further PHP scripts viaproc_open
. +These scripts themselves also useproc_open
and fail, because they are NOT +called with-d suhosin.executor.func.blacklist=none
.So the simple solution is to put the correct parameters into
+config/local.config.php
:'config' => [ + //Location of PHP command line processor + 'php_path' => '/usr/bin/php -d suhosin.executor.func.blacklist=none \ + -d suhosin.executor.eval.blacklist=none', + ],
+This is obvious as soon as you notice that the friendica-cron uses
+proc_open
+to execute PHP scripts that also useproc_open
, but it took me quite some time to find that out. +I hope this saves some time for other people using suhosin with function blocklists.
If the setup fails to create all the database tables and/or manual creation from +the command line fails, with this error:
+ERROR 1067 (42000) at line XX: Invalid default value for 'created'
+
You need to adjust your my.cnf and add the following setting under the [mysqld] +section:
+sql_mode = '';
+
After that, restart mysql and try again.
+Friendica is coded to always play nice. It checks whether the host machine is idle enough and if it seems to be overloaded, it intermittently refuses to process the worker queue.
+Such checks originate from the days of single-user single-core machines and involves thresholds that you should adjust based on the number of exclusive CPU cores you have. See this issue for more information:
+If you want to be neighborly and are using a shared web hosting PaaS provider, especially within the free tier, you need to set maxloadavg
to say twice the maximum value of /proc/loadavg
during peak hours.
If you have the whole (virtual) machine for yourself such as in case of an IaaS VPS, you can set it to orders of magnitude higher than its commonly observed value, such as 1000.
+You should instead enact limits in your web server configuration based on the number of entry processes to cap the concurrent memory usage of your PHP processes.
+See RLimitMEM
, RLimitCPU
, RLimitNPROC
, StartServers
, ServerLimit
, MaxRequestsPerChild
, pm.max_children
, pm.start_servers
and related options in your server.
You tried to upload an image up to 100kB, and it failed.
+You may not have the ownership or file mode set correctly if you are using the file system storage backend.
+Change the backend to database. If this solves it, that is what needs to be fixed.
+You may find 413 Request Entity Too Large
or 500 Internal Error
in the network inspector of the browser if the file is too large, for example if it is a video.
First try to upload a very small file, up to 100kB. If that succeeds, you will need to increase limits at multiple places, including on any web proxy that you are using.
+In your PHP ini:
+upload_max_filesize
: defaults to 2MBpost_max_size
: defaults to 8MB, must be greater than upload_max_filesize
memory_limit
: defaults to 128MB, must be greater than post_max_size
You should verify whether you changed them in the right file by checking the web interface at the end of the overview on the Admin
panel.
For Apache2:
+LimitRequestBody
: defaults to unlimitedSSLRenegBufferSize
: defaults to 128kB, only if your site uses TLS and perhaps only when using SSLVerifyClient
or SSLVerifyDepth
For nginx:
+client_max_body_size
: defaults to 1MBIf you are using the database backend for storage, increase this in your SQL configuration:
+max_allowed_packet
: defaults to 32MBIf you use the ModSecurity WAF:
+SecRequestBodyLimit
: defaults to 12MBSecRequestBodyNoFilesLimit
: defaults to 128kB, should not apply to FriendicaFriendica uses addons to provide connectivity to some networks, such as Twitter.
+There is also an addon to post through to an existing account on a GNU Social service. +You only need this to post to an already existing GNU Social account, but not to communicate with GNU Social members in general.
+All three addons require an account on the target network. +In addition, you (or typically the server administrator) will need to obtain an API key to provide authenticated access to your Friendica server.
+Addons must be installed by the site administrator before they can be used. +This is accomplished through the site administration panel.
+Each of the connectors also requires an "API key" from the service you wish to connect with. +Some addons allow you to enter this information in the site administration pages, while others may require you to edit your configuration file (config/local.config.php). +The ways to obtain these keys vary between the services, but they all require an existing account on the target service. +Once installed, these API keys can usually be shared by all site members.
+The details of configuring each service follow (much of this information comes directly from the addon source files):
+To use this addon you need a OAuth Consumer key pair (key & secret). +You can get it from Twitter.
+Register your Friendica site as "Client" application with "Read & Write" access. +We do not need "Twitter as login". +When you've registered the app you get a key pair with an OAuth Consumer key and a secret key for your application/site. +Add this key pair to your config/local.config.php:
+[twitter]
+consumerkey = your consumer_key here
+consumersecret = your consumer_secret here
+
After this, your users can configure their Twitter account settings from "Settings -> Connector Settings".
+Find the author's documentation here: http://diekershoff.homeunix.net/redmine/wiki/friendikaplugin/Twitter_Plugin
+When the addon is activated the user has to acquire the following in order to connect to the GNU Social account of choice.
+To get the OAuth Consumer key pair the user has to
+1 ask her Friendica admin if a pair already exists or +2 has to register the Friendica server as a client application on the GNU Social server.
+This can be done from the account settings under "Settings -> Connections -> Register an OAuth client application -> Register a new application" on the GNU Social server.
+During the registration of the OAuth client remember the following:
+After the required credentials for the application are stored in the configuration you have to actually connect your Friendica account with GNU Social. +This is done from the Settings -> Connector Settings page. +Follow the Sign in with GNU Social button, allow access and then copy the security code into the box provided. +Friendica will then try to acquire the final OAuth credentials from the API.
+If successful, the addon settings will allow you to select to post your public messages to your GNU Social account (have a look behind the little lock symbol beneath the status "editor" on your Home or Network pages).
+ + +Set up your new server as described here; follow the installation procedure until you have created a database.
+Inform your users of an upcoming interruption to your service. +To ensure data consistency, your server needs to be offline during some steps of the migration processes.
+You may also find these addons useful for communicating with your users prior to the migration process: +* blackout +* notifyall
+Check your storage backend with bin/console storage list
in the root folder.
+The output should look like this:
+
If you are not using Database
run the following commands:
+1. bin/console storage set Database
to activate the database backend.
+2. bin/console storage move
to initiate moving the stored image files.
This process may take a long time depending on the size of your storage and your server's capacity.
+Prior to initiating this process, you may want to check the number of files in the storage with the following command: tree -if -I index.html /path/to/storage/
.
Before transferring your database, you may want to clean it up; ensure the expiration of database items is set to a reasonable value and activated via the administrator panel. +Admin > Site > Performance > Enable "Clean up database" +After adjusting these settings, the database cleaning up processes will be initiated according to your configured daily cron job.
+To review the size of your database, log into MySQL with mysql -p
run the following query:
+
SELECT table_schema AS "Database", SUM(data_length + index_length) / 1024 / 1024 / 1024 AS "Size (GB)" FROM information_schema.TABLES GROUP BY table_schema;
+
You should see an output like this: +
+--------------------+----------------+
+| Database | Size (GB) |
++--------------------+----------------+
+| friendica_db | 8.054092407227 |
+| [..........] | [...........] |
++--------------------+----------------+
+
Finally, you may also want to optimise your database with the following command: mysqloptimize -p friendica-db
Stop background tasks and put your server in maintenance mode.
+1. If you had set up a worker cron job like this */10 * * * * cd /var/www/friendica; /usr/bin/php bin/worker.php
run crontab -e
and comment out this line. Alternatively if you deploy a worker daemon, disable this instead.
+2. Put your server into maintenance mode: bin/console maintenance 1 "We are currently upgrading our system and will be back soon."
Export your database: mysqldump -p friendica_db > friendica_db-$(date +%Y%m%d).sql
and possibly compress it.
Transfer your database and a copy of your configuration file config/local.config.php.copy
to your new server installation.
Import your database on your new server: mysql -p friendica_db < your-friendica_db-file.sql
Copy your old server's configuration file to config/local.config.php
.
+Ensure the newly created database credentials are identical to the setting in the configuration file; otherwise update them accordingly.
Set up the required daily cron job.
+Run crontab -e
and add the following line according to your system specification
+
Adjust your DNS records by pointing them to your new server.
+If you are unable to log in to your newly migrated Friendica installation, check your web server's error and access logs and mysql logs for obvious issues.
+If still unable to resolve the problem, it's likely an issue with your installation. +In this case, you may try to an entirely new Friendica installation on your new server, but use a different FQDN and DNS name. +Once you have this up and running, take it offline and purge the database and configuration file and try migrating to this installation.
+ + +If you are the admin of a Friendica node, you have access to the Admin Panel where you can configure your Friendica node.
+In the main page of the admin panel you will see an information summary about your node.
+The three numbers shown are respectively: +- The retry queue: These outgoing messages couldn't be received by the remote host, and will be resent at longer intervals before being dropped entirely after 30 days. +- The deferred queue: These internal tasks failed and will be retried at most 14 times. +- The task queue: These internal tasks are queued for execution during the next background worker run.
+Then you get an overview of the accounts on your node, which can be moderated in the "Users" section of the panel. +As well as an overview of the currently active addons. +The list is linked, so you can have quick access to the Addon settings. +And finally you are informed about the version of Friendica you have installed. +If you contact the developers with a bug or problem, please also mention the version of your node.
+The admin panel is separated into subsections accessible from the sidebar of the panel.
+This section of the admin panel contains the main configuration of your Friendica node. +It is separated into several subsection beginning with the basic settings at the top, advancing towards the bottom of the page.
+Most configuration options have a help text in the admin panel. +Therefore, this document does not yet cover all the options
+Set the content for the site banner. +The default logo is the Friendica logo and name. +You may wish to provide HTML/CSS to style and/or position this content, as it may not be themed by default.
+This option will set the default language for the node. +It is used as fall back setting should Friendica fail to recognize the visitors preferences and can be overwritten by user settings.
+The Friendica community offers some translations. +Some more complete than others. +See this help page for more information about the translation process.
+Choose a theme to be the default system theme.
+This can be over-ridden by user profiles.
+Default theme is vier
at the moment.
You may also want to set a special theme for mobile interfaces.
+Which may or may not be necessary depending on the mobile friendliness of the desktop theme you have chosen.
+The vier
theme for instance is mobile friendly.
With this dropdown selector you can set the nodes' registration policy. +You can choose between the following modes:
+Additionally, to the setting in the admin panel, you can decide if registrations are only possible using an invitation code or not.
+To enable invitation based registration, you have to set the invitation_only
setting to true
in the system
section of the config/local.config.php file.
+If you want to use this method, the registration policy has to be set to either open or requires approval.
You may find a lot of spammers trying to register on your site. +During testing we discovered that since these registrations were automatic, the "Full Name" field was often set to just an account name with no space between first and last name. +If you would like to support people with only one name as their full name, you may change this setting to true. +Default is false.
+By default, OpenID may be used for both registration and logins. +If you do not wish to make OpenID facilities available on your system (at all), set 'no_openid' to true. +Default is false.
+The ability to create "Pages" requires a person to register more than once. +Your site configuration can block registration (or require approval to register). +By default, logged-in users can register additional accounts for use as pages. +These will still require approval if the registration policy is set to require approval +You may prohibit logged-in users from creating additional accounts by setting block multiple registrations to true. +Default is false.
+Set the backend used by Friendica to store uploaded file data. +Two storage backends are available with Friendica:
+storage
)More storage backends can be available from third-party addons. +If you use those, please refer to the documentation of those addons for further information.
+Default value is 'Database (legacy)': it's the legacy way used to store data directly in database.
+Existing data can be moved to the current active backend using the 'storage move' console command
+If selected backend has configurable options, new fields are shown here.
+The base path where Filesystem storage backend saves data.
+For maximum security, this path should be outside the folder tree served by the web server: this way files can't be downloaded bypassing the privacy checks.
+Default value is storage
, that is the storage
folder in Friendica code root folder.
Maximum size in bytes of uploaded images. +The default is set to 0, which means no limits.
+This configures the URL to update the global directory, and is supplied in the default configuration. +The undocumented part is that if this is not set, the global directory is completely unavailable to the application. +This allows a private community to be completely isolated from the global network.
+By default, each user can choose on their Settings page whether to have their profile published in the site directory. +This setting forces all profiles on this site to be listed in the site directory and there is no option provided to the user to change it. +Default is false.
+Set to true to block public access to all otherwise public personal pages on this site unless you are currently logged in. +This blocks the viewing of profiles, friends, photos, the site directory and search pages to unauthorised persons. +A side effect is that entries from this site will not appear in the global directory. +We recommend specifically disabling that also (setting is described elsewhere on this page). +Note: this is specifically for sites that desire to be "standalone" and do not wish to be connected to any other Friendica sites. +Unauthorised persons will also not be able to request friendship with site members. +Default is false. +Available in version 2.2 or greater.
+The community pages show all public postings, separated by their origin being local or the entire network. +With this setting you can select which community pages will be shown to visitors of your Friendica node. +Your local users will always have access to both pages.
+Note: Several settings, like users hiding their contacts from the public will prevent the postings to show up on the global community page.
+Comma separated list of domains which are allowed to establish friendships with this site. +Wildcards are accepted. +By default, any (valid) domain may establish friendships with this site.
+This is useful if you want to set up a closed network for educational groups, cooperatives and similar communities that don't want to communicate with the rest of the network.
+Comma separated list of domains which are allowed in email addresses for registrations to this site. +This can lockout those who are not part of this organisation from registering here. +Wildcards are accepted. +By default, any (valid) email address is allowed in registrations.
+If you enable the Allow Users to set remote_self
users can select Atom feeds from their contact list being their remote self in the contact settings.
+Which means that postings by the remote self are automatically reposted by Friendica in their names.
This feature can be used to let the user mirror e.g. blog postings into their Friendica postings. +It is disabled by default, as it causes additional load on the server and may be misused to distribute SPAM.
+As admin of the node you can also set this flag directly in the database. +Before doing so, you should be sure you know what you do and have a backup of the database.
+If you are running a node with explicit content, you can announce this with this option. +When checked an information flag will be set in the published information about your node. +(Should Publish Server Information be enabled.)
+Additionally, a note will be displayed on the registration page for new users.
+If your site uses a proxy to connect to the internet, you may use these settings to communicate with the outside world. +The outside world still needs to be able to see your website, or this will not be very useful.
+How long to wait on a network communication before timing out. +Value is in seconds. +Default is 60 seconds. +Set to 0 for unlimited (not recommended).
+By default, Friendica allows SSL communication between websites that have "self-signed" SSL certificates. +For the widest compatibility with browsers and other networks we do not recommend using self-signed certificates, but we will not prevent you from using them. +SSL encrypts all the data transmitted between sites (and to your browser). +This allows you to have completely encrypted communications, and also protect your login session from hijacking. +Self-signed certificates can be generated for free, without paying top-dollar for a website SSL certificate. +However, these aren't looked upon favourably in the security community because they can be subject to so-called "man-in-the-middle" attacks. +If you wish, you can turn on strict certificate checking. +This will mean you cannot connect (at all) to self-signed SSL sites.
+If this option is enabled your Friendica node will check the upstream version once per day from the GitHub repository. +You can select if the stable version or the development version should be checked out. +If there is a new version published, you will get notified in the admin panel summary page.
+This section allows you to configure the background process that is triggered by the cron
job that was created during the installation.
+The process does check the available system resources before creating a new worker for a task.
+Because of this, it may happen that the maximum number of worker processes you allow will not be reached.
The tasks for the background process have priorities. +To guarantee that important tasks are executed even though the system has a lot of work to do, it is useful to enable the fastlane.
+This section of the panel let the admin control the users registered on the node.
+If you have selected "Requires approval" for the Register policy in the general nodes' configuration, new registrations will be listed at the top of the page. +There the admin can then approve or disapprove the request.
+Below the new registration block the current accounts on the Friendica node are listed. +You can sort the user list by name, email, registration date, date of last login, date of last posting and the account type. +Here the admin can also block/unblock users from accessing the node or delete the accounts entirely.
+In the last section of the page admins can create new accounts on the node. +The password for the new account will be sent by email to the chosen email address.
+This page is for selecting and configuration of extensions for Friendica which have to be placed into the /addon
subdirectory of your Friendica installation.
+You are presented with a long list of available addons.
+The name of each addon is linked to a separate page for that addon which offers more information and configuration possibilities.
+Also shown is the version of the addon and an indicator if the addon is currently active or not.
When you update your node and the addons they may have to be reloaded. +To simplify this process there is a button at the top of the page to reload all active Addons.
+The Themes' section of the admin panel works similar to the Addons section but let you control the themes on your Friendica node. +Each theme has a dedicated subpage showing the current status, some information about the theme and a screenshot of the Friendica interface using the theme. +Should the theme offer special settings, admins can set a global default value here.
+You can activate and deactivate themes on their dedicated sub-pages thus making them available for the users of the node. +To select a default theme for the Friendica node, see the Site section of the admin panel.
+There are several optional features in Friendica like the dislike button. +In this section of the admin panel you can select a default setting for your node and eventually fix it, so users cannot change the setting anymore.
+Should the database structure of Friendica change, it will apply the changes automatically. +In case you are suspecting the update might not have worked, you can use this section of the admin panel to check the situation.
+In the admin panel summary there are two numbers for the message queues. +The second number represents messages which could not be delivered and are queued for later retry. +If this number goes sky-rocking you might ask yourself which recipient is not receiving.
+Behind the inspect queue section of the admin panel you will find a list of the messages that could not be delivered. +The listing is sorted by the recipient name so identifying potential broken communication lines should be simple. +These lines might be broken for various reasons. +The receiving end might be off-line, there might be a high system load and so on.
+Don't panic! +Friendica will not queue messages for all time but will sort out dead nodes automatically after a while and remove messages from the queue then.
+This page allows to block all communications (inbound and outbound) with a specific domain name.
+Each blocked domain entry requires a reason that will be displayed on the friendica (/friendica
) page.
+Matching is exact, blocking a domain doesn't block subdomains.
The federation statistics page gives you a short summery of the nodes/servers/pods of the decentralized social network federation your node knows. +These numbers are not complete and only contain nodes from networks Friendica federates directly with.
+Using this page an admin can delete postings and eventually associated discussion threads from their Friendica node.
+To do so, they need to know the GUID of the posting.
+This can be found on the /display
page of the posting, it is the last part of the URL displayed in the browsers' navigation bar.
+You can get to the /display
page by following the Link to source.
Some addons you can install for your Friendica node have settings which have to be set by the admin. +All those addons will be listed in this area of the admin panels sidebar with their names.
+The log section of the admin panel is separated into two pages. +On the first, following the "log" link, you can configure how much Friendica shall log. +And on the second you can read the log.
+You should not place your logs into any directory that is accessible from the web.
+If you have to, and you are using the default configuration from Apache, you should choose a name for the logfile ending in .log
or .out
.
+Should you use another web server, please make sure that you have the correct access rules in place so that your log files are not accessible.
There are five different log levels: Normal, Trace, Debug, Data and All. +Specifying different verbosity of information and data written out to the log file. +Normally you should not need to log at all. +The DEBUG level will show a good deal of information about system activity but will not include detailed data. +In the ALL level Friendica will log everything to the file. +But due to the volume of information we recommend only enabling this when you are tracking down a specific problem.
+The amount of data can grow the filesize of the logfile quickly. +You should set up some kind of log rotation to keep the log file from growing too big.
+Known Issues: The filename friendica.log
can cause problems depending on your server configuration (see issue 2209).
By default, PHP warnings and error messages are suppressed.
+If you want to enable those, you have to activate them in the config/local.config.php
file.
+Use the following settings to redirect PHP errors to a file.
Config:
+<?php
+error_reporting(E_ERROR | E_WARNING | E_PARSE );
+ini_set('error_log','php.out');
+ini_set('log_errors','1');
+ini_set('display_errors', '0');
+
This will put all PHP errors in the file php.out
(which must be writeable by the webserver).
+Undeclared variables are occasionally referenced in the program, and therefore we do not recommend using E_NOTICE
or E_ALL
.
+The vast majority of issues reported at these levels are completely harmless.
+Please report to the developers any errors you encounter in the logs using the recommended settings above.
+They generally indicate issues which need to be resolved.
If you encounter a blank (white) page when using the application, view the PHP logs - as this almost always indicates an error has occurred.
+In this section of the admin panel you find two tools to investigate what Friendica sees for certain resources. +These tools can help to clarify communication problems.
+For the probe address Friendica will display information for the address provided.
+With the second tool check webfinger you can request information about the thing identified by a webfinger (someone@example.com
).
There are four exceptions to the rule, that all the config will be read from the database. +These are the database settings, the admin account settings, the path of PHP and information about an eventual installation of the node in a subdirectory of the (sub)domain.
+With the following settings, you specify the database server, the username and password for Friendica and the database to use.
+'database' => [
+ 'hostname' => 'localhost',
+ 'username' => 'mysqlusername',
+ 'password' => 'mysqlpassword',
+ 'database' => 'mysqldatabasename',
+ 'charset' => 'utf8mb4',
+],
+
You can set one, or more, accounts to be Admin. +By default, this will be the one account you create during the installation process. +But you can expand the list of email addresses by any used email address you want. +Registration of new accounts with a listed email address is not possible.
+ +Some of Friendica's processes are running in the background. +For this you need to specify the path to the PHP binary to be used.
+ +It is possible to install Friendica into a subdirectory of your web server. +We strongly discourage you from doing so, as this will break federation to other networks (e.g. Diaspora, GNU Social, Hubzilla) +Say you have a subdirectory for tests and put Friendica into a further subdirectory, the config would be:
+ +Furthermore, there are some experimental settings, you can read-up in the Config values that can only be set in config/local.config.php section of the documentation.
+ + +This document has been updated in November 2016. +SSL encryption is relevant for security. +This means that recommended settings change fast. +Keep your setup up to date and do not rely on this document being updated as fast as technologies change!
+If you are running your own Friendica site, you may want to use SSL (https) to encrypt communication between servers and between yourself and your server.
+There are basically two sorts of SSL certificates: Self-signed certificates and certificates signed by a certificate authority (CA). +Technically, both provide the same valid encryption. +There is a problem with self-signed certificates though: +They are neither installed in browsers nor on other servers. +That is why they provoke warnings about "mistrusted certificates". +This is confusing and disturbing.
+For this reason, we recommend to get a certificate signed by a CA. +Normally, you have to pay for them - and they are valid for a limited period of time (e.g. a year or two).
+There are ways to get a trusted certificate for free.
+Your SSL certificate will be valid for a domain or even only for a subdomain. +Make your final decision about your domain resp. subdomain before ordering the certificate. +Once you have it, changing the domain name means getting a new certificate.
+If your Friendica instance is running on a shared hosting platform, you should first check with your hosting provider. +They have instructions for you on how to do it there. +You can always order a paid certificate with your provider. +They will either install it for you or provide an easy way to upload the certificate and the key via a web interface. +With some providers, you have to send them your certificate. +They need the certificate, the key and the CA's intermediate certificate. +To be sure, send those three files. +You should send them to your provider via an encrypted channel!
+If you run your own server, we recommend to check out the "Let's Encrypt" initiative. +Not only do they offer free SSL certificates, but also a way to automate their renewal. +You need to install a client software on your server to use it. +Instructions for the official client are here. +Depending on your needs, you might want to look at the list of alternative LetsEncrypt clients.
+Visit the Mozilla's wiki for instructions on how to configure a secure webserver. +They provide recommendations for different web servers.
+When you are done, visit the test site SSL Labs to have them check if you succeeded.
+If you can successfully access your Friendica instance through https, there are a number of steps you can take to ensure your users will use SSL to access your instance.
+This is the simplest way to enforce site-wide secure access. +Every time a user tries to access any Friendica page by any mean (manual address bar entry or link), the web server issues a Permanent Redirect response with the secure protocol prepended to the requested URL.
+With Apache, enable the modules rewrite and ssl (with a shared hosting provider, this should be enabled already):
+ +Add the following lines to the .htaccess file in the root folder of your Friendica instance (thanks to AlfredSK):
+RewriteEngine On
+RewriteCond %{SERVER_PORT} 80
+RewriteRule ^(.*)$ https://your.friendica.domain/$1 [R=301,L]
+
With nginx, configure your server directive this way (documentation):
+server {
+ listen 80;
+ server_name your.friendica.domain;
+ return 301 https://$server_name$request_uri;
+}
+
In the Admin Settings, there are three SSL-related settings:
+Friendica has a build in command console you can find in the bin directory. +The console provides the following commands:
+Please consult bin/console help on the command line interface of your server for details about the commands.
+In addition to the tools Friendica includes, some 3rd party tools can make your admin days easier.
+Fail2ban is an intrusion prevention framework (see Wikipedia) that you can use to forbid access to a server under certain conditions, e.g. 3 failed attempts to log in, for a certain amount of time.
+The following configuration was provided by Steffen K9 using Debian. +You need to adjust the logpath in the jail.local file and the bantime (value is in seconds).
+In /etc/fail2ban/jail.local create a section for Friendica:
+[friendica]
+enabled = true
+findtime = 300
+bantime = 900
+filter = friendica
+port = http,https
+logpath = /var/log/friend.log
+logencoding = utf-8
+
And create a filter definition in /etc/fail2ban/filter.d/friendica.conf:
+[Definition]
+failregex = ^.*authenticate\: failed login attempt.*\"ip\"\:\"<HOST>\".*$
+ignoreregex =
+
Additionally, you have to define the number of failed logins before the ban should be activated. +This is done either in the global configuration or for each jail separately. +You should inform your users about the number of failed login attempts you grant them. +Otherwise, you'll get many reports about the server not functioning if the number is too low.
+If you have activated the logs in Friendica, be aware that they can grow to a significant size. +To keep them in control you should add them to the automatic log rotation, e.g. using the logrotate command.
+In /etc/logrotate.d/ add a file called friendica that contains the configuration. +The following will compress /var/log/friendica (assuming this is the location of the log file) on a daily basis and keep 2 days of back-log.
+ + + +If you installed Friendica in the path/to/friendica
folder:
path/to/friendica_new
.path/to/friendica
to path/to/friendica_new
:config/local.config.php
proxy/
path/to/friendica
folder to path/to/friendica_old
.path/to/friendica_new
folder to path/to/friendica
.path/to/friendica_old
folder.To update Addons from an archive, simply delete the path/to/friendica/addon
and replace it with the provided archive.
You can get the latest changes at any time with
+ +The addon tree has to be updated separately like so:
+ +For both repositories:
+The default branch to use is the stable
branch, which is the stable version of Friendica.
+It is updated about four times a year on a fixed schedule.
If you want to use and test bleeding edge code please check out the develop
branch.
+The new features and fixes will be merged from develop
into stable
after a release candidate period before each release.
Warning: The develop
branch is unstable, and breaks on average once a month for at most 24 hours until a patch is submitted and merged.
+Be sure to pull frequently if you choose the develop
branch.
Starting from MySQL version 5.7.4, the IGNORE keyword in ALTER TABLE statements is ignored. +This prevents automatic table deduplication if a UNIQUE index is added to a Friendica table's structure. +If a DB update fails for you while creating a UNIQUE index, make sure to manually deduplicate the table before trying the update again.
+There are two main ways of doing it, either by manually removing the duplicates or by recreating the table.
+Manually removing the duplicates is usually faster if they're not too numerous.
+To manually remove the duplicates, you need to know the UNIQUE index columns available in database.sql
.
SELECT GROUP_CONCAT(id), <index columns>, count(*) as count FROM users
+GROUP BY <index columns> HAVING count >= 2;
+
+/* delete or merge duplicate from above query */;
+
If there are too many rows to handle manually, you can create a new table with the same structure as the table with duplicates and insert the existing content with INSERT IGNORE.
+To recreate the table you need to know the table structure available in database.sql
.
CREATE TABLE <table_name>_new <rest of the CREATE TABLE>;
+INSERT IGNORE INTO <table_name>_new SELECT * FROM <table_name>;
+DROP TABLE <table_name>;
+RENAME TABLE <table_name>_new TO <table_name>;
+
This method is slower overall, but it is better suited for large numbers of duplicates.
+Some updates include the use of foreign keys now that will bump into issues with previous versions, which would sometimes shove bad data into tables, preventing, causing errors such as below.
+Error 1452 occurred during database update:
+Cannot add or update a child row: a foreign key constraint fails (`friendica`.`#sql-10ea6_5a6d`, CONSTRAINT `#sql-10ea6_5a6d_ibfk_1` FOREIGN KEY (`contact-id`) REFERENCES `contact` (`id`))
+ALTER TABLE `thread` ADD FOREIGN KEY (`iid`) REFERENCES `item` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE;
+
All current known fixes for possible items that can go wrong are as below.
+DELETE FROM `item` WHERE `owner-id` NOT IN (SELECT `id` FROM `contact`);
+DELETE FROM `item` WHERE `contact-id` NOT IN (SELECT `id` FROM `contact`);
+DELETE FROM `notify` WHERE `uri-id` NOT IN (SELECT `id` FROM `item-uri`);
+DELETE FROM `photo` WHERE `contact-id` NOT IN (SELECT `id` FROM `contact`);
+DELETE FROM `thread` WHERE `iid` NOT IN (SELECT `id` FROM `item`);
+DELETE FROM `item` WHERE `author-id` NOT IN (SELECT `id` FROM `contact`);
+DELETE FROM `diaspora-interaction` WHERE `uri-id` NOT IN (SELECT `id` FROM `item-uri`);
+
This all has been compiled as of currently from issue #9746, #9753, and #9878.
+ + +\n {translation(\"search.result.term.missing\")}: {...missing}\n
\n }\n