This is assuming a deployment like the official searxng-dockercompose.yaml with Caddy included. You may ignore all things Caddy related if you do not use a reverse proxy or want to use your own reverse proxy. Note: If omitting the reverse proxy or changing to another one you may need to adjust the limiter config (or switch it off for a private loacl deployment).
Caddy will be deployed in the host network, the other containers will reside in the searxng network.
This is not 100% up to date to the current state of the example-repository, but "works for me". I'm constantly adjusting things and I'm currently also trying to port this to rootless podman - but I'm struggeling to get eversthing deployed and running with Ansible. There might be adjustments needed when running this rootless.
Another thing "under construction" for this ist to put this together in a pod for easier management, but I need to seperate some services/containers first in my deployment...
How to deploy (assuming you're NOT using rootless podman. If so, read below):
- Create/download all those files
- Enter your domain, mail adress and base url in
.env - adjust
settings.yaml- if deploying privately (e.g. at home) you can turn off the limiter - and also omit the limiter.toml. If this instance is (theoretically) reachable from the internet, maybe leave it on... - don't forget to set a random secret key in the
settings.yaml- e.g. by doingsed -i "s|ultrasecretkey|$(openssl rand -hex 32)|g" settings.yml - If you use another reverse proxy (config) AND use the limiter, you might need to check the
limiter.tomlso that everything works as expected. Also you might want to remove thecaddy.servicefrom line 4 insearxng.containerthen. - Create a directory - e.g
/usr/local/searxng/and put the.envthere - Put the
Caddyfilein/var/lib/containers/storage/volumes/caddy-caddyfile/_data/ - Put
favicons.toml,/settings.ymlandlimiter.toml(if using the limiter) to/var/lib/containers/storage/volumes/searxng/_data/ - Put
*.container,*.networkand*.volumefiles in/etc/containers/systemd/ - Reload systemd units with
sudo systemctl daemon-reload - Start searxng with
sudo systemctl start searxng
Note, if using rootless podman, you need to change /var/lib/containers/storage/volumes to ~/.local/share/containers/storage/volumes in all paths above. And you need to change /etc/containers/systemd/ to e.g. ~/.config/containers/systemd/.