Raspi Drive – Version 2.0
A semi-automated project to convert a Raspberry Pi into a NAS server (DIY Cloud Storage Solution).
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.
- Plug the hard drive or USB stick into your computer.
- Open Disk Utility if you are using a mac computer or Windows Explorer if your are using a Windows computer.
- For Windows users right click on the drive and click format.
- For Mac users select the drive then click erase.
- When you get to the format/erase page format the drive to be ExFat then click Erase/Start.
- Let it load until it says complete then make sure its formated in ExFat.
- Eject the drive from your computer.
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.
- Download the latest release of Raspi Drive here.
- Decompress the image and flash it to a micro SD card (with at least 8GB of available space) with your favorite flashing utility.
- Connect your drive through USB.
- Power on your Raspberry Pi, wait 30 secconds to a minute, and then connect to the wifi network named "raspidrive-config."
- Visit the setup website at 192.168.88.1:8888, select your WiFi network, input the wifi's password, and then click "submit."
- 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.
- Download Raspberry Pi OS Lite. Grab the latest version from here.
- Unzip the downloaded file.
- Flash the unzipped image using Etcher.
- Remount the micro sd card (unplug and replug micro sd card from computer).
- Open Terminal or Command Prompt and run the following command (enables ssh on the pi):
touch /Volumes/boot/ssh
- Next, set up wifi. Download this file named wpa_supplicant.conf.
- Now open up the file you downloaded and change the SSID to your network's name and the psk to your network's password.
- Copy the file you just edited and paste it to the boot partition of your micro sd card.
- Unplug the micro sd card from your computer and insert it in your pi.
- SSH to your pi (more information on how to do so here).
- Plug the drive you formated in to your pi.
- 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
- Mount your external drive by entering:
sudo mount /dev/sda2 /mnt/drive
- 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,MODEL
and 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.
If you would like to manually install this then you can follow these instructions.
- Run steps 1-10 above.
- Update your packages with
sudo apt update
- Upgrade your system with
sudo apt upgrade -y
- 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
- Download and install Webmin with:
wget https://prdownloads.sourceforge.net/webadmin/webmin_1.930_all.deb && sudo dpkg --install webmin_1.930_all.deb
- Create the external hard drive's mount directory with
sudo mkdir /mnt/drive
- Mount your hard drive to the mount directory with
sudo mount /dev/sda2 /mnt/drive
- Reboot your pi with
sudo reboot
Note: This is everything the Installer Script does but just faster.
- Find out what your Raspberry Pi's IP Address is with
hostname -I
(The real IP Address is the first one that it shows) - Download Fuse and SSHFS on your Mac.
- Run both installation packages and follow the onscreen instructions.
- Make a folder named Drive on your desktop.
- 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). - Put in the pi's password (The default is
raspberry
). - You should now see a drive on your desktop named OSXFUSE Volume 0 (sshfs). If so, then the installation was a sucsess.
- 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).
- 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.
Credits go to NSoftware for instructions
- Find out what your Raspberry Pi's IP Address is with
hostname -I
(The real IP Address is the first one is shown. - Install SFTP Drive from NSoftware.
- Follow the in-app instructions to install the program.
- Open the app and click on the Drives tab and then the New button.
- 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.
- On the main window click start to start the connection to your pi.
- If everything went smoothly then it should be accessible in File Explorer.
- 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)
- 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.
If you would like to report a bug or make a code contribution please view the CONTRIBUTING.MD file.