Measure the circumference of the flue pipe. Use a saw to cut a hole in the ceiling above the wood stove. Create a hole that's slightly larger than the pipe so you have enough room to install a supportive flue collar. Ensure that the pipe will run next to a ceiling joist (rather than through it). Leave adequate space between the pipe and the joist to install the flue collar.
Attach the flue pipe to the wood stove. Run a section of the pipe through the hole in the ceiling. Secure the pipe to the ceiling by installing a flue collar. Attach the collar to the pipe and then to the nearby joist.
Extend the flue pipe to the roof. Cut a hole in the roof for the flue pipe: in the attic, drive a nail through the roof where you intend create the hole. On the roof, clear away shingles around the nail and then cut through the roof with a hole saw. Ensure that the hole is slightly larger than the pipe so you have room to install a flue collar.
Run the pipe through the hole and secure the pipe with another flue collar. Seal the gaps around the pipe and collar with caulk to prevent moisture from dripping inside the roof.
Add sections to the flue pipe until it reaches the legally required distance from the house. Attach a chimney cap to the top of the flue pipe.