Sometimes I have way too much fun. I recently acquired a 1st gen. Apple TV and wanted to breath some new life into it. So, I decided to remove its extremely outdated operating system (version 3.0.2) and replace it with something that actually allows media streaming. I decided to start with OSMC and followed this excellent video guide:

The installation process was smooth for the most part—I only had one snag during setup. The most updated version of OSMC from November was not installing properly, so I repeated the steps outlined in the video using the October build of OSMC and succeed. (I tried to update the October version to the November one later, but that update failed so I’ll stick with the older version for now.)

November built of OSMC failing to install properly on Gen 1 Apple TV displays a white sad face on blue background

OSMC Installation Failing 1st Time

OSMC linux operating system installing on Gen 1 Apple TV

OSMC Installation Succeeding 2nd Time

At this point, most people stop with an awesome Kodi enabled Apple TV but I wanted much more from this Debian 8.6 Linux computer! In accordance with the recommendations from the aforementioned video guide, I installed LXDE as the desktop interface. It was at this point that I started dreaming of all the things I could do with my new linux computer!

Apple TV As A Computer

First, I installed a web browser. Learning to use the “apt-get” command from forums, I installed Firefox ESR and explored my first text-based web browser, Lynx. It was a spectacular experience to see what the web looks like when images, videos, and advertisements are stripped away and words are all that remain.

OU Create loaded in Lynx text-based web browser shows only words of the website

OU Create in the Lynx text-based web browser

Next, I built a Twine game from my Apple TV and used the notes from eXperience Play to add some style to my simple game. Once it was built I decided to upload and host the HTML game on my OU Create domain.

ATV game built in Twine and hosted at atv.keeganslw.com

Twine game made on Apple TV now available at atv.keeganslw.com

Eventually, I decided to load office software onto my Apple TV to create some documents. To install LibreOffice, I had to learn how to setup backports by creating text files in the command line using:

nano /etc/apt/sources.list.d/filename.list

But after some tinkering and patience, I was able to install LibreOffice onto the Apple TV. With this software, I composed my first document from the Apple TV.

LibreOffice running on Apple TV.

LibreOffice running on my Apple TV

After playing around with Debian Linux for a few hours, I started to push my goals even further. I wanted to see what it would take to turn my Apple TV into a web server. 🙂

Apple TV As A Web Server

There was a phenomenal guide on setting up a LAMP environment in Debian that I followed to transform my Apple TV into a server. However, I had trouble getting MariaDB MySQL to install properly. Since I wasn’t determined to install any web apps that used MySQL, I didn’t sweat this problem and turned my attention towards the more crucial Apache2 and PHP5 and started getting more ambitious.

First, I discovered I could host the Apple TV-made Twine game on the Apple TV itself by placing the HTML file in the web root directory that Apache had generated (in my case /var/www/html). THIS WORKED PERFECTLY. In other words, files located in the computer folder “html” (that is located in the folder “www” that is located in the folder “var”) on the Apple TV were now accessible to other computers on my home network. This meant I was able to navigate to the IP address of my Apple TV using my iPad to access the Twine game.

ATV game built in Twine and hosted on the Apple TV

Same Twine game now hosted on the Apple TV

In fact, any device on my home network can navigate to http://10.0.1.30/twine.html and access the html file that was being hosted by my new LAP (Linux, Apache, PHP) server. Yet this game was only simple HTML and I wanted to take the Apple TV even further.

So, I started exploring web apps since some flat-file CMS like Grav don’t require MySQL to operate, I started exploring what it would take to run a Grav website from my Apple TV. I spent a while reading and researching the requirements like editing the apache2.conf file to allow .htaccess to function and installing different PHP components. However, after I looked at my watch and saw 8 hours had past since I started this adventure, I decided it was time to take a break… 🙂

What’s Next For The Apple TV?

I want to finish getting Grav running on my new web server, but I’ll need to do a bit more research before another Apple TV journey. Also, I’m exploring a firewall exception and mapping port 80 in my router to grant users access to my Apple TV web server outside of my home.

Finally, I’m considering installing node.js and trying to get a copy of Ghost running. This may be feasible as opposed to running something like Sandstorm.io or Gitlab, with the measly 256MB of RAM on an Apple TV.

WHY? Why Not?

If you played the Twine game I keep referencing, you’ve already witnessed me questioning my intentions. Why the heck did I spend all day turning a media player into a computer and then into a server? I may sarcastically reply with “why not?” but the real reason is for the fun of learning. Today, I taught myself loads of awesome stuff! From heavy usage of the Debian command line to Apache2 as a web server to how the web works at a file and IP address level—these days of experimentation, building, and re-building help me understand technology and its role in our lives. For me this was more than an exercise in learning, this was an opportunity to discover how and why I’d bring the web into my own classroom.

The featured image is provided CC0 by Ilya Pavlov via Unsplash.

Leave a Reply