User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
services:searxng [2024/07/30 11:35] willyservices:searxng [2024/11/11 06:54] (current) – external edit 127.0.0.1
Line 5: Line 5:
 ===== Installation ===== ===== Installation =====
  
-There are multiple installation approaches possible. You can either go with containers or bare-metal. While i usually recoment bare-metal, this time going the podman way is actually recomended because the bare-metal approach requires running a root install script, which is **not** a good idea, or read it and decompose enough to run the single commands by hand, which would be annoying and not too much fun because the install script is complex and well written.+There are multiple installation approaches possible. You can either go with containers or bare-metal. While i usually recommend bare-metal, this time going the podman way is actually preferable because the bare-metal approach requires running a root install script, which is **not** a good idea, or read it and decompose enough to run the single commands by hand, which would be annoying and not too much fun since the install script is complex and not well written.
  
-So, as usual create the user and clone the repo and copy the compose yaml +So, as usual create the user, then clone the repository and copy the **docker-compose.yaml**:
 <code bash> <code bash>
-useradd -d /deposito/daemons/searxng -m searxng+useradd -d /data/daemons/searxng -m searxng
 su - searxng su - searxng
 git clone https://github.com/searxng/searxng-docker.git git clone https://github.com/searxng/searxng-docker.git
Line 15: Line 15:
 </code> </code>
  
-Now you don't want Caddy because you already have NGINX as reverse proxy, so :+Now you don't want Caddy because you already have NGINX as reverse proxy, so edit the docker compose file like the following example:
 <file - docker-compose.yml> <file - docker-compose.yml>
 version: "3.7" version: "3.7"
Line 43: Line 43:
  
 networks: networks:
-  searxng_net:+  searxng-net:
     ipam:     ipam:
       driver: default       driver: default
Line 55: Line 55:
 Remember to set an available port (8083)! Remember to set an available port (8083)!
  
-Now pull and start it:+Now pull it:
 <code bash> <code bash>
 podman compose pull podman compose pull
 </code> </code>
  
-To start it, and set it up on boot, as usual check [[gentoo:locald|Custom User Services]] and do the following links: 
-<code bash 
-cd /etc/local.d 
-ln -s _servicer.sh 21-searxng--podman.start 
-ln -s _servicer.sh 21-searxng--podman.stop 
-</code> 
- 
-You can start it now by running the above start link. 
  
 ===== Reverse Proxy ===== ===== Reverse Proxy =====
  
-Following [[https://docs.searxng.org/admin/installation-nginx.html#installation-nginx|this page]] create NGINX config file called **searxng.conf** like this: +You can run SearXNG both as a subdomain or subpathI prefer the first one because it make it easier to integrate as Firefox default search engine.
-<file - searxng.conf> +
-location /searxng/ {+
  
-    proxy_pass http://127.0.0.1:8083/;+I assume the SearXNG will be reachable as **https://search.mydomain.com**.
  
-    proxy_set_header   Host             $host+Following [[https://docs.searxng.org/admin/installation-nginx.html#installation-nginx|this page]] create a NGINX config file called **/etc/nginx/com.mydomain/search/search.conf** like this: 
-    proxy_set_header   Connection       $http_connection;+<file - search.conf> 
 +server { 
 +        server_name search.mydomain.com; 
 +        listen 443 ssl;  
 +        listen 8443 ssl;  
 +        http2 on;
  
-    # see flaskfix.py +        access_log /var/log/nginx/search.mydomain.com_access_log main
-    proxy_set_header   X-Scheme         $scheme+        error_log /var/log/nginx/search.mydomain.com_error_log info;
-    proxy_set_header   X-Script-Name    /searxng/;+
  
-    # see limiter.py +        location / {
-    proxy_set_header   X-Real-IP        $remote_addr; +
-    proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;+
  
-    # proxy_buffering  off; +            proxy_pass http://127.0.0.1:8083/;
-    # proxy_request_buffering off; +
-    # proxy_buffer_size 8k;+
  
-    access_log /dev/null+            proxy_set_header   Host             $host
-    error_log  /dev/null;+            proxy_set_header   Connection       $http_connection;
  
 +            # see flaskfix.py
 +            proxy_set_header   X-Scheme         $scheme;
 +            proxy_set_header   X-Script-Name    /searxng/;
 +
 +            # see limiter.py
 +            proxy_set_header   X-Real-IP        $remote_addr;
 +            proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
 +
 +            access_log /dev/null;
 +            error_log  /dev/null;
 +        }
 } }
 </file> </file>
Line 100: Line 101:
 and add it to your NGINX configuration. See [[selfhost:nginx|The Reverse Proxy concept]] for more details. and add it to your NGINX configuration. See [[selfhost:nginx|The Reverse Proxy concept]] for more details.
  
 +SSO can be added using the **basic** endpoint in Authelia or NGINX PAM Auth.
 +
 +===== Add to firefox =====
 +
 +Navigate your firefox to **https://search.mydomain.com**, then right-click on address bar and select the last icon: add SearXNG as search engine. If the option is missing, you have a different version of Firefox, check online how to do such a thing. 
  
 ===== Autostart ===== ===== Autostart =====

This website uses technical cookies only. No information is shared with anybody or used in any way but provide the website in your browser.

More information