Skip to content

JesusC0der/Raspi-Drive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raspi Drive – Version 2.0

A semi-automated project to convert a Raspberry Pi into a NAS server (DIY Cloud Storage Solution).

Contents

Screenshots

Requirements

A Raspberry Pi that has wireless support (could be any version as long as you have a wifi adapter).

A micro sd card (class 10 recomended).

Either a USB stick or a USB hard drive.

Setup USB Drive or USB Stick

  1. Plug the hard drive or USB stick into your computer.
  2. Open Disk Utility if you are using a mac computer or Windows Explorer if your are using a Windows computer.
  3. For Windows users right click on the drive and click format.
  4. For Mac users select the drive then click erase.
  5. When you get to the format/erase page format the drive to be ExFat then click Erase/Start.
  6. Let it load until it says complete then make sure its formated in ExFat.
  7. Eject the drive from your computer.

Newer Method – Version 2.0 Installation Image

To reduce the ammount of work involved with implementing this project, I have created an installation image that automates the process of installing this to a Raspberry Pi.

  1. Download the latest release of Raspi Drive here.
  2. Decompress the image and flash it to a micro SD card (with at least 8GB of available space) with your favorite flashing utility.
  3. Connect your drive through USB.
  4. Power on your Raspberry Pi, wait 30 secconds to a minute, and then connect to the wifi network named "raspidrive-config."
  5. Visit the setup website at 192.168.88.1:8888, select your WiFi network, input the wifi's password, and then click "submit."
  6. After clicking "submit," wait for the connection to the configuation network to drop; this signals the Pi has succesfully connected to WiFi (if the config network reappears, repeat steps 3-5. You're done! Proceed with conencting the Pi to your computer using the below steps. Note: This is the fastest way to get Raspi Drive on your Raspberry Pi.

Older method – Setting up with Installer Script

  1. Download Raspberry Pi OS Lite. Grab the latest version from here.
  2. Unzip the downloaded file.
  3. Flash the unzipped image using Etcher.
  4. Remount the micro sd card (unplug and replug micro sd card from computer).
  5. Open Terminal or Command Prompt and run the following command (enables ssh on the pi):
touch /Volumes/boot/ssh
  1. Next, set up wifi. Download this file named wpa_supplicant.conf.
  2. Now open up the file you downloaded and change the SSID to your network's name and the psk to your network's password.
  3. Copy the file you just edited and paste it to the boot partition of your micro sd card.
  4. Unplug the micro sd card from your computer and insert it in your pi.
  5. SSH to your pi (more information on how to do so here).
  6. Plug the drive you formated in to your pi.
  7. Initiate the Raspi Drive installation script by running the following command on your Pi:
wget -q https://git.io/JewLJ -O /tmp/raspi-drive && bash /tmp/raspi-drive
  1. Mount your external drive by entering: sudo mount /dev/sda2 /mnt/drive
  2. Reboot your pi with sudo reboot

Note: If you get an error when mounting the drive about there not being a directory at /dev/sda2 then run sudo lsblk -o UUID,NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL,MODELand look under sda for the sda partition that is bigger in size and copy it. (example: sda2) then in step 2 replace /dev/sda2 with the sda partition that you copied.

Manual Installation

If you would like to manually install this then you can follow these instructions.

  1. Run steps 1-10 above.
  2. Update your packages with sudo apt update
  3. Upgrade your system with sudo apt upgrade -y
  4. Install the following dependencies: sudo apt install exfat-fuse exfat-utils perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
  5. Download and install Webmin with: wget https://prdownloads.sourceforge.net/webadmin/webmin_1.930_all.deb && sudo dpkg --install webmin_1.930_all.deb
  6. Create the external hard drive's mount directory with sudo mkdir /mnt/drive
  7. Mount your hard drive to the mount directory with sudo mount /dev/sda2 /mnt/drive
  8. Reboot your pi with sudo reboot

Note: This is everything the Installer Script does but just faster.

Connect to Raspi Drive with a Mac

  1. Find out what your Raspberry Pi's IP Address is with hostname -I (The real IP Address is the first one that it shows)
  2. Download Fuse and SSHFS on your Mac.
  3. Run both installation packages and follow the onscreen instructions.
  4. Make a folder named Drive on your desktop.
  5. In Terminal run sshfs pi@Your-IP-Address:/mnt/drive /Drive Folder (Replace Your IP Address with your IP Address and /Drive Folder with the path to the folder you created in step 4).
  6. Put in the pi's password (The default is raspberry).
  7. You should now see a drive on your desktop named OSXFUSE Volume 0 (sshfs). If so, then the installation was a sucsess.
  8. You can now accsess the Web Interface on the pi by going to https://your-ip-address:10000 replacing your-ip-address with the Raspberry Pi's IP Address (for example: https://192.168.5.73:10000).
  9. All Done!

Note: You will probably see a warning message in your browser that says something like (Your connection is not private) ignore this message.

Connect to Raspi Drive with a Windows Computer

Credits go to NSoftware for instructions

  1. Find out what your Raspberry Pi's IP Address is with hostname -I (The real IP Address is the first one is shown.
  2. Install SFTP Drive from NSoftware.
  3. Follow the in-app instructions to install the program.
  4. Open the app and click on the Drives tab and then the New button.
  5. Once the Edit Drive dialog opens, input a drive name (it can be anything) and then put in the SFTP server information (The default username and password is pi and raspberry). Then click OK.
  6. On the main window click start to start the connection to your pi.
  7. If everything went smoothly then it should be accessible in File Explorer.
  8. You should now be able to accsess the Web Interface by going to https://your-ip-address:10000 replacing your-ip-address with the Raspberry Pi's IP Address (for example: https://192.168.5.73:10000)
  9. All Done! For more in depth instructions on how to setup a sftp connection on windows visit this website.

Note: You will probably see a warning message in your browser that says something like (Your connection is not private) ignore this message.

Contributing

If you would like to report a bug or make a code contribution please view the CONTRIBUTING.MD file.