settings.rst 5.5 KB

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