/dockserv

A centralized place to define, manage, and orchestrate home server applications behind a reverse proxy.

Primary LanguageShellMIT LicenseMIT


DockServ Logo

DockServ

A centralized place to define, manage, and orchestrate home server applications behind a reverse proxy.

Explore the docs »


Table of Contents

Show/Hide
  1. About The Project
  2. Getting Started
  3. Adding Content to Plex from a Network Share
  4. License

About the Project

DockServ is a stack of containerized open-source web applications served behind a reverse proxy service.

This project was heavily influenced by this tutorial and this project.

Built With

  • Docker - Engine for building/containerizing applications.
  • Traefik Proxy - Edge Router that makes publishing your services a fun and easy experience.

Getting Started

These instructions will walk you through the process of setting up this project on a live system. The following assumes that you have direct (keyboard/monitor) or indirect (ssh) access to the live system you're deploying to.

Prerequisites

  • A live system running a linux distribution (like Ubuntu Server)
  • A router configured to forward ports :80, :443, and :32400 of the live system
  • A web domain provided by Cloudflare
  • Docker
  • Git

Installation

  1. Clone the project and change into the project directory.

    git clone git@github.com:sonofborge/dockserv.git && cd dockserv
  2. Create a new .env file and edit the environment variable values to suit your configuration.

    cp .env{.dist,}
  3. Run the setup scripts and follow the on-screen instructions.

    bash scripts/setup-cloudflare.sh
    bash scripts/setup-authelia.sh
    bash scripts/setup-redis.sh
    bash scripts/setup-postgres.sh
  4. Spin up some or all of your server applications with docker compose.

    # Example: specific individual applications
    docker compose up socket_proxy -d
    docker compose up traefik
    # Example: all applications
    docker compose up -d
  5. If you're logging into Authelia for the first time, you'll need to setup totp. After you've added your credentials, click on "Not registered yet?" and follow the instructions to register another device for authorization. The email it sends can be found in appdata/authelia/notification.txt.

Adding Content to Plex from a Network Share

Assuming you are using Network Attached Storage (NAS) to house the content you want Plex to serve, you will need to make some additional changes to the host in order to share that content with the Plex shared volume.

On the NAS

Enable Network File System (NFS).

On the DockServ Host

  1. Ensure that the nfs-common library is installed.

    sudo apt update && sudo apt install nfs-common
  2. Edit /etc/fstab and tell it where it can find the network shared folders. Add the following line, substituting the NAS local IP and the name of the shared files:

    ...
    192.168.1.<XXX>:</path/to/share_name> /media/nas/<share_name> nfs auto,defaults,nofail 0 0

    Add as many shares as you want Plex to have access to, save, and exit.

  3. Make the <share_name> folder.

    sudo mkdir -p /media/nas/<share_name>
  4. Finally, mount the drives.

    sudo mount -a

The media should now be shared with the docker volume and available on the host at /media/nas.

License

This project is licensed under the MIT License - see the LICENSE file for details.