34
submitted 2 days ago* (last edited 2 days ago) by rounding_error@lemmy.today to c/selfhosted@lemmy.world

If it helps others this was my config. To be honest I have a weak grasp of what it actually does so there might be some security issues with it.

Apparently you can also add lemmy as a search engine. Will work on that later.

config

# docker-compose.yml
name: searxng

services:
  core:
    container_name: searxng-core
    image: docker.io/searxng/searxng:latest
    restart: always
    network_mode: "service:gluetun"
    volumes:
      - ./core-config:/etc/searxng
      - core-data:/var/cache/searxng

  gluetun:
    image: qmcgaw/gluetun:v3.41.3
    container_name: gluetun
    cap_add:
      - NET_ADMIN
    environment:
      - VPN_SERVICE_PROVIDER=custom
      - VPN_TYPE=openvpn
      - OPENVPN_CUSTOM_CONFIG=/gluetun/custom.conf
    ports:
      - 8080:8080
    restart: always
    volumes:
      - ./gluetun:/gluetun
    devices:
      - /dev/net/tun:/dev/net/tun

  nginx:
    container_name: nginx
    image: nginx:latest
    ports:
      - 80:80
      - 443:443
    volumes:
      - ./nginx:/etc/nginx/conf.d
      - ./cert:/etc/nginx/cert

  valkey:
    container_name: searxng-valkey
    image: docker.io/valkey/valkey:9-alpine
    command: valkey-server --save 30 1 --loglevel warning
    restart: always
    volumes:
      - valkey-data:/data/

volumes:
  core-data:
  valkey-data:

# nginx/default.conf
server {
  server_name localhost;
  listen 443 ssl;

  ssl_certificate /etc/nginx/cert/cert.pem;
  ssl_certificate_key /etc/nginx/cert/private.key;

  location / {
    proxy_pass http://gluetun:8080/;

    proxy_set_header   Host             $host;
    proxy_set_header   Connection       $http_connection;

    proxy_set_header   X-Forwarded-Proto $scheme;
    proxy_set_header   X-Real-IP        $remote_addr;
    proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
  }
}

server {
  server_name localhost;
  listen 80;
  location / {
    return 301 https://$host$request_uri;
  }
}

you are viewing a single comment's thread
view the rest of the comments
[-] rounding_error@lemmy.today 2 points 2 days ago

All of the mainstream engines block me after a few requests too on my VPN. After a bit I’m only getting stuff from DDG and what else. Gotta add more engines.

this post was submitted on 25 Aug 2026
34 points (94.7% liked)

Selfhosted

61752 readers
533 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS