Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.
/ PortaDisk Public archive

[WIP] Cheap, portable and secure NAS based on the Raspberry Pi Zero - with encryption, backups, and more

Notifications You must be signed in to change notification settings

mrrfv/PortaDisk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Stalled

This project has been stalled for now. The Raspberry Pi Zero is way too underpowered for even encrypting data, and connecting multiple hard drives through USB is usually a bad idea due to the worse performance and reliability. I might look into hosting Syncthing in the future though, as it's very lightweight and (from my understanding) if a password is set, encrypts data before it is even sent to the Pi.


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.

Concept

My personal feature wishlist

  • Raspberry Pi Zero (or an x86 machine) 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?)
  • 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.

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?)
  • web-unlock could be added to initramfs so that the root drive is also encrypted.

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)

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

  1. Adjust the values in software/seafile/docker-compose.yml to your liking.
  2. Run docker-compose up

About

[WIP] Cheap, portable and secure NAS based on the Raspberry Pi Zero - with encryption, backups, and more

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published