Skip to content

Thilas/nas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Synology NAS Configuration

This repository contains a bunch of scripts to help configure, maintain and operate a Synology NAS (DS218+ in my case).

Features

  • Provide .bashrc and .profile configuration
  • Install Entware-ng, a software repository for network attached storages, routers and other embedded devices
  • Install fish, a smart and user-friendly command line shell
  • Change some permissions
    • Allow to use SSH keys
  • Change default OpenSSH server configuration
    • Deny root and admin login
    • Allow TCP forwarding
  • Install Heimdall (docker, service), an application dashboard and launcher
  • Install Portainer (docker, service), a lightweight management UI which allows to easily manage your different Docker environments
  • Install SSLH (docker, service), an applicative protocol multiplexer
  • Install Wireguard (docker), an extremely simple yet fast and modern VPN
  • Install Plex (docker, service, web), brings together all the media that matters to you
  • Install Plex Webhook for BetaSeries (docker, service), a Plex webhook to mark series and movies as watched on BetaSeries
  • Install Tautulli (docker, service), a Python based monitoring and tracking tool for Plex Media Server
  • Install Medusa (docker, service), an automatic video library manager for TV shows
  • Install Radarr (docker, service), a fork of Sonarr to work with movies à la CouchPotato
  • Install Bazarr (docker, service), a companion application to Sonarr and Radarr that manages and downloads subtitles
  • Install Komga (docker, service), a media server for comics/mangas/BDs with API and OPDS support

Scripts

build-wireguard

build-wireguard aims at building a valid SPK package that provides an up-to-date wireguard module to the nas. Complete instructions: Wireguard SPK for your Synology NAS.

configure

Each docker directory (~/docker and ~/media) has a configure script that allows to configure the related docker-compose.yml file. It must be run once before starting the containers. They can be started using nas script (see below) or docker-upgrade [docker|media]

fix-plex-transcoder

fix-plex-transcoder grants the required rights on /dev/dri for Plex Hardware-Accelerated Streaming feature to work correctly.

This script must be triggered from DSM Task Scheduler on boot-up using the root account in order to restore the permissions after a reboot.

fix-srt

fix-srt allows to fix .srt subtitle files so they work correctly with Plex. Basically, it ensures that all files end with at least 2 empty lines.

nas

nas installs/upgrades/fixes/starts all features mentioned above. Logs are available in ~/.log/nas.log.

tvshows

tvshows allows to download automatically new tv shows from a remote server, fix their permissions (using sudo) and send them to Medusa's post-processing. Configuration is located in ~/.tvshows. Logs are available in ~/.log/tvshows.log.

tvshows automatically impersonates the user configured for media services so the script can be run from root as well as from the configured user. It allows to easily schedule tvshows.

Media

By default, all media services (Plex, Plex Webhook for BetaSeries, Tautulli, Medusa, Radarr, Bazarr and Komga) use the following locations:

  • ~/.docker: contains the configuration of each service
  • /volume1/media: contains all media files (i.e. books, comics, movies, music, tvshows)

This media directory is customizable (thanks to the configure script) but it must be created using DSM before configuring docker containers. All required subdirectories will then be created automatically, as well as downloads/movies and downloads/tvshows subdirectories.

Resources