settings.rst 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. .. _settings.yml:
  2. ================
  3. ``settings.yml``
  4. ================
  5. .. sidebar:: Further reading ..
  6. - :ref:`search API`
  7. This page describe the options possibilities of the settings.yml file.
  8. .. _settings global:
  9. Global Settings
  10. ===============
  11. .. code:: yaml
  12. server:
  13. port : 8888
  14. secret_key : "ultrasecretkey" # change this!
  15. debug : False # debug mode, only for development
  16. request_timeout : 2.0 # seconds
  17. base_url : False # set custom base_url (or False)
  18. themes_path : "" # custom ui themes path
  19. default_theme : oscar # ui theme
  20. useragent_suffix : "" # suffix of searx_useragent, could contain
  21. # informations like admins email address
  22. image_proxy : False # proxying image results through searx
  23. default_locale : "" # default interface locale
  24. # uncomment below section if you want to use a proxy
  25. #outgoing_proxies :
  26. # http : http://127.0.0.1:8080
  27. # https: http://127.0.0.1:8080
  28. # uncomment below section only if you have more than one network interface
  29. # which can be the source of outgoing search requests
  30. #source_ips:
  31. # - 1.1.1.1
  32. # - 1.1.1.2
  33. locales:
  34. en : English
  35. de : Deutsch
  36. he : Hebrew
  37. hu : Magyar
  38. fr : Français
  39. es : Español
  40. it : Italiano
  41. nl : Nederlands
  42. ja : 日本語 (Japanese)
  43. tr : Türkçe
  44. ru : Russian
  45. ro : Romanian
  46. ``port`` :
  47. Port number of the searx web application if you run it directly using ``python
  48. searx/webapp.py``. Doesn't apply to searx running on Apache or Nginx.
  49. ``secret_key`` :
  50. Used for cryptography purpose.
  51. ``debug`` :
  52. Allow a more detailed log if you run searx directly. Display *detailed* error
  53. messages in the browser too, so this must be deactivated in production.
  54. ``request_timeout`` :
  55. Global timeout of the requests made to others engines in seconds. A bigger
  56. timeout will allow to wait for answers from slow engines, but in consequence
  57. will slow searx reactivity (the result page may take the time specified in the
  58. timeout to load)
  59. ``base_url`` :
  60. The base URL where searx is deployed. Used to create correct inbound links.
  61. ``themes_path`` :
  62. Path to where the themes are located. If you didn't develop anything, leave it
  63. blank.
  64. ``default_theme`` :
  65. Name of the theme you want to use by default on you searx instance.
  66. ``useragent_suffix`` :
  67. Suffix to the user-agent searx uses to send requests to others engines. If an
  68. engine wish to block you, a contact info here may be useful to avoid that.
  69. ``image_proxy`` :
  70. Allow your instance of searx of being able to proxy images. Uses memory space.
  71. ``default_locale`` :
  72. Aearx interface language. If blank, the locale is detected by using the
  73. browser language. If it doesn't work, or you are deploying a language
  74. specific instance of searx, a locale can be defined using an ISO language
  75. code, like ``fr``, ``en``, ``de``.
  76. .. _requests proxies: http://requests.readthedocs.io/en/latest/user/advanced/#proxies
  77. .. _PR SOCKS support: https://github.com/kennethreitz/requests/pull/478
  78. ``outgoing_proxies`` :
  79. Define a proxy you wish to use, see `requests proxies`_. SOCKS proxies are
  80. not supported / see `PR SOCKS support`.
  81. ``source_ips`` :
  82. If you use multiple nework interfaces, define from which IP the requests must
  83. be made.
  84. ``locales`` :
  85. Locales codes and their names. Available translations of searx interface.
  86. .. _settings engine:
  87. Engine settings
  88. ===============
  89. .. sidebar:: Further reading ..
  90. - :ref:`engines-dev`
  91. .. code:: yaml
  92. - name : bing
  93. engine : bing
  94. shortcut : bi
  95. base_url : 'https://{language}.wikipedia.org/'
  96. categories : general
  97. timeout : 3.0
  98. api_key : 'apikey'
  99. disabled : True
  100. language : en_US
  101. ``name`` :
  102. Name that will be used accross searx to define this engine. In settings, on
  103. the result page...
  104. ``engine`` :
  105. Name of the python file used to handle requests and responses to and from this
  106. search engine.
  107. ``shortcut`` :
  108. Code used to execute bang requests (in this case using ``!bi`` or ``?bi``)
  109. ``base_url`` : optional
  110. Part of the URL that should be stable accross every request. Can be useful to
  111. use multiple sites using only one engine, or updating the site URL without
  112. touching at the code.
  113. ``categories`` : optional
  114. Define in which categories this engine will be active. Most of the time, it is
  115. defined in the code of the engine, but in a few cases it is useful, like when
  116. describing multiple search engine using the same code.
  117. ``timeout`` : optional
  118. Timeout of the search with the current search engine. **Be careful, it will
  119. modify the global timeout of searx.**
  120. ``api_key`` : optional
  121. In a few cases, using an API needs the use of a secret key. How to obtain them
  122. is described in the file.
  123. ``disabled`` : optional
  124. To disable by default the engine, but not deleting it. It will allow the user
  125. to manually activate it in the settings.
  126. ``language`` : optional
  127. If you want to use another language for a specific engine, you can define it
  128. by using the full ISO code of language and country, like ``fr_FR``, ``en_US``,
  129. ``de_DE``.
  130. ``weigth`` : default ``1``
  131. Weighting of the results of this engine.
  132. ``display_error_messages`` : default ``True``
  133. When an engine returns an error, the message is displayed on the user interface.
  134. .. note::
  135. A few more options are possible, but they are pretty specific to some
  136. engines, and so won't be described here.