The Side-door or Secret Door was a secret entrance to the Dwarven kingdom of the Lonely Mountain located on the western side of the mountain, from a shelf on the outside. It opened on to a long tunnel that led down to the Bottommost Cellar.
The Side-door was made as if to look like a rock face on the mountain and didn't look like a natural rock surface and all indications were that it was a constructed thing. Instead, its surface was flat and smooth and there were no signs that it was a door at all. The door was five feet high with a keyhole about three feet from the ground.
The Side-door was created sometime during the reign of Thrór with the support of his son Thráin. Their reason for creating it was unknown but literature points toward a means of escape. According to Thorin, Thrór and Thráin were the only ones who knew about it and used it to escape when Smaug attacked and claimed the mountain and all its wealth. The door could only be opened with a key, and then only on the last light shone upon it on Durin's Day. When Thorin and Company reached it, they recognized it for what it was and the dwarves eager to get inside attempted to force it open without success.
As a ray of moonlight struck the door, a piece of rock would flake off to reveal the key-hole, allowing the door to be opened. Bilbo passed through the door and down to Smaug. Anticipating that Smaug would find out how he got in, the Dwarves shut the side-door to the outside and retreated down the tunnel just in time before Smaug attacked the entrance, smashing the rock face to bits, destroying the side-door and everything around it with lashings of his great tail, and sealing them in the mountain.