PortaDisk - Affordable Raspberry Pi Portable & Secure NAS Project
Project Status: Early work in progress. web-unlock is still not ready for production (nor development) use.
Yet another Raspberry Pi project, a concept for now (until I get all the needed parts). This repository mainly focuses on the software side.
My personal feature wishlist
- Raspberry Pi Zero running Seafile on Docker.
- Data & backup drive unlocking through a web browser. (working on implementation)
- Disk and RAM usage reported using Blinkt. (to implement)
- A separate WiFi network for access outside your home, without proxy services. (RaspAP?)
- Highest data security with LUKS encryption on the data drive.
- Weekly backups of both the data drive and root partition to a separate hard drive.
- All of this in a small package that can be carried in a backpack.
PRs are welcome.
Directory structure (Software)
Root directory
/portadisk/config/
- stores configuration files, mainly for web-unlock.
Data drive
/portadisk/software/
- stores data and configuration files for Seafile and other software that might store sensitive data or isn't needed during the "encrypted" phase (i.e. when the drives weren't unlocked yet)
Hardware
- Raspberry Pi Zero with a USB hub HAT.
- Another USB hub that has support for external power.
- Pi & the 2 hard drives connected to the second USB hub, which is connected to the HAT, which is connected to the Pi (hopefully this will work)
- Pi, USB hub, hard drives and a power supply crammed into a camera case
Concept security considerations
- Modification of the
web-unlock
binary to intercept the password during unlocking might be possible - HTTPS encryption should be a must when dealing with projects like this (caddy?)
Installation guide
This guide assumes you have a fresh Raspbian Lite installation already set up with updates installed.
Zram (compresses RAM)
sudo apt install git
git clone https://github.com/foundObjects/zram-swap.git
cd zram-swap && sudo ./install.sh --install
sudo apt purge git
Misc SD card lifespan tweaks
sudo apt-get remove dphys-swapfile
echo "tmpfs /var/tmp tmpfs nodev,nosuid,size=35M 0 0" >> /etc/fstab
echo "tmpfs /tmp tmpfs nodev,nosuid,size=35M 0 0" >> /etc/fstab
Docker
curl -sSL https://get.docker.com | sh
sudo apt-get install -y python3 python3-pip libffi-dev libssl-dev python3-dev
sudo pip3 install docker-compose
sudo systemctl enable docker --now
Seafile
- Adjust the values in
software/seafile/docker-compose.yml
to your liking. - Run
docker-compose up