installation-searxng.rst 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. .. _installation basic:
  2. =========================
  3. Step by step installation
  4. =========================
  5. .. contents::
  6. :depth: 2
  7. :local:
  8. :backlinks: entry
  9. In this section we show the setup of a SearXNG instance that will be installed
  10. by the :ref:`installation scripts`.
  11. .. _install packages:
  12. Install packages
  13. ================
  14. .. kernel-include:: $DOCS_BUILD/includes/searxng.rst
  15. :start-after: START distro-packages
  16. :end-before: END distro-packages
  17. .. hint::
  18. This installs also the packages needed by :ref:`searxng uwsgi`
  19. .. _create searxng user:
  20. Create user
  21. ===========
  22. .. kernel-include:: $DOCS_BUILD/includes/searxng.rst
  23. :start-after: START create user
  24. :end-before: END create user
  25. .. _searxng-src:
  26. Install SearXNG & dependencies
  27. ==============================
  28. Start a interactive shell from new created user and clone SearXNG:
  29. .. kernel-include:: $DOCS_BUILD/includes/searxng.rst
  30. :start-after: START clone searxng
  31. :end-before: END clone searxng
  32. In the same shell create *virtualenv*:
  33. .. kernel-include:: $DOCS_BUILD/includes/searxng.rst
  34. :start-after: START create virtualenv
  35. :end-before: END create virtualenv
  36. To install SearXNG's dependencies, exit the SearXNG *bash* session you opened above
  37. and start a new one. Before installing, check if your *virtualenv* was sourced
  38. from the login (*~/.profile*):
  39. .. kernel-include:: $DOCS_BUILD/includes/searxng.rst
  40. :start-after: START manage.sh update_packages
  41. :end-before: END manage.sh update_packages
  42. .. tip::
  43. Open a second terminal for the configuration tasks and leave the ``(searx)$``
  44. terminal open for the tasks below.
  45. .. _use_default_settings.yml:
  46. Configuration
  47. =============
  48. .. sidebar:: ``use_default_settings: True``
  49. - :ref:`settings.yml`
  50. - :ref:`settings location`
  51. - :ref:`settings use_default_settings`
  52. - :origin:`/etc/searxng/settings.yml <utils/templates/etc/searxng/settings.yml>`
  53. To create a initial ``/etc/searxng/settings.yml`` we recommend to start with a
  54. copy of the file :origin:`utils/templates/etc/searxng/settings.yml`. This setup
  55. :ref:`use default settings <settings use_default_settings>` from
  56. :origin:`searx/settings.yml` and is shown in the tab *"Use default settings"*
  57. below. This setup:
  58. - enables :ref:`limiter <limiter>` to protect against bots
  59. - enables :ref:`image proxy <image_proxy>` for better privacy
  60. - enables :ref:`cache busting <static_use_hash>` to save bandwidth
  61. Modify the ``/etc/searxng/settings.yml`` to your needs:
  62. .. tabs::
  63. .. group-tab:: Use default settings
  64. .. literalinclude:: ../../utils/templates/etc/searxng/settings.yml
  65. :language: yaml
  66. :end-before: # hostnames:
  67. To see the entire file jump to :origin:`utils/templates/etc/searxng/settings.yml`
  68. .. group-tab:: searx/settings.yml
  69. .. literalinclude:: ../../searx/settings.yml
  70. :language: yaml
  71. :end-before: # hostnames:
  72. To see the entire file jump to :origin:`searx/settings.yml`
  73. For a *minimal setup* you need to set ``server:secret_key``.
  74. .. kernel-include:: $DOCS_BUILD/includes/searxng.rst
  75. :start-after: START searxng config
  76. :end-before: END searxng config
  77. Check
  78. =====
  79. To check your SearXNG setup, optional enable debugging and start the *webapp*.
  80. SearXNG looks at the exported environment ``$SEARXNG_SETTINGS_PATH`` for a
  81. configuration file.
  82. .. kernel-include:: $DOCS_BUILD/includes/searxng.rst
  83. :start-after: START check searxng installation
  84. :end-before: END check searxng installation
  85. If everything works fine, hit ``[CTRL-C]`` to stop the *webapp* and disable the
  86. debug option in ``settings.yml``. You can now exit SearXNG user bash session (enter exit
  87. command twice). At this point SearXNG is not demonized; uwsgi allows this.