Before You Begin
Remove the old railing and fastening hardware from the deck and notice how they are attached to the deck. Measure the length and width of railing needed for the deck, being careful to follow any specifications for the height and spacing of railings from your local building department. Take a rough sketch of the deck to a lumberyard or home center to get advice about the amount of materials you'll need. The components include rail posts, top and bottom rails and the balusters.
Before installing the railing apply a water-repellent preservative suggested for cedar to the material. Otherwise, plan to apply it after the railing is completed.
If this project is more than you want to do yourself, go to Home Advisor, a free online referral service that connects homeowners with prescreened local contractors.
Step 1 : Attach the posts to the deck
Along the sides of the deck install the posts every four to six feet so they are evenly spaced. From the bottom of each post cut a 1 1/2-in. wide notch so it laps over the deck surface and provides a 2-in. thick space to bolt to the joist.
Step 2 : Measure for the rails
The bottom rail should be about 4-inches above the deck surface. The top rail at least 36- inches above the deck. This height must comply with your local building codes. Mark the posts and at the top bottom.
Step 3 : Cut the rail to length
Measure the distance between the posts and cut the top and bottom rail to length.
Step 4 : Fasten rails to posts
Position the bottom rail and use galvanized deck screws to attach it to the posts. Predrill the holes when necessary. Do the same with the top rails.
Step 5 : Install the balusters
Place the balusters on the inside of the post so they are even spaced and mark their position. Then use fasteners to secure them to the top and bottom rails.
Step 6 : Trim posts
Install decorative post caps to the tops of posts with fasteners.