Turn your $10 Raspberry Pi Zero into a web USB stick!
- Windows, Mac, or Linux computer
- Internet connection
- Raspberry Pi Zero (Wifi model not needed, but highly recommended)
- 16gb+ micro SD card (We always recommend Samsung SD cards)
- SSH client (Older versions of Windows only)
- [OPTIONAL] VNC Viewer
- Flash a 16gb+ micro SD card with Raspberry Pi OS Lite (if you'd like a graphical UI for VNC, you can use a regular version) using Etcher
- Add a blank file called
ssh
to the root of the SD card (justssh
, nothing else) - Open the
cmdline.txt
file, and addmodules-load=dwc2,g_ether
to the end of the file (not on a new line) - Open the
config.txt
file, and adddtoverlay=dwc2
to a new line on the end of the file
- Plug in the Raspberry Pi
- Wait 30-90seconds for the Pi to boot up
- Open your SSH client (or terminal), and SSH into
pi@raspberrypi.local
(the default password israspberry
) - Type in
sudo raspi-config
, and "Expand Filesystem", now, if you'd like, you may change the hostname to something else, rather than "raspberry", for example, mine is "usb" - Restart when prompted
- After you restart, copy and paste the following command:
sudo apt update && sudo apt install apache2 libapache2-mod-php mariadb-server mariadb-client php-bz2 php-mysql php-curl php-gd php-imagick php-intl php-mbstring php-xml php-zip zip unzip -y && sudo a2enmod rewrite
- During that command, MariaDB will prompt you to select a password, type in any password (but remember it)
- Type
cd /var/www
(if you get an error, typesudo mkdir /var/www && cd /var/www
) - To give access to the system, type
chmod 744 .
(DON'T MISS THE DOT AT THE END) - Type in
sudo git clone https://github.com/itsnebulalol/piusb.git
- Type
sudo mv piusb/. .
(AGAIN, DON'T MISS THE DOTS AT THE END) - Now, you can put in
sudo rm -rf piusb
- Navagate your browser to
http://raspberrypi.local/index.html
(or a different hostname if you changed it before) - And boom! Now you have your piUSB setup! To install Owncloud, keep reading on.
- To setup Owncloud, type
sudo mysql -u root -p
, then type in the password you created before. - Type
create database owncloud;
into the MariaDB prompt - Then, type
create user 'owncloud'@'localhost' identified by 'owncloud';
into the prompt - After that, type
grant all privileges on owncloud.* to 'owncloud'@'localhost';
into the prompt - Lastly, type
exit;
into the MariaDB prompt - Type
cd /var/www
- Now, you can type
sudo wget https://download.owncloud.org/community/owncloud-complete-20200731.zip
to start downloading Owncloud - To unzip Owncloud, type in
sudo unzip owncloud-complete-20200731.zip
- Now navigate your browser to
http://raspberrypi.local
(or a different hostname if you changed it before) - Select "Owncloud"
- Type in a username and password, and make sure "Storage & database" is dropped down
- Scroll down a little bit until you see the database information
- Make sure MySQL/MariaDB is selected (if you don't see this, just ignore it)
- The username is
owncloud
, the password isowncloud
, the database name isowncloud
, and the address islocalhost
- Click "Finish setup"
- Login with the details you made in step 11.
- Done! You have set up Owncloud!
Create a GitHub issue with the "Problem" template.