According to John Labbe and Vernon Goe in "Railroads In The Woods" the boiler for this contraption came from China and the engine was likely from a dismantled donkey. It worked well enough that it was later sent up to Alaska.
On early logging railroads homebuilt "masterpieces" like this were fairly common. Most of them used an upright boiler (the first common carrier railroad in Oregon used one of these), although traction engines were sometimes used. One of the best looking I have seen used the boiler and engine from a Buffalo-Pitts steam tractor mounted on Shay trucks. Another photo in Labbe & Goe's book shows a pole road locomotive and a rail (pole) mounted donkey engine. The two machines appear to be identical.
Not all weird and wonderful machines were homemade however. Willamette Iron and Steel built several gripwheel locomotives or "Walking Dudleys". These machines propelled themselves by gripping a wire rope laying between the rails, kind of like a cable car except that the cable was stationary. The device used a large upright boiler and donkey type cylindars, and the cable was wrapped around a "grip wheel" in the center of the car. It successfully worked ground where no adhesion type locomotive could go.