Pirate Box: A Simple LAMP Stack Live Server Build

I first came across the PirateBox DIY project late last year, and thought it would be fun to set one up, but I didn’t really have an idea of where it could be put to good use. And then one day it hit me. I'm in a band and we play shows fairly regularly here in NYC. After shows people often ask if they can download any of our songs online (which, of course, they can), or they want to share pics they took during the set, or they want to get in touch with us and need our contact info, and so on. So I thought, hey, I’ll set up a Pirate Box for the band and run it as a live server during shows, and then people could share pics with us and one another directly, download songs directly from us rather than through an online middleman, get general info about the band, upcoming shows and so on.

I began hunting on Craig’s List for an appropriate router to install the PirateBox ISO, but had no luck. Being the impatient type, I broadened my search criteria and found someone selling an old Mac Mini for $50. Perfect. That weekend, I went to a local flea market and picked up a cheap soho router and some cables for another $10, and set to work.

Because of some apparent incompatibilities between the PirateBox ISO and the Mac Mini hardware, I decided to scratch the idea of installing the PirateBox ISO and instead create my own build from scratch rather than spend endless amounts of time troubleshooting and tweaking to get the hardware and software to play nice with each other.

After a couple weeks of research and tinkering, I managed to put together a nice little LAMP stack running a main portal page, a band Wiki, a chat room, and a song downloads page (see below for full details). I keep the setup in an old laptop case with the Mac Mini and the router inside, plugged into a power cord. I’ve since brought it along to two shows and set it up somewhere inconspicuous on stage. When we’re doing sound check I just plug in the extension cord, turn on the router and the server, and it’s good to go!

I configured the network and server so that once someone has hopped onto the wifi, all they have to do is navigate to serverhostname.local to access the server, and I set the wifi broadcast name and the host name of the server to the name of the band.  Here are some screen caps from the initial setup.  Once someone connects to the wifi and navigates to the correct url (in the present case: utm.local), they are greeted with a success page. 


Clicking the portal link takes them to the site's main navigation page.


From there, users can navigate to the wiki:


Or to the chat room:


 Or to the download page:


Try not to laugh at the download page, this was what it looked like after initial setup, it's since been spiced up a bit.  If you want to see it now, you'll just have to come out to one of our shows!

All in all this was a fun little project.  It took about a month's worth of work (mostly on weekends) to get everything up and running, including preliminary research, installation, configuration and customization, as well as the time spent setting up an initial test on a VirtualBox VM on my laptop. 

There were, however, some frustrating hurdles along the way: finding an Ubuntu Server ISO that worked without problems on the Mac hardware, getting hostname resolution to operate correctly for both iOS and Android devices (avahi-daemon eventually did the trick, though a bug in older generations of the Android OS prevents those devices from being able to resolve the hostname.local URL to the IP address of the server), and, perhaps most ridiculously, uploading the band's logo into the MediaWiki (though drinking a bit less beer during configuration would have probably made that process go a bit more smoothly!).   

There's a lot more that one could go into here: installing Ubunutu Server onto the Mac Mini, installing and configuring the LAMP stack, comparisons of the various open source software packages I decided to include, as well as those that I decided against, potential security issues running an open wifi at bars and clubs in NYC, and so on.  But perhaps those are best left to their own individual posts. So for now, that's all folks!


UTM Live Server Build

Hardware
• Mac Mini, $50 on Craig’s List
• Netgear router, $10 at a local flea market
• Cables, $5 at the same flea market
Total Hardware Cost: $65

Software
• OS: Ubuntu Server
• LAMP Stack:
    • Apache2 Web Server
    • PHP5
    • MYSQL DB
    • PHPMyAdmin
    • OpenSSH
• Web Interface:
    • MediaWiki
    • Blueimp’s AJAX Chat
    • PHP login module for the downloads page (adapted from Harvard’s Building Dynamic Websites online course)
    • Noir HTML5 Template optimized for mobile devices
Total Software Cost: $0

10 comments:

  1. Open the screen that you would like to capture. This might be any display within your smartphone, within an app or even the home display. Read more: screenshot android We highly propose S Be aware, an exceedingly strong Be aware-having application, and Kid Manner, which simplifies the UI for kids. SnapBizCard lets you increase any person to your Call listing just by getting a photograph of a company card.

    ReplyDelete