So you already setup your Apple TV2 to run XBMC, and now you’re bored with it. Why not turn the ATV2 into a webserver like the guys at MacMiniVault did? Yes this link opens a web page served from an Apple TV2. You can do this yourself with your own Apple TV without too much work, just a bit of patience.
Before getting started, you’ll need to jailbreak the Apple TV2 with Seas0nPass, Seas0nPass is the easiest jailbreak utility around, but you could use PwnageTool or Redsn0w if that floats your boat. After you’ve done this, here’s a rundown of what you’ll need to do:
- SSH into the newly jailbroken Apple TV2 from the Terminal, the default root password is ‘alpine’ and you’ll need to know the AppleTV2’s IP address or you can try using the hostname apple-tv.local:
- Change the root password from alpine to something else by typing ‘passwd’
- Install Lighttpd onto the Apple TV2 by using apt-get:
- Use your favorite SFTP app (CyberDuck is free) to upload a lighttpd config file to /etc/lighttpd.conf – here’s a sample lighttpd.conf to work from
- Now launch lighttpd server with (you may need to run this as /usr/sbin/lighttpd-angel):
ssh root@apple-tv.local
apt-get install lighttpd
lighttpd-angel -f /etc/lighttpd.conf
Your Apple TV2 web server should now be up and running, this can be verified by pulling up the ATV’s IP address in a web browser.
If you want the webserver to automatically start when the Apple TV boots or reboots, you’ll need to add a launch agent plist to /Library/LaunchDaemons/, plist files are different than bash scripts in that you have to spell out each individual flag and argument as a string. In this case, the command to execute lighttpd-angel would translate to plist keys looking something like this:
This walkthrough isn’t perfect yet, it’s an elaborated version from the super simplified instructions on MacMiniVault who setup this live Apple TV webserver just to see how well it will handle the traffic load.
“Cutting-Edge Deals, Everyday Prices: Tech Up, Spend Down!”