How To Turn an Apple® TV 2G
into a 24/7 Web Server
The following guide will help you jailbreak an Apple® TV 2G and turn it into an
optimized 24/7 Web Server with HTML PHP and SQLite ( ethernet or wireless )
NOTE If anything goes wrong you can restore to a factory default using iTunes
Use the USB connection without the power cable plugged in for a restore
Jailbreak Apple® TV 2G iOS 4.2.1
(For iOS 4.3.1 or 4.4.4 see Jailbreak then proceed to Step 6
)
The Mac version is a lot easier to use than the Windows version
Step 1: Run GreenPois0n and click “Yes” when it prompts for jailbreaking Apple TV
Step 2: Connect your Apple® TV 2G to your computer using a micro USB cable
Windows version: Click on “Prepare to Jailbreak (DFU)” Goto Step 3:
Mac Version: Follow the on screen instructions Keep the power plugged in Skip Step 3:
Step 3: Windows Version (Continued) Follow the following onscreen instructions to enter DFU mode:
Plug the Apple® TV in to a USB port (Wait 7 seconds)
Plug in the power adapter (Remove after 3 seconds)
Press and hold MENU and PLAY (7 seconds)
Release both buttons
Step 4: GreenPois0n will start “Jailbreaking” the Apple® TV 2G. The process will take 3+ minutes to complete on a PC (less then a minute on Mac). Leave it plugged into the USB for 1+ minutes before disconnecting it.
Step 5: Your Apple® TV should now be successfully jailbroken. Once done, unplug the USB from your computer and connect your HDMI TV/monitor. Navigate to “greenpois0n” menu and select “Inject Software” option to install Cydia package. Make sure you have it connected to the Internet with the ethernet cable.
(To reboot navigate to nitoTV > Settings > Reboot AppleTV)
Step 6: SSH console (
Putty)
(Your Apple TV® IP) CHANGE YOUR PASSWORD !! passwd
(default login is root password is alpine) Note only the first 8 password characters are recognized
***(Don't forget to use
TinyUmbrella to backup your SHSH blobs)***
How To Install Web Server ( Lighttpd PHP SQLite Nano Top & Optionally Perl )
Step 1: From your TV/monitor HDMI Console
General > Sleep After = Never
Settings > Screen Saver > Start After = Never
Settings > Airplay = Off
nitoTV > Settings > AppleTV Updates = Disabled
nitoTV > Install Software > OpenSSH
Optional: Change the Name of the TV - Settings > General > Name
Optional: Wireless Settings - General > Network > Wireless > Configure Wi-Fi ( unplug the ethernet cable first )
Optional: Set TCP/IP as fixed - Settings > General > Network > Configure TCP/IP > Manual
Write down your IP
nitoTV > Settings > Reboot AppleTV
Note: Only the Wireless or Ethernet can be used at once - If the ethernet cable is plugged in it disables the wireless
Step 2: Optionally Change Time Zone from default PST - SSH console (
Putty)
rm /private/var/db/timezone/localtime
cd /private/var/db/timezone/
ln -s /usr/share/zoneinfo/Canada/Eastern localtime
( Note replace Canada/Eastern with your time zone To find your time zone cd /usr/share/zoneinfo/ ls )
Unzip webtv2g.zip
SFTP (
Filezilla) webtv2g.sh > /private/var/tmp/
Prerequisite: The Apple TV must be connected to the Internet to download the necessary apps
Hint: The TV/monitor console will ony display a no connect message if its not connected to the Internet
cd /tmp
bash webtv2g.sh
Your Apple® TV will reboot after the install
Unzip perlinstaller.zip
SFTP (
Filezilla) perlinstaller.sh > /private/var/tmp/
cd /tmp
bash perlinstaller.sh
Step 4: Test
Use a browser http://xxx.xxx.xxx.xxx (Your Apple TV® IP)
SFTP (
Filezilla) your web files to the document root /private/var/www
( delete or over write the default index.html test file )
NOTE:
Console Menus That are Removed - Computers - Internet - Movies - TV ( Not needed for Dedicated Server Only )
Video playback and the Web Server can be run together but the web server will have less available memory
To Restore These TV Console Menus For Video Playback
SSH console (
Putty)
launchctl load -w /System/Library/LaunchDaemons/com.apple.airtunesd.*.plist (Only needed for Movies)
launchctl load -w /System/Library/LaunchDaemons/com.apple.fairplayd.*.plist (Only needed for Movies)
cd /Applications/AppleTV.app/Appliances
mv Movies.frappliance.old Movies.frappliance (Movies)
mv TV.frappliance.old TV.frappliance (TV)
mv Internet.frappliance.old Internet.frappliance (Internet)
mv Computers.frappliance.old Computers.frappliance (Computers)
killall AppleTV