Simple root, with a custom degoogled rom, and termux is all you need.
You don't need root if you webserver is listening on a port over 1024.
Termux plus some webserver like nginx is all you need.
Now to make it reboot resistant is another story.
Simple root, with a custom degoogled rom, and termux is all you need.