A ledger/header board is the first step if you are attaching the patio roof to an existing structure. The placement of the ledger/header determines the level of the roof, so be sure it is positioned at the correct height and is horizontal. When fastening ledger/header boards to wood, the ledger should be held securely with bolts through the wall or lag screws.
Use aluminum flashing to keep water from getting behind your ledger board. The flashing should tuck up under your siding and bend down over the ledger, then down the face of the ledger board.
Attach 2x6 rafters to the house with joist hangers and/or supported by the ledger board. If necessary, use a sliding bevel to determine angles needed where the rafters will meet the ledger board. Rafters are placed on 24" centers, and attached to the beams and settle joists are attached as needed (Image 1). The rafters should be added from each end working toward the center. Check each rafter for level as they are installed. Attach to ledger first, then settle joists. The vertical end beam is checked for level (Image 2) as the end rafters are positioned and secured. If the rafters extend over a beam, do not extend more than 1/3 of overall rafter length.
Check the rafter ends (tails) to be sure they are all on a straight line. If the walls are crooked, the rafter tails will also be crooked. Try to correct this problem; but if you are unable to, pop a chalk line across the rafter tails and trim them with your saw before attaching the sheathing. This is crucial because this building line will be very noticeable when viewed from below. Finally, add fascia board to end of rafters for a finished appearance.