this post was submitted on 22 Apr 2025
14 points (88.9% liked)

Selfhosted

46265 readers
178 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:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

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

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

Hello, I want to install searxng without using Docker on my homeserver so I basically run the install script from the official documentation. Already tried to use the automatic script for setting up apache and it basically worked by exposing /searxng. But I would like to do something simpler as I like that apache would only expose localhost:80 (for example) to use a reverse proxy later to point to it. Just wondering how this configuration work and how I could do something that applicates to my use case :

# -*- coding: utf-8; mode: apache -*-

LoadModule ssl_module           /mod_ssl.so
LoadModule headers_module       /mod_headers.so
LoadModule proxy_module         /mod_proxy.so
LoadModule proxy_uwsgi_module   /mod_proxy_uwsgi.so
# LoadModule setenvif_module      /mod_setenvif.so
#
# SetEnvIf Request_URI /searxng dontlog
# CustomLog /dev/null combined env=dontlog

<Location /searxng>

    Require all granted
    Order deny,allow
    Deny from all
    # Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
    Allow from all

    # add the trailing slash
    RedirectMatch  308 /searxng$ /searxng/

    ProxyPreserveHost On
    ProxyPass unix:/usr/local/searxng/run/socket|uwsgi://uwsgi-uds-searxng/

    # see flaskfix.py
    RequestHeader set X-Scheme %{REQUEST_SCHEME}s
    RequestHeader set X-Script-Name /searxng

    # see limiter.py
    RequestHeader set X-Real-IP %{REMOTE_ADDR}s
    RequestHeader append X-Forwarded-For %{REMOTE_ADDR}s

</Location>

# uWSGI serves the static files and in settings.yml we use::
#
#   ui:
#     static_use_hash: true
#
# Alias /searxng/static/ /usr/local/searxng/searxng-src/searx/static/

Any help here? Thank you very much

top 14 comments
sorted by: hot top controversial new old
[–] enemenemu@lemm.ee 6 points 2 days ago

I just read searxng with a Chi as X and it made sense ... wow😅

[–] elvith@feddit.org 2 points 2 days ago* (last edited 2 days ago) (1 children)

You state that you did use the install script, but also that you want to run it with docker. Did you follow the instructions in their docker repository? It's quite easy to get it running - they included a complete docker-compose, a Caddyfile and all you need.

https://github.com/searxng/searxng-docker

Edit, I'm dumb, I misread.

[–] foremanguy92_@lemmy.ml 3 points 2 days ago

Said *without docker

[–] slazer2au@lemmy.world 2 points 2 days ago (1 children)

You are going to need to provide a significant more amount of information. Like guide are you using, which specific step isn't working, what error messages are you getting.

[–] foremanguy92_@lemmy.ml 1 points 2 days ago

edited the original post sorry

[–] MangoPenguin@lemmy.blahaj.zone 1 points 2 days ago (1 children)

What do you want to do? Your explanation isn't very clear on that..

[–] foremanguy92_@lemmy.ml 2 points 2 days ago

Basically wants to setup SearXNG without using docker but wants to understand how apache serves it

[–] just_another_person@lemmy.world 0 points 2 days ago (1 children)

You don't need to use Apache if that's confusing you. The project seems to include a full Caddyfile so that's probably going to be easier for you.

[–] foremanguy92_@lemmy.ml 0 points 2 days ago (2 children)

Would like to understand it to customize it a bit and serve the service to a port instead of an URL for example

[–] MangoPenguin@lemmy.blahaj.zone 3 points 2 days ago* (last edited 2 days ago)

The service will always be on a port, that's just how networking works.

Do you mean you want to get rid of the path and serve it on the root or a subdomain? So https://searx.mydomain/ instead of https://mydomain/searx/

[–] HelloRoot@lemy.lol 1 points 2 days ago* (last edited 2 days ago)

You can do that with caddy as well.

[–] bradley@techhub.social -1 points 2 days ago (1 children)

@foremanguy92_ if it is just you using the service I would suggest skipping apache and using tailscale to access. Allows you to get to it as if you're always on your network.

If you need it public my apologies I'm no help.

[–] foremanguy92_@lemmy.ml 2 points 2 days ago (1 children)

Would like to make it "pseudo-public" thank you anyway

[–] WeirdGoesPro@lemmy.dbzer0.com 5 points 2 days ago* (last edited 2 days ago)

Making it pseudo-public and not using docker would be a mistake, in my opinion. Anything public-ish can benefit from the extra security of docker’s sandboxing.

It will also make it much easier to run things through a VPN with Gluetun—something you definitely want to do if you have strangers using your SearXNG instance.

You should really consider a container of some kind.