Skip to content

Implementing a TorrentBox for file downloading and a Network Attached Storage (NAS) using a Raspberry Pi.

License

Notifications You must be signed in to change notification settings

96francesco/rpi-torrentbox-nas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🍓 Raspberry Pi-based TorrentBox and NAS

A personal project implementing a TorrentBox for file downloading and a Network Attached Storage (NAS) using a Raspberry Pi. The system runs on a Raspberry Pi 4B with an external SSD for primary storage and an external HDD for backups, all connected through a powered USB hub for reliability (big SSDs/HDDs can't be powered by the RPi).

System overview

The system combines several components to create a secure download and storage solution:

  • The download system is built around the Transmission daemon, which handles torrent management through its web interface. This allows convenient remote management of downloads from any device on your network.
  • All download traffic is routed through a VPN connection, with a kill switch mechanism that automatically shuts down Transmission if the VPN fails. This ensures downloads only occur through the encrypted VPN tunnel.
  • For security, the system employs real-time virus scanning using ClamAV. Every downloaded file is automatically scanned, with suspicious files moved to quarantine immediately. The VPN connection is continuously monitored, with automatic shutdown of sensitive services if the connection drops.
  • Storage is handled through both Samba and NFS protocols, allowing flexible access from different devices and operating systems. The system performs daily incremental backups to an external drive, maintaining a log of all backup operations and their status.

Implementation details

Core scripts

  1. VPN check script - monitors the VPN connection and implements the kill switch
  2. Downloads scanner - real-time virus scanning of downloaded files
  3. Backup script - Daily incremental backups of NAS contents

System services

The scripts are managed through systemd services for automated execution. Example service files can be found in the services directory. For example, to create and enable a service:

sudo cp service-file.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable service-file.service
sudo systemctl start service-file.service

About

Implementing a TorrentBox for file downloading and a Network Attached Storage (NAS) using a Raspberry Pi.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages