You can set it in the systemd service file like this:
[...]
[Service]
Type=simple
User=whoogle
WorkingDirectory=/opt/whoogle-search
Environment=WHOOGLE_USER_AGENT=Lynx/2.9.2 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/3.4.0
Environment=WHOOGLE_USER_AGENT_MOBILE=Lynx/2.9.2 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/3.4.0
Environment=WHOOGLE_USE_CLIENT_USER_AGENT=0
[...]
Or, if you are using the AUR/Chaotic-AUR package you should have EnvironmentFile=/etc/default/whoogle
set in the service file. You can set environment variables right in /etc/default/whoogle
(without the Environment=
part).
/etc/default/whoogle
BIND_ADDRESS=127.0.0.1
LISTEN_PORT=5000
WHOOGLE_CONFIG_THEME=dark
WHOOGLE_CONFIG_NEW_TAB=1
WHOOGLE_CONFIG_VIEW_IMAGE=1
WHOOGLE_RESULTS_PER_PAGE=50
WHOOGLE_AUTOCOMPLETE=1
# Rose Pine theme
# https://github.com/rose-pine/whoogle
WHOOGLE_CONFIG_STYLE=:root{--whoogle-logo:#c4a7e7;--whoogle-page-bg:#faf4ed;--whoogle-element-bg:#f2e9e1;--whoogle-text:#575279;--whoogle-contrast-text:#1f1d2e;--whoogle-secondary-text:#797593;--whoogle-result-bg:#faf4ed;--whoogle-result-title:#d7827e;--whoogle-result-url:#286983;--whoogle-result-visited:#907aa9;--whoogle-dark-logo:#c4a7e7;--whoogle-dark-page-bg:#191724;--whoogle-dark-element-bg:#1f1d2e;--whoogle-dark-text:#e0def4;--whoogle-dark-contrast-text:#e0def4;--whoogle-dark-secondary-text:#908caa;--whoogle-dark-result-bg:#393552;--whoogle-dark-result-title:#9ccfd8;--whoogle-dark-result-url:#3e8fb0;--whoogle-dark-result-visited:#c4a7e7}#whoogle-w{fill:#eb6f92}#whoogle-h{fill:#f6c177}#whoogle-o-1{fill:#ebbcba}#whoogle-o-2{fill:#31748f}#whoogle-g{fill:#9ccfd8}#whoogle-l{fill:#c4a7e7}#whoogle-e{fill:#908caa}
# User agent spoofing (Google no longer supports javascript-free search requests)
# https://github.com/benbusby/whoogle-search/issues/1211#issuecomment-2597452334
WHOOGLE_USE_CLIENT_USER_AGENT=0
WHOOGLE_USER_AGENT="Lynx/2.9.2 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/3.4.0"
WHOOGLE_USER_AGENT_MOBILE="Lynx/2.9.2 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/3.4.0"
Then restart Whoogle and see if it works!
systemctl restart whoogle