Raspberry Pi(rate)Box

Raspberry Pi(rate)Box 1.1.4 is now available for download via BitTorrent! See our easy DIY instructions below for details on how to build your own Pi(rate)Box. And learn more about the PirateBox project here.

Pi(rate)Box

PirateBox 1.1 Features

Responsive design for ease of use with phones and tablets; UPnP Media Server for local streaming of movies and songs; Image and Message Board for 4chan-like functionality; chat room for anonymous communications; browser-based file sharing system!

====== PirateBox Raspberry Pi DIY ====== **PirateBox** is an **anonymous offline mobile file-sharing and communications system** built with **free software** and inexpensive **off-the-shelf hardware**. You can use it to transform any space into a free and open offline communications and file sharing network. **[[:faq|Learn more about PirateBox on our FAQ page!]]** We are providing a custom Raspberry Pi image, which is built on top of [[https://wiki.archlinux.org/|ArchLinux]]. You can learn more about it on our [[raspberry_pi:os_adjustments|RapsberryPi Operating System Adjustments]] page. If you prefer building the PirateBox on Raspbian or Armbian you can find a manual setup page [[raspberry_pi:diy:armbian|here]]. This is useful, if you want to use other one-chip computers, like the OrangePi. There are separate instructions available for: [[other:chip|ChiPirate-BOX: the chipest and cheapest Pirate-BOX ever]]. For support, be sure to check out the **[[:raspberry_pi|PirateBox Raspberry Pi page]]** and the **[[http://forum.piratebox.cc/list.php?7|Raspberry Pi(rate)Box discussion board]]** on our **[[http://forum.piratebox.cc|PirateBox Forum]]**. The following instructions are for installing **PirateBox** on a Raspberry Pi. ===== Stuff you will need ===== 1. **Raspberry Pi**, [[https://en.wikipedia.org/wiki/Raspberry_Pi#Specifications|learn about]] the different models. [[https://shop.pimoroni.com|Pimoroni]] provides pretty nice sets including cases, psu and SDCards. * **Version A/B** **[[amazon>B009SQQF9C|(Amazon)]]** * **Version B+** **[[amazon>B00LPESRUK|(Amazon)]]** * **Version Zero** **[[https://shop.pimoroni.com/products/raspberry-pi-zero|Pimoroni]]** * **Version Zero-W** (since 1.1.3) **[[https://shop.pimoroni.com/products/raspberry-pi-zero-w|Pimoroni]]** * **Version 2** **[[amazon>B00T2U7R7I|(Amazon)]]** * **Version 3** **[[amazon>B01CD5VC92|(Amazon)]] [[https://www.farnell.com/pi/ |(Farnell)]] [[https://shop.pimoroni.com/products/raspberry-pi-3|Pimoroni]]** * **Version 3+** **[[amazon>B07BDR5PDW|(Amazon)]] [[https://www.farnell.com/pi/ |(Farnell)]] [[https://shop.pimoroni.com/products/raspberry-pi-3-plus|Pimoroni]]** //Disclaimer: Buying this article through amazon.com gives as some affiliate money.// 2. **SD Card, Class 10** SDHC **[[amazon>B003VNKNEG| 8GB Card (Amazon)]]** 3. **USB Wi-Fi Adapter [[:raspberry_pi:piratebox_wifi_compatibility|(compatible devices)]]** - **Note:** RPi3 & Zero-W contains a built in wifi card. 4. **5V micro USB power supply [[amazon>B00GF9T3I0|(Amazon)]]** 5. **USB Flash Drive** (single partition, FAT32 formatted) The Kingston DT 16GB works well **[[amazon>B00DYQYITG|(Amazon)]]** **[[http://www.newegg.com/Product/Product.aspx?Item=9SIA12K11S3818&cm_re=Kingston_DTSE9H_16GB-_-20-239-003-_-Product|(Newegg)]]** 6. **Ethernet cable [[amazon>B00N2VILDM|(Amazon)]]** 7. **Computer with ethernet port** - **Note:** Model A, RPi Zero and RPi Zero-W do not have an ethernet port. 8. **5V USB Battery** (optional) **[[amazon>B005NGLTZQ|(Amazon)]]** ---- ===== Using Monitor & Keyboard ===== All steps (setting alarm password, post installation steps) can be done via an attached keyboard and monitor. On early versions of the RaspberryPi you encountered USB power issues with a WiFi adapter attached, which is the reason the complete manual based on using SSH. In addition, it is teaching you how to use a remote shell. There is no GUI pre-installed on the PirateBox-archlinux images, so you will have a CLI as well, but in some cases it might be easier to use a keyboard & monitor then a network connection. ---- ===== Installation ===== 1. Using a **BitTorrent client** ([[https://www.transmissionbt.com/|Transmission for OS X and Linux]]) ([[http://deluge-torrent.org/|Deluge for Windows, OS X or Linux]]) on your computer, download a copy of the * For Raspberry Pi 1 A, B, B+, Zero & Zero-W : piratebox_rpi_1.1.4-27-02-2018.img.zip (SHA256 Checksum: 81635482b91c7464d24754615ea2e8c44be84f454dc0e8feaf1a4fa05753ca3c) * For Rapsberry Pi 2 & 3, Rapsbperry Pi 3+: piratebox_rpi2_1.1.4-11-05-2018.img.zip (SHA256 Checksum: 2fc877040d4a46a0a5b229942c415a831ad16d7fea9ad6917448f76285280282). **Note:** Please help seed this file for other PirateBox downloaders! **Note:** :!: If you encounter a slow starting of the torrent download using the magnet link, you may pick up the corresponding torrent file in [[https://forum.piratebox.cc/read.php?9,21880,21880#msg-21880|this forum post]]. You can also use direct downloads via our **[[:mirrors|Alternative download sources]]** **Note:** Our RPi images since 1.1.3 contain some customization which should treat the SDCard well. One of the consequences of these changes is, that you should shutdown the RPi properly. The Linux Kernel will write data on the disk on a 5 minute interval during being idle to preserve some SDCard cycles. You can learn more about it on our [[raspberry_pi:os_adjustments|RapsberryPi Operating System Adjustments]] page. 2. Extract the **piratebox_rpi*.zip** file and follow the Raspberry Pi **SD Card Setup instructions** **[[http://elinux.org/RPi_Easy_SD_Card_Setup#Flashing_the_SD_card_using_Mac_OSX|(OS X instructions)]]** **[[http://elinux.org/RPi_Easy_SD_Card_Setup#Flashing_the_SD_Card_using_Windows|(Windows instructions)]]** **[[http://elinux.org/RPi_Easy_SD_Card_Setup#Flashing_the_SD_Card_using_Linux_.28including_on_a_Pi.21.29|(Linux instructions)]]** to install the image to your SD card. 3. Once you have finished copying the **Raspberry Pi(rate)Box** image to your SD card, insert it into the Raspberry Pi and connect it via ethernet cable to your home router. **Be sure your USB Wi-Fi adapter and FAT32 formatted USB drive are both plugged in** (see "Stuff You'll Need" section above for more info on compatible devices). 4. Wait 2-3 minutes for your Pi to fully boot and then open a terminal window (for OS X, go to Applications > Utilities > Terminal; for Windows, install and open [[http://www.chiark.greenend.org.uk/~sgtatham/putty/|PuTTY]]) and ssh into your PirateBox: ssh alarm@alarmpi The password is: **alarm** **Note:** If you are using PuTTY, enter in the hostname field "''alarm@alarmpi''" or "''alarm@192.168.77.1''" 5. Once you have logged in, change your password (to something you'll remember!) by using the passwd command: passwd You will be prompted to enter and then confirm your new password. Root user is not allowed to login via remote, you do not need to set a password for root. Use **sudo** to invoke commands as root. The default password for user //root// is **root**. It is strongly recommended to change this password as well. You can do this while being logged in as alarm running this command: sudo passwd root **Note:** At this point, the PirateBox AP should be available, if you have a supported WiFi stick attached. For problems see here [[raspberry_pi:mods?&#using_alternative_hostapd_binaries_and_drivers_for_tested_devices|this mod guide]] or post to the RPi forum mentioning the failed WiFi auto detection. 6. **Optional:** By default, the PirateBox stores the uploaded files into the root filesystem. This is sufficient for first tests, but for larger installations you should consider using a different partition or medium. The extracted image uses around 2GB of the SD Card, so you can use the remaining SD card storage, or your USB flash drive. This process is documented on the [[raspberry_pi:mods|Raspberry Pi(rate)Box Mods]] page. 7. Your PirateBox ist started automatically as soon as a supported WiFi stick is detected. 8. You are now ready to activate the Kareha Image and Discussion Board, enable your USB drive as share and start the UPnP server. See the **[[raspberry_pi:diy#post-installation]]** instructions below for details. ---- ===== Post-Installation ====== Once you have installed or upgraded your PirateBox, follow these final steps to activate the Kareha Image and Discussion Board and configure and start the UPnP media server. 1. Power up your PirateBox (make sure it is not connected via ethernet cable) and join the SSID "**PirateBox: Share freely**" network. Open a terminal window (for OS X, go to Applications > Utilities > Terminal; for Windows, install and open [[http://www.chiark.greenend.org.uk/~sgtatham/putty/|PuTTY]]) and ssh into your PirateBox: ssh alarm@192.168.77.1 2. Recommended: Activate the USB Stick (FAT32 only) ''sudo /opt/piratebox/rpi/bin/usb_share.sh'' or (since **1.1.3**) the spare space on the SDCard as storage using the command ''sudo /opt/piratebox/rpi/bin/sdcard_share.sh''. 3. Activate the Kareha Image and Discussion Board by using the board-autoconf tool: sudo /opt/piratebox/bin/board-autoconf.sh 4. Activate the "timesave functionality" once: sudo /opt/piratebox/bin/timesave.sh /opt/piratebox/conf/piratebox.conf install sudo systemctl enable timesave 5. Activate the UPnP Media Server by copying over the config file: sudo cp /etc/minidlna.conf /etc/minidlna.conf.bkp sudo cp /opt/piratebox/src/linux.example.minidlna.conf /etc/minidlna.conf **Note:** Optionally, you can edit the config file (change the display name, etc) with: sudo nano /etc/minidlna.conf 6. Finally, start the UPnP Media Server with: sudo systemctl start minidlna sudo systemctl enable minidlna 7. Your PirateBox should be ready to use! Be sure to also check out the **[[http://forum.piratebox.cc/list.php?7|Raspberry Pi(rate)Box discussion board]]** on our **[[http://forum.piratebox.cc|PirateBox Forum]]**.