From bc3f4e359107e682c7a5d0b5a659df1f867ffac1 Mon Sep 17 00:00:00 2001 From: Alexandre CATTEAU Date: Fri, 16 Sep 2022 13:57:20 +0200 Subject: [PATCH] First step for big review --- README.md | 22 ++++++++++------------ setup.sh | 3 --- srv-nas.mount | 10 ---------- variables.conf.template | 5 +++-- 4 files changed, 13 insertions(+), 27 deletions(-) delete mode 100644 srv-nas.mount diff --git a/README.md b/README.md index 9499111..18f0270 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,24 @@ # NAS Server -This repository contains files used to set up our NAS server on a freshly installed Armbian. Target is Bullseye. +This repository contains files used to set up our NAS server on Debian. Target is Bullseye. ### Introduction -The SBC used has a hard drive attached (SATA), which is the storage drive. This disk should be encrypted if needed. +The idea is to provide the following features, chosen at install: +* a web interface for file management with [filebrowser](https://github.com/filebrowser/filebrowser) +* a DLNA server with MiniDLNA +* a BitTorrent client with Transmission, which comes with a server web interface +* an VPN client with OpenVPN +* a FTP server with vsftpd -An FTP server is installed on the device, providing network access to authorized people. - -### Setup -##### Installation -* `setup.sh` is a script automating the installation and configuration of required software. -* `variables.conf.template` contains examples variables definitions, and should be copied locally to `variables.conf` - (with any required modifications). -* `srv-nas.mount` is a systemd unit which, when started, will try to mount DATA drive. -##### DL server +### Files * `transmission-daemon.service` is a replacement for default Transmission service file, with more settings. * `transmission-vpn.sh` is a script which checks if a VPN connection is active and stops Transmission otherwise. * `transmission-vpn.service` is a service unit for above script. * `transmission-vpn.timer` is a timer which runs regularly above script. * `variables.conf.template` contains examples variables definitions, and should be copied locally to `variables.conf` (with any required modifications). +##### Installation * `install.sh` script copies Systemd units to their destination, with correct values. ### TODO -* Add TLS cert generation to DL setup +* RAS diff --git a/setup.sh b/setup.sh index 60d2693..81dd16a 100644 --- a/setup.sh +++ b/setup.sh @@ -81,9 +81,6 @@ set_vsftpd() { echo "nascrypt /dev/sda none noauto" >> /etc/crypttab sed -i -e "s/#write_enable=YES/write_enable=YES/g" /etc/vsftpd.conf sed -i -e "s/#utf8_filesystem=YES/utf8_filesystem=YES/g" /etc/vsftpd.conf - # The two lines below set up TLS wrapping with a self-signed certificate, which causes issues with clients - #sed -i -e "s/ssl_enable=NO/ssl_enable=YES/g" /etc/vsftpd.conf - #openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout /etc/ssl/private/ssl-cert-snakeoil.key -out /etc/ssl/certs/ssl-cert-snakeoil.pem -subj "/C=/ST=/L=/O=/OU=/CN=" } # Only run if the user is root diff --git a/srv-nas.mount b/srv-nas.mount deleted file mode 100644 index 3662bef..0000000 --- a/srv-nas.mount +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Mount NAS Volume -# Below Requisite could be a Wants -Wants=systemd-cryptsetup@nascrypt.service -After=systemd-cryptsetup@nascrypt.service - -[Mount] -What=/dev/mapper/nascrypt -Where=/srv/nas -Options=rw,relatime diff --git a/variables.conf.template b/variables.conf.template index bbc3e48..20f93be 100644 --- a/variables.conf.template +++ b/variables.conf.template @@ -2,6 +2,7 @@ # Copy this file as variables.conf, with the correct values -dl_server="no" +filebrowser="yes" +dlna_server="yes" +dl_server="yes" ftp_server="no" -upnp_server="no"