HFS on Android - rejetto/hfs GitHub Wiki
First download and install Termux: https://github.com/termux/termux-app/releases
Alright now in Termux install the required packages:
pkg update
pkg install openssl nodejs -y
Run hfs:
stable: npx hfs@latest
beta: npx hfs@beta
to run it in the background:
pkg install tmux
tmux new -s hfs
now run hfs as normal
to exit do ctrl + b and quickly hit D
to re-enter going forward tmux a -t hfs
to stop hfs just type quit
if you wish to remove the session: tmux kill-session -t hfs
Optional: ssh access to termux:
passwd
pkg install openssh -y
sshd -p 2222
on another device:
ssh root@PHONELOCALIP -p 2222
Make sure to enable all files access special privilege to the Termux app! otherwise it will not have access to your files.
To add files from your internal storage use the path /storage/emulated/0 - sdcard path will vary so you must find that yourself.
Now HFS should be serving the page on your phone's local IP Address by default on port 8080
Android wont allow port numbers less than a 1024 without root access! (if you have root then run su or sudo <command> with pkg install tsu -y)