Skip to content

basic auth example #1

@geoffsee

Description

@geoffsee

Basic auth can be achieved by modifying the Dockerfile and uwsgi.ini. Health checks required for blue-green deployments will need to be configured alternatively.

1. Update Dockerfile.searxng

FROM searxng/searxng:2025.3.31-08885d061

RUN mkdir -p /etc/searxng

RUN apk upgrade && apk add uwsgi-router_basicauth

# ...rest of Dockerfile

2. Update uwsgi.ini

# ...rest of uwsgi.ini

# Basic auth
plugins = router_basicauth
route = .* basicauth:Development Area,<youruser>:<yourpassword>

3. Redeploy

fly deploy

4. Update client

   headers: {
        'Authorization': 'Basic ' + btoa(`${process.env.SEARXNG_USER}:${process.env.SEARXNG_PASSWORD}`),
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions