This project is an overhead that covers the entire deck, supported with posts extended from the railing system.
If your deck is small and your overhead will span its entire surface, you can support its upper structure with posts extended from the railing system. In this configuration use through posts supported in footings. To simplify construction and save time and money, use a single-post corner instead of a double-post design. In all other cases a four-post overhead will have at least two posts supported by the decking and the framing under it.
In a new deck, plan the location of the posts and include specific details of the support structure in your detailed plans. Retrofitting an old deck requires some forethought too. You'll have to remove a portion of the decking to gain access to the joists.
Overhead structures do not have to support a live load, but use the live-load span tables when computing the size of the lumber anyway. That way you won't have to worry that the upper structure will sag under its own weight. Many overheads use a doubled 2x beam fastened to the sides of the posts. This construction is strong enough to support the structural load and avoids unattractive framing connectors. Use carriage bolts and countersink the nuts for a better look.
About 12 hours for a 10x12-foot overhead, more with decorative cuts
Tape measure, speed square, circular saw, framing square, framing hammer, chisel, ladder, cordless drill
Measuring, cutting, fastening
2x, 4x, and 1x lumber, carriage bolts, machine bolts, washers, nuts, fasteners
Mark the centerline of the post on the top edge of both joists that will hold the post support. Measure the space between the joists and cut a 4x4 brace to fit. Set the brace in place, flush with the top of the joists and centered on the lines. Keep it on the marks by clamping the joists against it. Drill lag-screw pilot holes through the joists and slightly into the center of the brace. Then drive the lag screws in with a socket wrench. Cut 2x4 cleats (4 to 5 inches wide) and screw them into both joists on either side of the 4x4 brace. The cleats add stability to the brace. Retighten the lag screws.
Mount the interior posts after installing the decking board that covers the 4x4 brace, but before the adjacent board. This allows you to reach the nut on the bottom of the bolt. Drill through the decking at the post location (or through the center of the 4x4 brace from below) with a bit the same size as the machine bolt. Set the post anchor in place and push the bolt through the hole. Tighten the bolt fingertight. Install, plumb, and brace the post and tighten the nut. Then finish attaching the decking up to the next post location.
Snap chalk lines on the decking to outline the layout. Set corner posts unless you already have through posts. Notch the posts and decking if necessary, or set the post flush with the corner. Fasten the post to the outside joist with carriage bolts, and brace it plumb.
Set interior posts into the post anchors and brace them temporarily with 1x4s fastened to the joists on open decking or 2x4 cleats tacked to the deck surface. Square the post with a 3-4-5 triangle, tapping the anchor to adjust it. Tighten the anchor and plumb the posts.
When the posts are plumb and braced securely, mark a corner post for the top of the beam (in a sandwiched-beam construction) and mark the height on the other posts with a level. Transfer the marks to adjacent sides of the posts and cut them with a reciprocating saw.
Measure down both sides of the post to the depth of the beam and mark this point. Tack a temporary cleat onto the post at the line to help you steady the beam as you raise it. Or miter 2x2 collars and finish-nail them at the marks. Counterbore one beam to recess the bolt nuts. Clamp the beams together and predrill both of them for the bolts. Clamp the beams to the posts, drill the holes through them, and fasten the bolts. Then install the remaining roof structure.
Add trim around the post bases to hide the anchors. Miter-cut one end of a 1x4 trim piece and hold it in place against the post and anchor. Mark the intersection of the other post face on the opposite end of the trim, and miter-cut the end. Apply a thin bead of construction adhesive along the miters, and finish-nail the trim to the post. Drive 11/2-inch brads into the mitered corners, then countersink the nailheads and fill the holes. Sand the filler smooth when it dries.