The Water Heater Guide

Installation & code

Gas Water Heater Tank Installation: Venting, Gas Line and Code

Updated November 30, 2026By the The Water Heater Guide editorial team
Gas hot water tank installation

A complete gas hot water tank installation is more than setting a new tank where the old one stood and reconnecting pipes. It includes a gas line sized for the appliance, venting that carries combustion gases outdoors, adequate combustion air, a drain pan where required, a relief valve with a proper discharge pipe, anchoring, and a permit.

What a complete gas hot water tank installation includes

The tank is only one part of the job. A complete install connects water and gas, runs the vent, sets up the relief valve discharge, and adds any drain pan, anchoring and permit work your location requires. Capacity matters too. The First-Hour Rating, from the federal test procedure (10 CFR 430, Appendix E), helps you compare sizes, as explained in the FAQ below.

Each part follows its own rules, so a quote that only says install one gas water heater leaves important work unclear. Ask the installer to list every item in writing before you compare prices.

Sizing the gas line

The gas line must deliver enough fuel to the burner at the new heater's rated input. Pipe size depends on that rating, the total length of the run, the number of fittings, and every other gas appliance on the same line, such as a furnace, range or dryer. A larger replacement can need a larger line, so compare the rating plates of the old and new units.

Ask how the installer sized the line and whether the existing pipe was checked for leaks and corrosion. A complete scope usually includes:

  • A shutoff valve within reach of the water heater, so you can isolate it later.
  • A sediment trap (also called a drip leg) at the gas inlet to catch debris before it reaches the controls.
  • A flexible connector rated for gas use, if one is used, with no kinks or strain on the fittings.
  • A leak test on every new joint before the gas is turned back on and the burner is lit.

Venting the combustion gases

A gas burner produces combustion gases, including carbon monoxide, and the vent must carry them outdoors. A shortcut here creates a hazard you cannot see or smell, so venting deserves close attention during the job and at the final inspection.

  • The vent rises continuously from the heater to the outdoors, with no sags or low spots where condensation can collect.
  • The vent size and material match the new appliance, and the diameter is not reduced.
  • Every joint is fastened so it cannot separate under the heater's draft.
  • The vent termination stays clear of windows, doors and air intakes, as your local code requires.

Ask whether the existing vent is reused or replaced, and why.

Combustion air and the room

The burner pulls air from the space around it. A heater in a small, sealed closet can struggle to get enough air, which leads to incomplete combustion. Most installations provide openings or ducts that bring air from inside the home or from outdoors.

Keep those openings clear of stored items. Keep solvents, paint and cleaning chemicals away from the heater, since their vapors can enter the burner air.

Drain pan and relief valve piping

Drain pan

Where a leak would reach living space, such as an upstairs closet, an attic or a finished room, the tank should sit in a drain pan. The pan needs a drain line that carries water to a suitable floor drain or exterior location. Ask whether your local rules require a pan for this location.

Relief valve discharge pipe

The temperature and pressure relief valve protects the tank from dangerous buildup. Its discharge pipe must follow these rules, as summarized by the International Code Council from the 2021 editions of the International Plumbing Code (section 504.6) and International Residential Code (section P2804.6.1):

  • It must not connect directly to the drainage system.
  • It must end in an air gap in the same room as the heater.
  • It must be no smaller than the valve outlet.
  • It must not be trapped, and it must drain by gravity.
  • It must end no more than 6 inches above the floor or a waste receptor.
  • It must have no threaded end, and no valves or tees.
  • The pipe must be rated for 100 psi at 180°F.

The valve must never be capped or plugged. A plugged valve cannot relieve pressure, so the tank loses that protection.

Anchoring and seismic bracing

A tank that tips or shifts can break its gas and water connections. In California, Health and Safety Code section 19211 requires water heaters to be anchored or strapped to resist falling or moving in an earthquake. Sellers must also certify to buyers that the water heater is braced, according to Cal OES.

Outside California, rules vary, so ask your local building department. Even where no rule applies, straps and mounting hardware are a reasonable part of a complete install. Ask whether the quote includes them and where the straps will attach, since fastening to wall framing is stronger than fastening to drywall alone.

Garage and location rules

Where the heater sits matters as much as how it is set. In a garage, the International Residential Code (sections P2801.7 and M1307.3) requires the ignition source of appliances to be at least 18 inches above the floor, as cited by the North Carolina State Fire Marshal. Some states have exceptions, so the rule that applies to you depends on your location.

If the installer proposes a platform or a different location, ask how the height was determined and which local rule it follows.

Working through the permit process

Many jurisdictions require a plumbing permit to install or replace a water heater. The City of San Diego, for example, states that a plumbing permit is required for the installation of a water heater, including replacements. Rules differ by city and county, so check with your local building department before the work starts.

  1. Call the building department and ask whether a gas water heater replacement needs a permit.
  2. Ask who may pull the permit, and whether it covers the gas and venting work as well as the plumbing.
  3. Have the installer submit the application with the equipment details and the planned vent and gas work.
  4. Schedule the required inspection before the work is covered up or put back into service.
  5. Keep the permit and final inspection record with your home papers.

What to check before you compare quotes

Get at least two written quotes and compare them line by line. Use this checklist to make sure every gas hot water installation quote covers the same items:

  1. Gas line sizing, and whether the existing pipe was tested.
  2. Vent type, material and termination, and whether the vent is reused or replaced.
  3. How combustion air reaches the space.
  4. The drain pan, its drain line, and a relief valve discharge pipe that meets the rules above.
  5. Straps, anchors and mounting hardware.
  6. Who pulls the permit, and whether the final inspection is included.

Also ask about haul-away of the old tank, any code upgrades, and warranty registration. Check the contractor's license with the state licensing board where licensing applies.

When to stop and call a professional

Checking that the area is clear and that the vent is intact are reasonable homeowner tasks. Gas connections, vent changes and wiring belong with a qualified installer.

Safety first: If you smell gas, leave the home and call the gas utility or 911 from outside. Before touching any wiring, turn off the breaker and verify the power is off with a tester.

Keeping the new installation safe to use

The U.S. Department of Energy recommends setting the water heater to 120°F, a temperature considered safe for most of the population. People with a compromised immune system or chronic respiratory disease may want to keep it at 140°F, according to the DOE Energy Saver Guide.

The CPSC notes that third-degree burns can occur after about 2 seconds at 150°F, 6 seconds at 140°F, 30 seconds at 130°F, and 5 minutes at 120°F. The CPSC also recommends carbon monoxide alarms on every level of the home and outside sleeping areas, and you should test them regularly. According to the DOE, most storage (tank) water heaters last 10 to 15 years, so plan the next replacement with that in mind.

Frequently asked questions

Do I need a permit to replace a gas water heater?

Many jurisdictions require a plumbing permit to install or replace a water heater, and the City of San Diego states that one is required for replacements. Rules differ from city to city and county to county, so check with your local building department before the old tank comes out. Ask whether the permit covers the gas and venting work, and who may pull it. Final inspection confirms the work before the system goes back into service.

Can the existing gas line and vent be reused?

Sometimes, but do not assume it. The installer should compare the new unit's rating with the capacity of the existing gas line, and inspect the pipe for leaks and corrosion. An old vent may be corroded, undersized or routed for a different appliance. Ask the installer what was checked, and why any part was kept or replaced.

Why does the relief valve need an open discharge pipe?

The discharge pipe is the exit path when the valve opens to relieve pressure or temperature. Under the International Plumbing Code and International Residential Code summaries, it must end in an air gap in the same room, drain by gravity, and never connect directly to the drainage system. Capping or plugging the valve removes that protection, so the tank cannot relieve excess pressure. Threaded ends, valves and tees are also not allowed on the pipe.

Does the age of my gas water heater affect a garage install?

It can. According to the CPSC, flammable vapor ignition resistant (FVIR) gas water heaters made after July 1, 2003 resist igniting flammable vapors, which matters when a garage holds gasoline, paint or other vapor sources. Check the manufacture date on the existing unit's label. Whether a new unit must sit at a set height or qualifies for a state exception is a question for your building department.

How do I know what size heater my home needs?

Start with the First-Hour Rating, from the federal test procedure (10 CFR 430, Appendix E). It estimates the maximum volume of hot water a storage heater can supply within an hour, starting fully heated. Compare that figure with the hot water your household uses during its busiest hour, such as morning showers. Ask the installer to explain how the recommended size was reached.

Need a pro? See businesses that install and repair water heaters in your metro area. Ask for at least two written quotes and check the contractor's license with your state where it applies.