Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
3.4 KiB

  1. Admin Tools
  2. ===========
  3. * [Home](help)
  4. Friendica Tools
  5. ---------------
  6. Friendica has a build in command console you can find in the *bin* directory.
  7. The console provides the following commands:
  8. * cache: Manage node cache
  9. * config: Edit site config
  10. * createdoxygen: Generate Doxygen headers
  11. * dbstructure: Do database updates
  12. * docbloxerrorchecker: Check the file tree for DocBlox errors
  13. * extract: Generate translation string file for the Friendica project (deprecated)
  14. * globalcommunityblock: Block remote profile from interacting with this node
  15. * globalcommunitysilence: Silence remote profile from global community page
  16. * archivecontact: Archive a contact when you know that it isn't existing anymore
  17. * help: Show help about a command, e.g (bin/console help config)
  18. * autoinstall: Starts automatic installation of friendica based on values from htconfig.php
  19. * maintenance: Set maintenance mode for this node
  20. * newpassword: Set a new password for a given user
  21. * php2po: Generate a messages.po file from a strings.php file
  22. * po2php: Generate a strings.php file from a messages.po file
  23. * typo: Checks for parse errors in Friendica files
  24. * postupdate: Execute pending post update scripts (can last days)
  25. * storage: Manage storage backend
  26. Please consult *bin/console help* on the command line interface of your server for details about the commands.
  27. 3rd Party Tools
  28. ---------------
  29. In addition to the tools Friendica includes, some 3rd party tools can make your admin days easier.
  30. ### Fail2ban
  31. 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.
  32. The following configuration was [provided]( by Steffen K9 using Debian.
  33. You need to adjust the *logpath* in the *jail.local* file and the *bantime* (value is in seconds).
  34. In */etc/fail2ban/jail.local* create a section for Friendica:
  35. [friendica]
  36. enabled = true
  37. findtime = 300
  38. bantime = 900
  39. filter = friendica
  40. port = http,https
  41. logpath = /var/log/friend.log
  42. logencoding = utf-8
  43. And create a filter definition in */etc/fail2ban/filter.d/friendica.conf*:
  44. [Definition]
  45. failregex = ^.*authenticate\: failed login attempt.*\"ip\"\:\"<HOST>\".*$
  46. ignoreregex =
  47. Additionally you have to define the number of failed logins before the ban should be activated.
  48. This is done either in the global configuration or for each jail separately.
  49. You should inform your users about the number of failed login attempts you grant them.
  50. Otherwise you'll get many reports about the server not functioning if the number is too low.
  51. ### Log rotation
  52. If you have activated the logs in Friendica, be aware that they can grow to a significant size.
  53. To keep them in control you should add them to the automatic [log rotation](, e.g. using the *logrotate* command.
  54. In */etc/logrotate.d/* add a file called *friendica* that contains the configuration.
  55. 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.
  56. /var/log/friendica.log {
  57. compress
  58. daily
  59. rotate 2
  60. }