# How to set up HTTP File Server for remote file access

## Introduction <a href="#introduction" id="introduction"></a>

[HTTP File Server](https://github.com/rejetto/hfs) (HFS) is an open-source web server designed for convenient file sharing. It can be used as a more user-friendly alternative to [shared folder](https://meshnet.nordvpn.com/how-to/remote-files-media-access/set-up-folder-sharing) configurations. However, without [port forwarding](https://nordvpn.com/blog/port-forwarding/), the HFS instance is limited only to the [local area network](https://nordvpn.com/blog/what-is-lan/) (LAN).

With the help of [Meshnet](https://nordvpn.com/meshnet/), you can form your own virtual network with devices from different networks all around the globe. This setup allows you to remotely access the HFS instance and share files with others without compromising your home network’s security.

This guide showcases how you can set up HTTP File Server on Windows, macOS, and Linux devices and access the shared files from remote devices over Meshnet.

## Set up HTTP File Server <a href="#set-up-http-file-server" id="set-up-http-file-server"></a>

First, you need to configure the HTTP File Server software on your device.

### Starting HFS <a href="#starting-hfs" id="starting-hfs"></a>

Begin by downloading the latest version of HFS and starting it.

{% tabs %}
{% tab title="Windows" %}

1. Visit the [Releases page](https://github.com/rejetto/hfs/releases) of the HFS GitHub repository.
2. Download the latest archive for Windows and extract its contents to a dedicated folder.
3. Launch the **hfs** executable file.

   <figure><picture><source srcset="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FinaXqzwkd3YdrxdrjksC%2Fhfs_win_exe_dark.png?alt=media&#x26;token=b2e1f499-1902-481c-bab3-dda2622630a2" media="(prefers-color-scheme: dark)"><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FL1BkkLaGTcUz2bmGfpNo%2Fhfs_win_exe.png?alt=media&#x26;token=2358c612-c0bc-4687-b82c-75992521150d" alt="HFS executable file selected in File explorer."></picture><figcaption></figcaption></figure>

   &#x20;\
   If the Microsoft Defender SmartScreen window shows up, select **More info** and click **Run anyway**.

The executable will open a PowerShell window displaying information about your HFS instance and network interfaces.

<div align="left"><figure><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2F8XKG75Tvr3jsiB8R8p7L%2Fhfs_win_init.png?alt=media&#x26;token=82f66a58-2c7f-48e1-8909-f06d769662d1" alt="Windows PowerShell window displaying information about the HFS configuration."><figcaption></figcaption></figure></div>

Once the server is started, the HFS admin panel should open in your default internet browser.

<figure><picture><source srcset="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2F7eEd44SgsXjPjYoAtzWN%2Fhfs_web_main_dark.png?alt=media&#x26;token=9f2f13ce-700d-4020-97aa-5626a055519b" media="(prefers-color-scheme: dark)"><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FJFFcLssgA8sAYx4j3qhZ%2Fhfs_web_main.png?alt=media&#x26;token=c71de97f-c083-4040-8cfa-507f84bac6d8" alt="&#x22;Home&#x22; page of the HFS web interface."></picture><figcaption></figcaption></figure>

{% hint style="info" %}
**Note**

If the **Windows security alert** box appears, select both the *private* and *public* networks options, and then click **Allow access** to allow connections through the firewall.\
![](https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FudFwQ2enhGMoWkkyoRCh%2Fhfs_win_fw_exception.png?alt=media\&token=11ad8ec7-645d-460e-a357-6358827cb183)
{% endhint %}
{% endtab %}

{% tab title="macOS" %}

1. Visit the [Releases page](https://github.com/rejetto/hfs/releases) of the HFS GitHub repository.
2. Download the archive for your macOS architecture.
   * If you are using an Intel Mac, choose the `hfs-mac.zip` archive.
   * If you are using an Apple silicon Mac, choose the `hfs-mac-arm.zip` archive.
3. Extract the downloaded archive to a dedicated folder.
4. Open the HFS folder and launch the **hfs** executable file.

   <figure><picture><source srcset="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FSNLhIXVKwtj5Cm35I8MQ%2Fhfs_mac_launch_dark.png?alt=media&#x26;token=87906967-2b21-494a-8920-c6453deb6db5" media="(prefers-color-scheme: dark)"><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FNDk1uMK7a0eWtw11LOjO%2Fhfs_mac_launch.png?alt=media&#x26;token=aa5144b8-799a-4cbc-8928-46be6f9a55a7" alt="HFS executable file selected in Finder."></picture><figcaption></figcaption></figure>

The executable will open a terminal window displaying information about your HFS instance and network interfaces.

<div align="left"><figure><picture><source srcset="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FpxBaYEjs4Z0K6nqcHyY1%2Fhfs_mac_init_dark.png?alt=media&#x26;token=e9dd6364-b931-4336-aab4-cd646d165612" media="(prefers-color-scheme: dark)"><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FOcM1O9l3iGeozF9mrmUz%2Fmfs_mac_init.png?alt=media&#x26;token=0fd60d5f-c024-46ef-aa7c-ecf3dfdeb4fd" alt="Terminal window displaying information about the HFS configuration."></picture><figcaption></figcaption></figure></div>

Once the server is started, the HFS admin panel should open in your default internet browser.

<figure><picture><source srcset="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2F7eEd44SgsXjPjYoAtzWN%2Fhfs_web_main_dark.png?alt=media&#x26;token=9f2f13ce-700d-4020-97aa-5626a055519b" media="(prefers-color-scheme: dark)"><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FJFFcLssgA8sAYx4j3qhZ%2Fhfs_web_main.png?alt=media&#x26;token=c71de97f-c083-4040-8cfa-507f84bac6d8" alt="&#x22;Home&#x22; page of the HFS web interface."></picture><figcaption></figcaption></figure>

{% hint style="info" %}
**Note**

When trying to launch HFS, you may receive an error message indicating that the developer cannot be identified. To proceed with the installation, open **System settings** > **Privacy & security**, scroll down and click **Open anyway**.

<picture><source srcset="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FFdgFMEw8xZngkdlc9pfF%2Fhfs_mac_confirm_dark.png?alt=media&#x26;token=2d5f6de6-7a6d-4c70-ab6b-78044af7bc33" media="(prefers-color-scheme: dark)"><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FIN8Q3YiuKiMbFbckrU78%2Fhfs_mac_confirm.png?alt=media&#x26;token=993fe4fc-088d-4153-b7d6-88f82703c92f" alt="Clicking &#x27;Open anyway&#x27; in macOS system settings." data-size="original"></picture>
{% endhint %}
{% endtab %}

{% tab title="Linux" %}

1. Visit the [Releases page](https://github.com/rejetto/hfs/releases) of the HFS GitHub repository.
2. Download the archive for Linux and extract its contents to a dedicated folder.
3. Open the HFS folder, right-click anywhere inside, and select **Open in terminal**.

   <div align="left"><figure><picture><source srcset="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FZOET3VNTdeUUbGYT6zRR%2Fhfs_linux_open_dark.png?alt=media&#x26;token=930635d6-dc0c-47ef-b611-722374fe2de7" media="(prefers-color-scheme: dark)"><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FspUNTFg9KBftObPRAqgE%2Fhfs_linux_open.png?alt=media&#x26;token=b8fb0b2a-e7fc-41ee-9f20-486552f58d55" alt="Selecting &#x27;Open in Terminal&#x27; from the Ubuntu context menu."></picture><figcaption></figcaption></figure></div>

   &#x20;
4. In the terminal, run the following command to start HFS:\
   &#x20;

   <pre class="language-bash" data-overflow="wrap"><code class="lang-bash">sudo ./hfs
   </code></pre>

   &#x20;\
   The terminal window will display information about your HFS instance and network interfaces.

   <div align="left"><figure><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2Fq4xkNmnhnTXPVrvG96bx%2Fhfs_linux_init.png?alt=media&#x26;token=0cff9c31-d311-44a5-9edf-c2d970bdb74a" alt="Terminal window displaying information about the HFS configuration."><figcaption></figcaption></figure></div>

   &#x20;
5. Open your internet browser and navigate to the following URL to access the HFS admin panel:\
   &#x20;\
   `localhost/~/admin/`\
   &#x20;

   <figure><picture><source srcset="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2F7eEd44SgsXjPjYoAtzWN%2Fhfs_web_main_dark.png?alt=media&#x26;token=9f2f13ce-700d-4020-97aa-5626a055519b" media="(prefers-color-scheme: dark)"><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FJFFcLssgA8sAYx4j3qhZ%2Fhfs_web_main.png?alt=media&#x26;token=c71de97f-c083-4040-8cfa-507f84bac6d8" alt="&#x22;Home&#x22; page of the HFS web interface."></picture><figcaption></figcaption></figure>

{% endtab %}
{% endtabs %}

### Creating a new administrator account <a href="#creating-a-new-administrator-account" id="creating-a-new-administrator-account"></a>

When the server is active, it is recommended to create a dedicated administrator account. This way, you can manage your server’s settings from other devices. The default configuration allows administrator access only from the same device.

1. On the HFS admin panel, click the **Accounts** option on the left.
2. Select **Add** > **User**.
3. Fill in your preferred username and password and turn on the **Admin-panel access** toggle.

   <div align="left"><figure><picture><source srcset="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FseWg0ZCNGbISOh9ED4T1%2Fhfs_web_create_acc_dark.png?alt=media&#x26;token=97756421-46bd-45c6-a01c-9f096f0c071d" media="(prefers-color-scheme: dark)"><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2Fqk3slRdU9YGDcvkXnW3j%2Fhfs_web_create_acc.png?alt=media&#x26;token=e276a3e6-7646-4998-af26-ad46b033c383" alt="Entering the administrator account credentials with the &#x27;Permission to access admin-panel&#x27; toggle enabled." width="563"></picture><figcaption></figcaption></figure></div>

   &#x20;
4. Click **Save**.

Your newly created user entry should be visible on the **Accounts** page.

### Adding shared files <a href="#adding-shared-files" id="adding-shared-files"></a>

After securing administrator access, you can import files you want to share with your Meshnet peers.

1. On the HFS admin panel, select the **Shared files** section.
2. In the lower-right corner, click **Add** > **From disk**.
3. Choose the files or folders you want to be shared on your HFS web interface and click **Select**.

   <div align="left"><figure><picture><source srcset="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FG8gM7hL3zJcdcfKGqgP9%2Fhfs_web_select_dark.png?alt=media&#x26;token=ad9d3291-e7e0-43b0-beb2-1fdae2a0872c" media="(prefers-color-scheme: dark)"><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FUPVrkeMtSZ7sOO5NdsPb%2Fhfs_web_select.png?alt=media&#x26;token=087f6725-ad2c-4414-902b-95133ab0e425" alt="Selecting folders to be shared on the server." width="375"></picture><figcaption></figcaption></figure></div>

The selected files should now appear on the **Shared files** page under **Virtual file system**.

<div align="left"><figure><picture><source srcset="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FJT2dLGHYTlltMXDL2x4W%2Fhfs_web_shared_dark.png?alt=media&#x26;token=f8f58f3a-db8d-45cb-bb6a-26459ee5e6c7" media="(prefers-color-scheme: dark)"><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FFVONYwAwGUIXJM8pz5HB%2Fhfs_web_shared.png?alt=media&#x26;token=a68178c8-3dc0-48aa-b3ea-ecbcf6d7c156" alt="Shared files page showing the imported files for sharing." width="563"></picture><figcaption></figcaption></figure></div>

## Remotely download your files over Meshnet <a href="#remotely-download-your-files-over-meshnet" id="remotely-download-your-files-over-meshnet"></a>

After setting up the server, you can use its functionality remotely over Meshnet. The shared files can be seen on the HFS front-end page.

### Accessing HFS from remote devices <a href="#accessing-hfs-from-remote-devices" id="accessing-hfs-from-remote-devices"></a>

To access the HFS front-end page from remote devices in your Meshnet:

1. Copy the Nord name of the device running HFS from the NordVPN app.
2. Open your internet browser.
3. Paste the copied Nord name followed by a slash (/) to the URL field and press **Enter**.\
   &#x20;\
   **Example**\
   `secret.meerkat-andes.nord/`

The HFS front-end page should load, showcasing all of the files that are being shared from the server.

<div align="left"><figure><picture><source srcset="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FxwYev38aTDIuyRJumPMo%2Fhfs_meshnet_access_dark.png?alt=media&#x26;token=d0666347-1967-466b-905b-588c2b45cdca" media="(prefers-color-scheme: dark)"><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FbjGiOFsXWEGNI0NeAQXv%2Fhfs_meshnet_access.png?alt=media&#x26;token=66a564e8-ccd8-4c40-9a4e-ba70cc2151f4" alt="HFS front-end website accessed using the Nord name."></picture><figcaption></figcaption></figure></div>

{% hint style="success" %}
**Tip**

To access the admin panel from a remote device, click **Login** in the upper-right corner and enter your administrator account credentials. Upon logging in, click **Options** > **Admin-panel**.
{% endhint %}

### Downloading files <a href="#downloading-files" id="downloading-files"></a>

Once you have accessed the HFS front-end page, you can download your preferred files. You can choose to download individual files and folders or group multiple items into a single download.

#### Downloading individual items <a href="#downloading-individual-items" id="downloading-individual-items"></a>

1. Hover your mouse over the name of the item you want to download.
2. If it is a single file, click its name. If it’s a folder — click the **Menu** button next to its name.
3. Click **Download** to start downloading the item.

   <div align="left"><figure><picture><source srcset="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2F7UDlsSUeJ6aPbUTlvESo%2Fhfs_web_dl_single_dark.png?alt=media&#x26;token=032bd784-28f4-4d37-a5da-04f596adda86" media="(prefers-color-scheme: dark)"><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FXWNxL2A7KmYBiyHpmEjP%2Fhfs_web_dl_single.png?alt=media&#x26;token=b7266a6e-772e-4f1f-bcb0-68473de47e2c" alt="Clicking &#x27;Download&#x27; in the Folder menu dialog." width="375"></picture><figcaption></figcaption></figure></div>

#### Downloading grouped items <a href="#downloading-grouped-items" id="downloading-grouped-items"></a>

1. Click the **Select** button at the top of the page.
2. Select the checkboxes next to the items you want to download.
3. In the upper-right corner, click **ZIP** to start the download.

   <figure><picture><source srcset="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FQknReKcRxaRO6xT3WjiV%2Fhfs_web_zip_dark.png?alt=media&#x26;token=b33f0764-fa7c-435c-93fc-fe9817eed2ad" media="(prefers-color-scheme: dark)"><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FJhpO2DMAqJXUUMglwQGn%2Fhfs_web_zip.png?alt=media&#x26;token=15f8af34-daa2-485b-9899-ba980eb0fcb0" alt="Clicking &#x27;ZIP&#x27; to download selected files."></picture><figcaption></figcaption></figure>

Now you can conveniently share files between remote computers and mobile devices using the HFS web interface over Meshnet.
