FYI you can't do this on phones with locked bootloaders as well as the author did. you could use termux but if termux runs on anything lower than android 8 termux will be significantly limited and you will need postmarketos and maybe fix support for it. with termux, at best things will be slow without root, as the author mentioned rooting resulted in a speed increase.
without root, you also can't bind to ports on any android phone, and rooting often requires an unlocked bootloader and not all android phones support bootloader unlocking. You also need an unlocked bootloader to install postmarket os.
so without binding to ports you can't run a web server unless you run it through a proxy server which the author did, or containers at native speed on postmarket os because you will not be able to flash the phone with postmarket os if you have missing kernel syscalls on android nor root the phone for the speed increase on android depending on your android kernel version i assume.
so with android containers may or may not work without emulating x86, and without root chances are it will be slow specially if you are forced to emulate it as x86 because it turns out you have missing syscalls, nor root to make them faster if they exist on android. again no chances to install postmarket os nor rooting to make containers faster, without bootloader unlocking.
Postmarket os is required if your device runs android 7 or below due to termux limitations which prevent you from installing packages, or if your android version has missing kernel syscalls that prevent you from running containers without x86 emulation which is slow.
Rooting is required to install postmarketos, and making termux faster and bind to ports on Android. You don't need postmarketos if your android version can run containers on termux with all the required kernel syscalls
To root or install postmarketos you need an unlocked bootloader.
If you're hosting behind a NAT device, you can just map external port 80/443 to internal port whatever. You can bind any port 1024 or higher.
Termux is only slower without root if you use proot. PRoot provides a limited implementation of chroot that runs unprivileged in userspace, but this also causes it to be pretty slow. If the server software you want to run is available in the Termux repos, you can use that and have it run at full-speed.
Termux works by patching all programs to treat /data/data/com.termux/files/usr as the root directory and /data/data/com.termux/files/home as the home directory. This introduces some compatibility issues, but it doesn't make it any slower.
without root, you also can't bind to ports on any android phone, and rooting often requires an unlocked bootloader and not all android phones support bootloader unlocking. You also need an unlocked bootloader to install postmarket os.
so without binding to ports you can't run a web server unless you run it through a proxy server which the author did, or containers at native speed on postmarket os because you will not be able to flash the phone with postmarket os if you have missing kernel syscalls on android nor root the phone for the speed increase on android depending on your android kernel version i assume.
so with android containers may or may not work without emulating x86, and without root chances are it will be slow specially if you are forced to emulate it as x86 because it turns out you have missing syscalls, nor root to make them faster if they exist on android. again no chances to install postmarket os nor rooting to make containers faster, without bootloader unlocking.
not all android phones can have their bootloaders unlocked unless you find an exploit. https://github.com/zenfyrdev/bootloader-unlock-wall-of-shame