Deck Railing Installation on Cape Cod: Code, Cable, Salt Air

A deck railing on Cape Cod has two jobs, and most of the ones we replace were only ever built for one of them. The first is the one everybody sees: the guard that keeps a kid, a dog or a guest with a drink in hand from going over the edge. The second is the one the building code is written around: taking a hard shove from a grown adult at the top rail and sending that load into the deck frame instead of into two screws in the end grain of a rim joist.

The deck in the photo is one of ours, a second story deck and stair on a gray shingle Cape with a black aluminum rail system, white sleeved posts and a matching stair rail. Coast Carpentry Home Group installs and replaces deck railings across Barnstable County from our shop at 14 Parker Rd, Unit A in Osterville. Fagner Rodrigues holds the Massachusetts Construction Supervisor license every Coast job runs under, and this is how we build a rail that passes inspection the first time and still feels solid after ten winters of salt air.

Direct answer
Deck railing installation on Cape Cod means a guard at least 36 inches high on any deck more than 30 inches off the ground, openings a 4 inch ball cannot pass, posts bolted through the frame with blocking behind them, and stainless or coated hardware that salt air will not eat. Ask us to look at your deck.

Key takeaways

  • Massachusetts requires a guard on any deck surface more than 30 inches above the ground, at least 36 inches tall, with no opening that passes a 4 inch sphere.
  • A stair guard may drop to 34 inches measured from the tread nosings, and a flight with four or more risers needs a graspable handrail set between 34 and 38 inches.
  • Railing posts fail at the connection, not the post: through bolts into blocking with a tension tie on the inside, never lag screws into the rim alone, never a notched post.
  • Within sight of salt water, cable rail means 316 stainless cable and fittings, closer posts and a mid span spacer so the 4 inch rule still holds under hand pressure.
  • A railing on a deck that never had one, new posts or a change in height is permit work pulled under the contractor’s license; swapping a few balusters for the same thing is maintenance.

What does the Massachusetts code require for a deck railing?

Direct answer
The Massachusetts Residential Code requires a guard wherever a deck, landing or stair is more than 30 inches above the ground within 36 inches of the open edge. The guard must be at least 36 inches tall, openings cannot pass a 4 inch sphere, and a stair guard may be 34 inches measured from the nosings.

Massachusetts adopts the International Residential Code with its own amendments as 780 CMR, and the guard rules sit in section R312. The 30 inch trigger is measured straight down from the walking surface to the ground, anywhere within 36 inches of the open side, so a deck that steps down a sloped Cape yard can need a guard on the low side and not on the high side. The height is 36 inches above the decking. On the open side of a stair the guard can be 34 inches measured up from a line across the tread nosings, and where the top of that guard also serves as the handrail it has to land between 34 and 38 inches.

The opening rule is the 4 inch sphere. Nothing between the deck surface and the top of the required guard height can let a 4 inch ball through, which covers the baluster spacing, the gap under the bottom rail, and the space between the first post and the house wall. Stairs get two small allowances: the triangle formed by a tread, a riser and the bottom rail can pass a 6 inch sphere, and a stair guard can pass 4 3/8 inches. Insect screen is not a guard, so a porch rail behind screen still has to meet all of this on its own, which our guide to how a screened porch contractor on Cape Cod builds the knee wall covers in detail.

One more line in the code matters out here. Its wind table lists ultimate design wind speeds of 129 to 132 miles an hour for Sandwich, Barnstable, Mashpee, Falmouth, Yarmouth, Dennis and Chatham, and parts of those towns sit in the windborne debris region. A railing is not a wind design element, but the deck it sits on is, and the same code says every deck has to be positively anchored to the house with fasteners that cannot pull out. A loose rail post is usually the first sign the frame under it was never anchored right.

How do we anchor a railing post so it takes a shove?

Direct answer
We set every railing post inside the rim joist and bolt it through with two through bolts, solid blocking behind it and a tension tie on the inside, so a push at the top rail goes into the deck frame. Lag screws into the rim alone and notched posts are the two failures we replace most.

A guard post is a lever. A 36 inch post with a hand on the top rail multiplies whatever push it gets, and all of that force lands on the connection at the bottom. The wood deck guide the Massachusetts code accepts as an alternative method is the detail we follow: the post set against the inside of the rim, two through bolts with washers and nuts, blocking between the joists behind the post so the rim cannot roll outward, and a tension tie that hooks the post to the joist. On a rim that runs parallel to the joists, where there is nothing behind it, we add the hardware the connector makers sell for that exact spot rather than hoping the rim holds.

What we do not do is drive two lag screws through a rim into a 4×4 and call it done. A lag is a big wood screw. It bites end grain, it loosens as the treated lumber shrinks, and after a few winters the post moves in its pocket. We also do not notch a post over the rim, which turns a 4×4 into a 2×4 at the one spot that carries the whole load. When a homeowner tells us the rail “has always been a little loose”, that is almost always what we find when the fascia comes off.

Hardware is where salt air makes its own rules. We have opened decks in Hyannis where the boards were fine and the joist hangers had rusted to lace, and railing hardware goes the same way. Everything that touches treated lumber is rated for it, and anything within sight of salt water is stainless. Our guide to composite deck installation on Cape Cod covers the frame side of the same job, from the footings in loose sand to the ledger flashed into the shingles.

Is cable railing a good idea within sight of salt water?

Direct answer
Cable railing works on Cape Cod when the cable and every fitting are 316 stainless, the posts sit closer together than they would for pickets, and a vertical spacer breaks each long run so the cables cannot be pushed apart to a 4 inch gap. Cable sags when posts are too far apart, not because cable is a bad idea.

The cable rail on our mahogany deck at 84 Alden Drive disappears in front of the water, which is the whole reason people ask for it. The things that go wrong with cable are all spacing and material. The 4 inch rule is tested with the cable under tension, and horizontal cable spreads under a hand or a knee, so the runs stay short, the posts stay closer than they would for pickets, and we put a vertical spacer in the middle of any run the manufacturer rates as needing one. The cable is tensioned at install, checked again at the end of the first season once the posts have settled, and then every spring with the rest of the deck.

Material is not negotiable near the water. Grade 304 stainless is fine in a backyard an hour inland. On Nantucket Sound it tea stains in a season or two. Grade 316 cable, swages, turnbuckles and post fittings cost more and stay bright. A rinse with the hose when you wash the deck is the only upkeep. Aluminum posts in a marine grade powder coat pair with cable well. Wood posts work too, but every cable hole through a wood post is a place water sits, so the holes get sealed and the post gets a cap.

Aluminum, composite or wood rail on a shingled Cape?

Direct answer
Powder coated aluminum rail is the system we install most on composite decks because it keeps its finish without paint. Composite and PVC sleeved systems match a composite deck. Wood rail belongs on a wood deck, and mahogany is the wood we trust in salt air.

The black rail in the photo is an aluminum system with white sleeved posts, and the reason it is on a gray shingle house is that it looks like a traditional painted rail from the yard and never needs paint. Powder coated aluminum does not rust. The finish can chalk after years of full sun, which a wash brings back. Composite rail kits and PVC sleeves over a structural post match a composite deck board for board, and the trade is that the parts are bulkier than aluminum, so the view through the rail is narrower.

Wood rail is the right answer on a wood deck. Mahogany holds up in salt air and silvers if you let it. Pressure treated rail splits and checks within a few years out here, and a painted wood rail on a composite deck becomes the only thing on the deck you have to brush every other season, which is why we talk people out of that combination. Whatever the infill, the top rail is where the hands go, so on a wood system we run a continuous cap with eased edges. Our guide to building a low maintenance deck on Cape Cod goes through the upkeep on each material.

When is an existing railing a code problem at resale?

Direct answer
An old railing gets written up at a home inspection when it is under 36 inches, has gaps wider than 4 inches, moves when pushed, or has notched posts nailed to the rim. Massachusetts does not make you rebuild it until the deck is altered, but a buyer’s inspector will flag it and a lender can ask.

Plenty of Cape decks from the eighties and nineties were built with a rail lower than today’s 36 inches, balusters spaced wider than 4 inches, horizontal rails a child can climb, and posts notched and nailed to the outside of the rim. None of that would pass today. The code does not reach back and make an existing deck comply, but it does apply the moment the deck is altered, and a home inspector working for a buyer will photograph every one of those items. We get a steady run of calls each spring from sellers whose inspection report says the guard does not meet current standards, with a closing date a few weeks out.

The honest answer in that spot is a rail replacement, not a rail repair. Shimming an old post or screwing a second baluster between two wide ones leaves the height wrong and the post connection wrong, and it looks like what it is. New posts bolted inside the rim, a new rail system to height, and the stair rail done at the same time is a job we can usually fit inside that window. Our post on what a new deck costs on Cape Cod covers the bigger decision if the frame turns out to be the real problem.

Does replacing a deck railing need a permit on Cape Cod?

Direct answer
Replacing balusters or a top rail with the same thing is maintenance. New posts, a new rail system, a change in height, or a railing on a deck that never had one is a building permit, pulled under the contractor’s Construction Supervisor license. On Route 6A the historic district committee reviews what the street can see before the permit issues.

Every town building department on the Cape reads the line between repair and alteration a little differently, so we call with the address before we quote. The general shape is the same from Falmouth to Yarmouth: like for like repair of a few parts is ordinary maintenance, and anything structural, which a guard post is, goes on a permit. We pull it under Fagner’s license, which also means the work is inspected and the homeowner keeps access to the state’s guaranty fund if a registered contractor ever fails to finish. A homeowner who pulls their own permit gives that up.

North of Route 6 in Sandwich, Barnstable, Yarmouth, Dennis, Brewster and Orleans, the Old King’s Highway committee reviews exterior changes visible from the road, and a front or side rail on a 6A house can be one of them. A painted wood or black aluminum rail in a traditional profile goes through quietly. A cable rail facing the road is the kind of change that gets a conversation first. Our Mashpee deck builder page covers the association approvals that take the place of that review on the other side of the Cape.

What about the stair rail and a handrail you can actually grip?

Direct answer
A deck stair with four or more risers needs a handrail on at least one side, 34 to 38 inches above the tread nosings, continuous from top to bottom, with the ends returned to a post or wall. The grip has to be something a hand closes around, which a flat deck rail cap is not.

The stair is where most railings fail inspection even when the deck rail passes. The guard along the open side of the stair has its own height rule, and the handrail is a separate requirement with its own: at least one side, between 34 and 38 inches measured from the line of the nosings, continuous for the whole flight, and finished at the ends so a sleeve or a bag strap cannot catch. The code also defines what graspable means. A round rail between 1 1/4 and 2 inches across qualifies, and so do shaped profiles with a finger recess. The wide flat cap that looks right on the deck rail does not qualify on the stair, so on a wood system we add a separate grip rail, and on an aluminum system we spec the stair rail the manufacturer makes for the job.

On a second story deck like the one in the photo the stair carries more traffic than the deck, and it is where ice sits in February. We set the stair posts the same way as the deck posts, through bolted into the stringers and blocking, and we build the landing at the bottom on footings below frost rather than a pad that heaves and racks the whole rail by March.

When should you not pay us to replace a railing?

Direct answer
Two loose balusters and a wobbly cap are a Saturday with a drill, and we will tell you so on the phone. The other time to hold off is when the frame under the rail is soft: a new railing bolted to a rotten rim is money spent twice, so we quote the frame instead.

We get asked to quote rail jobs that are a handful of screws, and we say so. If the posts are solid and one baluster is loose, tighten it. If the whole rail moves when you lean on it, the problem is at the bottom of the posts and that is our job. The second case is the one that matters. When we pull the fascia to bolt new posts and the rim joist is punky, or the ledger behind the deck is wet, the railing stops being the job. A guard post is only as strong as what it is bolted to, and we would rather lose the rail work and quote the frame than put a new rail on a deck we would not let our own crew lean on. Our post on building a storm resistant deck covers what that frame should look like on the Cape.

Ready for a railing that passes the first time?

Coast Carpentry Home Group installs and replaces deck railings across Cape Cod, from Falmouth and Mashpee to Sandwich, Barnstable, Hyannis and Yarmouth, with a lifetime workmanship warranty on the work. Request a railing quote, see our Cape Cod deck installation services, or read what neighbors say on our reviews page.

Frequently asked questions

How high does a deck railing have to be in Massachusetts?

A required deck guard in Massachusetts is at least 36 inches tall, measured from the deck surface. A guard on the open side of a stair can be 34 inches measured from a line across the tread nosings, and where that guard also serves as the handrail it must sit between 34 and 38 inches. A guard is required wherever the deck, landing or stair is more than 30 inches above the ground within 36 inches of the open edge.

Can cable railing pass code on Cape Cod?

Yes. Massachusetts allows horizontal cable infill as long as no opening passes a 4 inch sphere with the cable under tension and the guard is at least 36 inches tall. On the Cape that means 316 stainless cable and fittings, posts set closer than a picket rail, a vertical spacer on longer runs, and a re-tension after the first season. A cable rail that sags or spreads under a knee fails the 4 inch rule.

How far apart should deck railing posts be?

Post spacing is set by the rail system’s rated section length and by the infill. Posts always land at every corner, on both sides of the stair and on both sides of a gate, and the sections between them never run longer than the manufacturer rates. Cable systems run shorter sections than picket systems because the cable has to stay tight enough to hold the 4 inch rule. Every post is through bolted into blocking, never lagged to the rim alone.

Do I need a permit to replace a deck railing in Massachusetts?

Replacing a few balusters or a top rail with the same parts is ordinary maintenance. New posts, a new rail system, a change in guard height, or adding a railing to a deck that never had one is an alteration that goes on a building permit, pulled under the contractor’s Construction Supervisor license. Cape towns read the line a little differently, so Coast Carpentry Home Group calls the building department with the address before quoting. On Route 6A in the Old King’s Highway district the historic committee reviews a rail the street can see.

What deck railing lasts longest near salt water on Cape Cod?

Powder coated aluminum rail with stainless fasteners, or 316 stainless cable on aluminum posts, lasts longest within sight of salt water on Cape Cod and needs only a rinse. Composite and PVC sleeved systems hold up well too. For a wood deck, mahogany outlasts pressure treated rail by years. Plain steel and ordinary galvanized hardware rust streak and fail early on the water side of the Cape, so every connector and fastener is rated for treated lumber and salt exposure.

We serve Cape Cod, Massachusetts

Coast Carpentry Home Group works across all 15 Cape Cod towns, from Bourne out to Provincetown. We do not take projects outside the Cape.

On the Cape and looking for an estimate? Call (508) 360-9658 or send us a message.

Planning a new deck this season?

Coast Carpentry Home Group provides deck installation on Cape Cod. Licensed, insured, and local, with 25+ years of experience. Call (508) 360-9658 for a free estimate.

Related Articles