settings_valkey.rst.txt 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. .. _settings valkey:
  2. ===========
  3. ``valkey:``
  4. ===========
  5. .. _Valkey:
  6. https://valkey.io
  7. .. _Valkey-Installation:
  8. https://valkey.io/topics/installation/
  9. .. _There are several ways to specify a database number:
  10. https://valkey-py.readthedocs.io/en/stable/connections.html#valkey.Valkey.from_url
  11. A Valkey_ DB can be connected by an URL, in section :ref:`valkey db` you will
  12. find a description to test your valkey connection in SearXNG.
  13. ``url`` : ``$SEARXNG_VALKEY_URL``
  14. URL to connect valkey database. `There are several ways to specify a database
  15. number`_::
  16. valkey://[[username]:[password]]@localhost:6379/0
  17. valkeys://[[username]:[password]]@localhost:6379/0
  18. unix://[[username]:[password]]@/path/to/socket.sock?db=0
  19. When using sockets, don't forget to check the access rights on the socket::
  20. ls -la /usr/local/searxng-valkey/run/valkey.sock
  21. srwxrwx--- 1 searxng-valkey searxng-valkey ... /usr/local/searxng-valkey/run/valkey.sock
  22. In this example read/write access is given to the *searxng-valkey* group. To
  23. get access rights to valkey instance (the socket), your SearXNG (or even your
  24. developer) account needs to be added to the *searxng-valkey* group.
  25. .. _Valkey Developer Notes:
  26. Valkey Developer Notes
  27. ======================
  28. To set up a local Valkey_ DB, set the URL connector in your YAML setting:
  29. .. code:: yaml
  30. valkey:
  31. url: valkey://localhost:6379/0
  32. To install a local Valkey_ DB from package manager read `Valkey-Installation`_
  33. or use:
  34. .. code:: sh
  35. $ ./utils/searxng.sh install valkey
  36. # restart your SearXNG instance