# How to set up a remote audiobook server

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

[Audiobookshelf](https://www.audiobookshelf.org/) is a feature-rich, open-source solution for managing audiobooks. This platform allows you to have a centralized location for audiobooks and podcasts, enabling convenient access from various devices over the network. Due to its self-hosted nature, the server is accessible only from the [local area network](https://nordvpn.com/blog/what-is-lan/) (LAN). However, you may want to listen to your favorite audiobook while you’re on a commute from work or just taking a stroll around town.

With [Meshnet](https://nordvpn.com/meshnet/), you don’t need to leave your home network vulnerable and mess with difficult configurations to remotely access the server. Simply [enable Meshnet](https://meshnet.nordvpn.com/getting-started/how-to-start-using-meshnet) on your device and the server, and enjoy seamless access to your audiobook collection from anywhere.

This tutorial showcases how you can host an audiobookshelf server using Docker on Windows, macOS, and Linux, and access it remotely over Meshnet.

## Before you begin <a href="#before-you-begin" id="before-you-begin"></a>

To follow this guide, ensure you have [Docker](https://docs.docker.com/get-started/overview/) and [Docker Compose](https://docs.docker.com/compose/) installed on your device. You can find instructions on how to download and install these tools on the Docker website:

* [Docker Desktop instructions for Windows](https://docs.docker.com/desktop/install/windows-install/)
* [Docker Desktop instructions for macOS](https://docs.docker.com/desktop/install/mac-install/)
* [Docker Desktop Instructions for Linux](https://docs.docker.com/desktop/install/linux-install/)
  * [Docker Engine instructions for Linux (CLI only)](https://docs.docker.com/engine/install/)
  * [Docker Compose instructions for Linux (CLI only)](https://docs.docker.com/compose/install/linux/)

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

Docker Compose comes pre-installed with Docker Desktop.
{% endhint %}

## Deploy audiobookshelf using Docker <a href="#deploy-audiobookshelf-using-docker" id="deploy-audiobookshelf-using-docker"></a>

With the prerequisites taken care of, you can begin setting up your audiobookshelf instance. Docker allows you to run the server as a lightweight app on all three desktop platforms.

### Creating a Docker Compose file <a href="#creating-a-docker-compose-file" id="creating-a-docker-compose-file"></a>

First, you need to make a Docker Compose file, which will contain all of the instructions for deploying the audiobookshelf instance.

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

1. Open **PowerShell**.

2. In your preferred directory, create a new `audiobookshelf` folder and navigate to it using the following command:\
   &#x20;

   <pre class="language-bash" data-overflow="wrap"><code class="lang-bash">mkdir audiobookshelf; cd audiobookshelf
   </code></pre>

   &#x20;

3. Create a `docker-compose.yml` file and open it using Notepad by running:\
   &#x20;

   <pre class="language-bash" data-overflow="wrap"><code class="lang-bash">notepad docker-compose.yml
   </code></pre>

   &#x20;\
   When prompted to create the file, click **Yes**.

   <div align="left"><figure><picture><source srcset="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FU3yyw7BXCIPcLBH8D3uu%2Faudio_win_notepad_dark.png?alt=media&#x26;token=cc652deb-a947-4e80-bc45-9ab94ee3bf74" media="(prefers-color-scheme: dark)"><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2F8zDJiWxKzA1yC3RYBICY%2Faudio_win_notepad.png?alt=media&#x26;token=ab5eca0d-77dd-41c1-b1df-1e5e0ff65607" alt="Notepad dialog asking to create a file, with the &#x22;Yes&#x22; button highlighted." width="384"></picture><figcaption></figcaption></figure></div>

   &#x20;

4. In **Notepad**, paste the following instructions for the audiobookshelf Docker container:\
   &#x20;

   <pre class="language-yaml" data-overflow="wrap"><code class="lang-yaml">version: "3.7"
   services:
     audiobookshelf:
       container_name: audiobookshelf
       image: ghcr.io/advplyr/audiobookshelf:latest
       ports:
         - 13378:80
       volumes:
         - .\config:/config
         - .\metadata:/metadata
         - &#x3C;\path\to\audiobooks>:/audiobooks
         - &#x3C;\path\to\podcasts>:/podcasts
   </code></pre>

   &#x20;

5. Replace the placeholders with the paths appropriate for your configuration:
   * Swap `<\path\to\audiobooks>` with the path to your audiobook folder.
   * Swap `<\path\to\podcasts>` with the path to your podcasts folder.\
     &#x20;

     **Example**

     <figure><picture><source srcset="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FiADU06Pq6ESvRPYk1f6t%2Faudio_win_compose_dark.png?alt=media&#x26;token=95761d27-2b4f-41b7-9c78-94fdd122768b" media="(prefers-color-scheme: dark)"><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FvbYfWeu0G91PzAte0FaQ%2Faudio_win_compose.png?alt=media&#x26;token=adf17c42-0b72-4e88-9b41-8182d6992484" alt="Notepad window with two lines highlighted."></picture><figcaption></figcaption></figure>

6. Press **Ctrl** + **S** to save changes.

7. Exit **Notepad**.
   {% endtab %}

{% tab title="macOS and Linux" %}

1. Open **Terminal**.
2. In your preferred directory, create a new `audiobookshelf` folder and navigate to it using the following command:\
   &#x20;

   <pre class="language-bash" data-overflow="wrap"><code class="lang-bash">mkdir audiobookshelf &#x26;&#x26; cd audiobookshelf
   </code></pre>

   &#x20;
3. Create a `docker-compose.yml` file and open it using the Nano text editor by running:\
   &#x20;

   <pre class="language-bash" data-overflow="wrap"><code class="lang-bash">nano docker-compose.yml
   </code></pre>

   &#x20;
4. In the compose file, paste the following instructions for the audiobookshelf Docker container:\
   &#x20;

   <pre class="language-yaml" data-overflow="wrap"><code class="lang-yaml">version: "3.7"
   services:
     audiobookshelf:
       container_name: audiobookshelf
       image: ghcr.io/advplyr/audiobookshelf:latest
       ports:
         - 13378:80
       volumes:
         - ./config:/config
         - ./metadata:/metadata
         - &#x3C;/path/to/audiobooks>:/audiobooks
         - &#x3C;/path/to/podcasts>:/podcasts
   </code></pre>

   &#x20;
5. Replace the placeholders with the paths appropriate for your configuration:
   * Swap `</path/to/audiobooks>` with the path to your audiobook folder.
   * Swap `</path/to/podcasts>` with the path to your podcasts folder.\
     &#x20;\
     **Example**

     <div align="left"><figure><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FL8ZRsRUkMUcoupnUHMD9%2Faudio_linux_compose.png?alt=media&#x26;token=6a1ec3ce-a9ce-4a5a-804d-5a27f1cf4a29" alt="Terminal window with two lines highlighted."><figcaption></figcaption></figure></div>

     &#x20;
6. Press **Ctrl** + **X**, **Y**, and **Enter** to save changes and exit the text editor.
   {% endtab %}
   {% endtabs %}

### Starting the audiobookshelf instance <a href="#starting-the-audiobookshelf-instance" id="starting-the-audiobookshelf-instance"></a>

With the instructions in place, you can deploy the audiobookshelf container by running the following command from the `audiobookshelf` directory:

{% code overflow="wrap" %}

```bash
docker compose up -d
```

{% endcode %}

Docker will [pull the audiobookshelf image](https://docs.docker.com/engine/reference/commandline/pull/) from [Docker Hub](https://hub.docker.com/r/advplyr/audiobookshelf) and deploy the container.

### Verifying the container status

You can run the `docker ps` command to check the status of your container. In the output, under `STATUS`, you should see `Up` and the duration indicating how long the container has been running.

<figure><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FkjfiVFQw1W7tOYcBvC8z%2Faudio_docker_ps.png?alt=media&#x26;token=d80f4c18-3e07-414a-939c-22a2a4cd32ff" alt="Terminal window showing the output of the &#x27;docker ps&#x27; command."><figcaption></figcaption></figure>

## Configure your audiobookshelf <a href="#configure-your-audiobookshelf" id="configure-your-audiobookshelf"></a>

The audiobookshelf server creates a web interface on port `13378`. The interface contains all the settings for managing the server and its properties.

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

To begin personalizing the server, complete the initial setup and create an administrator user account.

1. Open your internet browser.
2. Navigate to the following URL:\
   &#x20;\
   `localhost:13378/`\
   &#x20;
3. Enter your preferred administrator username and password.

   <div align="left"><figure><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2F3m4TitvNDCL7z9u6F7FV%2Faudio_admin_creds.png?alt=media&#x26;token=a54301f8-0cd4-439e-b3fe-5ed0702dcab7" alt="Username and password fields for the root user filled in." width="375"><figcaption></figcaption></figure></div>

   &#x20;
4. Click **Submit**.
5. On the login page, enter the credentials you just created and select **Submit** once more.

   <div align="left"><figure><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FbPaRxyz9lRrCnpw91QII%2Faudio_login_page.png?alt=media&#x26;token=5371e736-e399-4b71-ba1d-c42ae46d62ff" alt="&#x22;Submit&#x22; button highlighted on the Login screen." width="375"><figcaption></figcaption></figure></div>

### Adding audiobook libraries <a href="#adding-audiobook-libraries" id="adding-audiobook-libraries"></a>

Upon logging in, you are taken to the **Libraries** page of your audiobook server. From here, you can add directories containing your audiobook collection.

1. Select **Add your first library**.
2. In the **Library name** field, enter a custom name for the library you are importing.
3. Click **Browse for folder**.&#x20;
4. Choose the `audiobooks` folder, and click **Select folder path**.

   <div align="left"><figure><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FSGBJmtp8IzdY7CxITsUJ%2Faudio_library_path.png?alt=media&#x26;token=68308000-7836-47a3-963c-1f557fd6bf8d" alt="&#x22;audiobooks&#x22; folder and the &#x22;Select folder path&#x22; buttons highlighted."><figcaption></figcaption></figure></div>

   &#x20;
5. Click **Create**.

Under **Libraries**, click the **Scan** button to scan your newly added directory for audiobooks.

<div align="left"><figure><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FahRiF6OQluCTLu60Y5wJ%2Faudio_scan_library.png?alt=media&#x26;token=5ce8d0e3-899f-4924-b82e-184e55e3241c" alt="&#x22;Scan&#x22; button highlighted."><figcaption></figcaption></figure></div>

### Creating additional user accounts <a href="#creating-additional-user-accounts" id="creating-additional-user-accounts"></a>

If you decide to share the audiobook server with your peers, creating new standard user accounts for each user is recommended. This ensures that your administrator account remains secure and that each person can easily keep track of the books they are listening to.

To create a new user account:

1. On your audiobookshelf web interface, from the left side menu, select **Users**.
2. In the upper-right corner, click **Add user**.

   <figure><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FhXOtqeNCymRxG3U7xLIJ%2Faudio_add_user.png?alt=media&#x26;token=f1298e81-62cc-48db-a0cb-625031d875fe" alt="&#x22;Add user&#x22; button highlighted."><figcaption></figcaption></figure>

   &#x20;
3. In the **Username** and **Password** fields, enter the login credentials for the new user account.
4. Under **Permissions**, choose the permissions you want the new account to have.
5. Click **Submit**.

   <div align="left"><figure><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2F9JZqxr1StLVq4xahLit3%2Faudio_new_user_details.png?alt=media&#x26;token=f17e8c76-260b-4c5c-9cd8-bd347adb99ee" alt="&#x22;Submit&#x22; button highlighted."><figcaption></figcaption></figure></div>

The newly added account should now be visible under **Users** and can be used to log in to the server.

<div align="left"><figure><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FwN7jzCQ09akkZywHHQpB%2Faudio_user_list.png?alt=media&#x26;token=9ae02619-684f-44df-baa4-c47c9192bbf1" alt="Table of users with one entry highlighted."><figcaption></figcaption></figure></div>

## Listen to audiobooks over Meshnet <a href="#listen-to-audiobooks-over-meshnet" id="listen-to-audiobooks-over-meshnet"></a>

Now that the server is fully set up, you can start listening to your audiobook collection remotely with the help of Meshnet.

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

If you're hosting Audiobookshelf on a Linux device, you must grant the [local network permission](https://meshnet.nordvpn.com/features/explaining-permissions/local-network-permissions) for the devices accessing it. For more information, see [Common issues on Linux](https://meshnet.nordvpn.com/troubleshooting/linux#cannot-access-docker-containers-over-meshnet).
{% endhint %}

### Method 1: Using a mobile app <a href="#method-1-using-a-mobile-app" id="method-1-using-a-mobile-app"></a>

Audiobookshelf currently has apps available for Android and iOS devices that streamline the user experience. You can find download links for the mobile apps on the [audiobookshelf documentation](https://www.audiobookshelf.org/docs#mobile-apps-install) page.

After installing the mobile app:

1. Copy the server device’s Nord name from the NordVPN app.
2. Launch **audiobookshelf**.
3. Tap **Connect**.

   <div align="left"><figure><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FUZoFkTHrCkIYBAF1jNh3%2Faudio_app_connect.png?alt=media&#x26;token=49a0fa65-b838-46da-9b90-a725dda29e6e" alt="&#x22;Connect&#x22; button highlighted." width="375"><figcaption></figcaption></figure></div>

   &#x20; &#x20;
4. In the **Server address** field, paste the copied Nord name, followed by `:13378`, and tap **Submit**.\
   &#x20;\
   **Example**

   <div align="left"><figure><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FSh0vpzlUnA8Di9vOxl0E%2Faudio_app_url.png?alt=media&#x26;token=3bc99d8f-e925-4824-ad55-3216e8ef9d5f" alt="Server&#x27;s Nord name and port entered and the &#x22;Submit&#x22; button highlighted." width="375"><figcaption></figcaption></figure></div>

   &#x20;
5. Enter your account’s login credentials and tap **Submit**.<br>

   <div align="left"><figure><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2Ft7XxD7ALT0xiav5MJ0C3%2Faudio_app_login.png?alt=media&#x26;token=4a4bc42c-d03a-4f08-9a2d-7d2fa3db775d" alt="Login dialog with entered credentials and the &#x22;Submit&#x22; button highlighted." width="375"><figcaption></figcaption></figure></div>

You should now see your audiobook library in the app. To play an audiobook, select it and tap **Stream**.

### Method 2: Using an internet browser <a href="#method-2-using-an-internet-browser" id="method-2-using-an-internet-browser"></a>

Another method to access the audiobook server is directly from an internet browser. This option is universally applicable to all devices because it doesn’t require installing additional software.

To access the audiobookshelf server:

1. Copy the server device’s Nord name from the NordVPN app.
2. Open your internet browser.
3. In the URL field, paste the copied Nord name, add `:13378/`, and press **Enter**.\
   &#x20;\
   **Example**\
   `secret.meerkat-himalayas.nord:13378/`\
   &#x20;
4. Enter the credentials for your audiobookshelf account and click **Submit**.

   <figure><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2F94K7goQPESYH1EfHemel%2Faudio_web_access.png?alt=media&#x26;token=bf6fb055-39e5-4c62-8d9d-e2a5db6336c7" alt="Login page of the audiobookshelf server open in an internet browser and the &#x22;Submit&#x22; button highlighted."><figcaption></figcaption></figure>

Now you can navigate the server and listen to your audiobook collection from your browser wherever you are.
