Running HFS HTTP File Server on Ubuntu 22.04: Non‑Daemon and Daemon Setup
This guide walks through installing HFS on Ubuntu 22.04, creating a shared HTTP directory, configuring the server both as a regular process and as a systemd daemon, and accessing the shared folder via a web browser.
HFS is a lightweight HTTP service tool; versions before 3.0 provide a Windows installer, while version 3.0 and later offer Linux and macOS packages. It is well‑suited for LAN file sharing or hosting package repositories.
Running HFS without daemon (Ubuntu 22.04)
1: Create the HTTP root directory: mkdir -vp /home/budgie/mirrorsHTTP 2: Extract the hfs-linux.zip package to a custom directory /usr/bin/hfsFolder.
3: Create a symbolic link for the binary: ln -s /usr/bin/hfsFolder/hfs /usr/bin/ 4: Run hfs, stay in the session, then type help and config port 8011.
5: Open http://localhost:8090/~/admin/ in a browser and add the shared folder path /home/budgie/mirrorsHTTP.
6: View the current configuration file at $HOME/.hfs/config.yaml.
7: Access http://192.168.136.136:8090/ in a browser to see the shared folder.
Running HFS as a daemon (Ubuntu 22.04)
1: Create the HTTP root directory: mkdir -vp /home/budgie/mirrorsHTTP 2: Extract the hfs-linux.zip package to /usr/bin/hfsFolder.
3: Create the same symbolic link for the binary as above.
4: Run hfs, stay in the session, then type help and config port 8011.
5: Add the shared folder via http://localhost:8090/~/admin/ (same path as before).
6: View the configuration file at $HOME/.hfs/config.yaml.
7: Extract the Node.js binary package to /usr/bin/hfsFolder/:
tar -xf /home/budgie/Downloads/node-v20.9.0-linux-x64.tar.xz -C /usr/bin/hfsFolder/8: Symlink node and npm to /usr/bin/:
ln -s /usr/bin/hfsFolder/node-v20.9.0-linux-x64/bin/node /usr/bin/ln -s /usr/bin/hfsFolder/node-v20.9.0-linux-x64/bin/npm /usr/bin/9: Verify versions with node --version (ensure global commands are available, otherwise expose them via /etc/profile).
10: Run
/usr/bin/hfsFolder/node-v20.9.0-linux-x64/bin/npx -y hfs@latestto check for errors.
11: Create a systemd service file /etc/systemd/system/hfs.service (see image).
12: Reload systemd, enable and start the service:
systemctl daemon-reload && systemctl enable hfs && systemctl start hfs && systemctl status hfs13: Open http://192.168.136.136:8090/ in a browser to see the shared folder.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
