Allow Custom User At Installation


When using Pi-Hole under a custom webserver, such as NGinx or Apache, often the server requires a different user than what Pi-Hole normally installs under. Pi-Hole currently only installs under the LightHTTPd user, but the installer should ask which user the admin wants to install under while having the LightHTTPd user be prefilled as the default option.

This is important because the web interface executes the pihole command under sudo when the admin is using the interface. The web interface appears broken when it fails to execute the commands because the web user the interface runs under has no sudo access (by default).

Related links:
[Blacklist and Whitelist not working](Broken Web Interface Thread on Pi-Hole Forum)
[](My Bug Report under Github Issues)


Pi-hole does not install under the lighttpd user, the lighttpd user is granted passwordless access to the pihole main script and that script only.

The web interface is not broken by default, as Mcat12 points out it works fine when installed as intended with the lighttpd daemon as the web interface.

This will become moot as we move away from PHP as the web interface and to a self-contained configuration.