It’s Always Sunny in Philadelphia debuted back in 2005. The story behind the development of It’s Always Sunny is as humble and improbable as they come. You’ll likely never hear again of what was essentially a home movie being turned into a pilot, which impossibly was greenlit, and which would last for nine seasons (so far), become the cornerstone comedy hit of a now successful network, and also become the first sitcom ever to get a cable-to-cable syndication deal (reruns of the FX hit play on Comedy Central). There was no focus testing. No lighting. No big stars. There weren’t even small stars. It was just three struggling actors goofing off, and it was transformed into comedy gold.

Here’s how it happened:

1. Depending on who you ask, the unaired pilot for It’s Always Sunny in Philadelphia cost between $85 and $200, almost all of which was spent on tapes. That has to make it the cheapest greenlit sitcom pilot in history, and if not that, certainly the cheapest pilot ever for a show that ran for a decade.

2. The original title of the show was actually, It’s Always Sunny on Television, and the unaired pilot was set in Los Angeles. It was only after FX picked it up that the set location was moved to Philadelphia (Rob McElhenney’s hometown) because the network thought there were already too many sitcoms set in Los Angeles and it wanted to distinguish itself.

3. It was actually more important at the time for the series to distinguish itself because it hadn’t yet developed its misanthropic streak. In the original pilot, they’re not so much terrible people as they are mistaken as terrible people by misunderstandings (over the course of the first season, they eschewed the misunderstandings and owned up to their terribleness). It was also centered around the entertainment industry (they were struggling actors) rather than owners of a bar.

4. The credit sequence is also probably the cheapest ever to produce. It was just Rob McElhenney taping Philly footage with a camcorder and editing it together. The theme song — “Temptation Sensation” by Heinz Kiessling — like much of the first season soundtrack, is music from the public domain.

5. The pilot was not really originally designed to land a show. They were just friends hanging out who decided to put together the pilot for themselves, and to show other people, because they thought it was funny. But once they saw that it was funny, McElhenney began showing it around until FX saw it (and loved it) (several other networks, including HBO, passed).