User Tools

Site Tools


This is an old revision of the document!

PirateBox on Raspberry

This Page is currently under construction! It may work, its more like a draft. It's tested with Raspbian and Wifi-USB TP-Link TL-WN722N

Help: PirateBox Forum - Raspberry Pi Thread

The following steps describes the procedure, if you want to store your files on the SD-Card. Additional steps are required, if you want you uploaded data on a USB drive.

  • Download: Raspbian “wheezy”
  • Install Raspberry as normal:
  • Boot as normal with a Monitor, Keyboard & connected LAN (DHCP with Internet access) :!:
  • Do the following steps in Raspi-Config
    • Enable SSH Server via raspberry-config
    • change Password
    • Expand FS
    • Finish & reboot now
  • Wait until reboot is finished- needs a while because the OS is resizing the filesystem during this reboot
  • Install needed packages and prepare some stuff:
 # sudo apt-get update
 # sudo apt-get -y install lighttpd
 # sudo /etc/init.d/lighttpd stop
 # sudo update-rc.d lighttpd remove
 # sudo apt-get -y install dnsmasq 
 # sudo /etc/init.d/dnsmasq  stop
 # sudo update-rc.d dnsmasq remove 
 # sudo apt-get -y  install hostapd
 # sudo /etc/init.d/hostapd  stop
 # sudo update-rc.d hostapd remove 
 # sudo apt-get -y install iw
 # sudo rm /bin/sh
 # sudo ln /bin/bash /bin/sh
 # sudo chmod a+rw /bin/sh
  • Edit network config file /etc/network/interfaces
 auto lo
 iface lo inet loopback
 iface eth0 inet dhcp
 iface wlan0 inet manual
 ### disalbed for PirateBox
 #allow-hotplug wlan0
 #wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
 #iface default inet dhcp
  • Fetch and copy over PirateBox Source
 # wget 
 # tar xzf piratebox-ws_0.3.1.tar.gz
 # cd piratebox
 # sudo mkdir -p  /opt
 # sudo cp -rv  piratebox /opt
 # cd /opt/piratebox
 # sudo sed 's:DROOPY_USE_USER="no":DROOPY_USE_USER="yes":' -i  /opt/piratebox/conf/piratebox.conf
 # sudo ln -s /opt/piratebox/init.d/piratebox /etc/init.d/piratebox
 # sudo update-rc.d piratebox  defaults 
 # sudo /etc/init.d/piratebox start
 # sudo touch /opt/piratebox/conf/init_done 

:!: After this, the PirateBox should be run on default-startup. PirateBox works only on Wifi-Access with redirect. Network on Ethernet-Port is a normal “dhcp-client”, so no interference with your home network :!:

Sidenotes for a later image:

  • Enable SSH default

PirateBox on RaspberryPI without Wifi

Before starting the piratebox first time…


Do you want to run your PirateBox without a wifi device. This is no problem. Make sure you have changed the following parameters in your /opt/piratebox/conf/piratebox.conf

# The following can be set to no, too. Depends if the device shouldn't be a DHCP & DNS Server (no redirect to piratebox.lan)

And you have to edit /etc/network/interfaces , which have too look like

auto lo

iface lo inet loopback
iface eth0 inet **manual**

iface wlan0 inet manual
### disalbed for PirateBox
#allow-hotplug wlan0
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
#iface default inet dhcp

After this, the box is accessible under (instead of on OpenWRT)

Custom Image

  • After this you have can enable it with
 # sudo /etc/init.d/piratebox start
  • And if PirateBox should start via startup, run the following line
 # sudo update-rc.d piratebox  defaults 
raspberry.1358857629.txt.gz · Last modified: 2013/01/22 12:27 (external edit)