Picture of Raspberry Pi PirateBox
0 - 2 - PirateBox.JPG
0 - 3 - PirateBox Wiring Diagram.PNG
0 - 4 - PirateBox LED Circuit.png
0 - 5 - PirateBox LED Board Schematic.png

A PirateBox is a Linux based system built using free software for the Raspberry Pi that provides private sharing of digital content. The PirateBox creates a local WiFi network, independent from the Internet, with anonymous file sharing and chatting capabilities.

I wanted to make a PirateBox and create a cool looking case for it. I used a laser cutter to cut the pieces of the case from 1/8" thick birch plywood and painted it to look as shown in photos 1 and 2. A small Python program controls custom hardware that makes the arcs above the skull glow when the PirateBox is up and running. Another small Python program controls a push button switch that illuminates when the Raspberry Pi is powered up. When the switch is pressed, the program shuts down the Raspberry Pi preventing the problems that can occur if you just unplug a running Raspberry Pi.

The "PirateBox Wiring Diagram" shows how the various components are connected to the Raspberry Pi. The second diagram and the schematic show the wiring for the LED circuit board. Since the three large LEDs draw more power than the Raspberry Pi can provide, the LED circuit board is powered separately and uses an optoisolator to keep the LED circuit isolated from the Raspberry Pi.

The PirateBox can be painted with different color schemes to create the skins shown in step 19.

This instructable assumes you have experience with setting up and running a Raspberry Pi, that you have experience soldering components to printed circuit boards, and that you have access to and experience with a laser cutter.

I made this at TechShop.

Remove these adsRemove these ads by Signing Up
FeminD1 month ago
(removed by author or community request)
talk2bruce (author)  FeminD1 month ago

I don't have any experience with that wireless adapter. My only suggestion is to try it.

FeminD1 month ago
How do I set up a raspberry pi rate box without any external circuit (of LEDs etc..) I just want to make a pirate box without any external circuit knowledge
talk2bruce (author)  FeminD1 month ago

Instructions for making a Raspberry Pi Piratebox without the external circuits can be found here:

FeminD1 month ago
And I have a Dlink DWA-123 wireless adapter (usb dongle) will it run directly or any drivers have to be installed.. please help
dmagryta1243 months ago

Very cool. Nice work! I did something vaguely similar with a cheapy generic $11 eBay travel router + a USB flash drive...I just set the router to not broadcast its SSID, and plugged into the router the flash drive containing the files I wanted to privately share. Then I setup LAN file sharing, so now I can hide the router in a stealth box with a 9v battery + LM7805 voltage regulator powering it. When a fellow "agent" is in range of the pre-shared GPS coordinates of the router (~15 feet) , they manually add the WiFi network in from the hidden but pre-shared SSID name and password. Then they can browse for and download wirelessly the files that are on the flash drive. But your instructable is quite a few levels more advanced, and far more clever from my quick project. :)

wilgubeast4 months ago

Love the numbered photographs. This is a very well-presented project.

talk2bruce (author)  wilgubeast4 months ago

Thanks for the feedback! I've written a lot of instructables and found that with unnumbered photos saying things like "in the fourth photo" could get confusing especially with a lot of photos so I started numbering them. It adds time to add the numbers but it actually makes it a bit easier to write the instructable and certainly a lot easier to follow.

JM19994 months ago

How long did it take to make this Instructable? it is one of the larger ones I have seen!

talk2bruce (author)  JM19994 months ago

I worked on this on and off over about two months but I would say it it was probably about a solid week or two of work. The actual building of the PirateBox was pretty quick: probably about about three days (including time for paint to dry). The most time consuming part was selecting which photos to use (I take a lot of photos as I built the project) and documenting the steps for the instructable.

chintanextc5 months ago

talk2bruce, I am not able to figure out these two statements...

1) Using a text editor, edit the "/etc/rc.local" file and add the line below to the bottom of the file before the line with "exit 0". Since "/etc/rc.local" is a system file you will need to use the sudo command when you start your editor - for example "sudo nano /etc/rc.local".

2) Make sure to put the ampersand ("&") at the end of the line.

Please help me out as I am working on it.

talk2bruce (author)  chintanextc5 months ago

Edit the "/etc/rc.local" file by issuing the following command on the command line:

sudo nano /etc/rc.local

when the editor has started and is displaying the contents of the file, you'll see that the last line of the file says "exit 0". Insert a line above that looks like this:

python /home/pi/python_programs/

Save the file.

talk2bruce , can you provide me a technical paper or any sources for Piratebox using raspberry pi? I will be grateful to you.
talk2bruce (author)  chintanextc5 months ago

The official Raspberry Pi Piratebox web site is

The software on that site is easy to install and works great but is incompatible with the hardware in this instructable. See the last step of this instructable for more details.

Thanks a lot talk2bruce!!!

prof_ron6 months ago

I am getting an "ERROR 403: Forbidden" indication when I attempt to get the

rpi_halt_btn program.

Any suggestions?

talk2bruce (author)  prof_ron5 months ago

This is odd. I saw your post and then tried it myself and I got the 403 error as well. As I was trying to figure out why this was happening, it started working again. Since a 403 error comes from the server, it may have been a temporary problem in the Amazon S3 infrastructure. Can you try it again, see if you still get the error, and let me know if it persists? One workaround, by the way, would be to use an editor like nano to type in the programs and save them in the python_programs directory. The code is listed in step 20.

Bwilson Props6 months ago


Very nice work. Just out of curiosity, what made you choose Raspbian over SliTaz?

talk2bruce (author)  Jezabelle.In.Hell6 months ago

I chose Raspbian for two reasons: (1) Raspbian was what the PirateBox software was originally made available on and (2) I had a lot of experience with Raspbian and that made it easy for me to determine how to hook my extensions for the shutdown switch and LED circuit board into the Raspbian system. I hadn't heard of SliTaz until I saw your comment: I'll have to check it out.

jelimoore6 months ago

Hello, dnsmasq fails to start, gives me no debug issues, and I do not know what is wrong. Can you please help out?

talk2bruce (author)  jelimoore6 months ago

Try issuing these commands and see if it fixes the problem:

sudo update-rc.d dnsmasq remove

sudo /etc/init.d/dnsmasq stop

sudo shutdown -r now

mfrontuto6 months ago

can we use your script for the power button with other projects that use Pi? I wnated to make a media center that has a power/on/off button. will this work for that as well?

talk2bruce (author)  mfrontuto6 months ago

Sure, you can use the script for the shutdown button in other
projects. I'm planning to use that script for some other Raspberry Pi
projects I have underway. The thing to remember is that the script
doesn't power down the Raspberry Pi, what it does is shutdown the
Raspbian operating system so that it's safe to remove the power. It's important to "halt" Raspbian before removing power because you could corrupt the file system without a clean shutdown. In addition to a shutdown button, if you want to have a on / off button for the Raspberry Pi, what you'd need to do is modify a USB cable to have the switch break the power connection. If you have any questions about how to do that, feel free to send me a private message and I can explain in more detail.

vak526 months ago

Awesome! That case is sweet! I'm thinking about doing something similar with my raspberry pi.

Aleator7776 months ago

Yarr! Nice case. Well done project!