Skip to content
HeaterGuides
Tankless Water Heaters

Correct Tankless Water Heater Setup for Safe Installation

On this page 6 sections
  1. Correct Tankless Water Heater Setup
  2. Where The Unit Can Go Inside
  3. Water Lines And Service Valves
  4. Power, Gas, And Permits
  5. Mistakes That Cause Leaks Or Damage
  6. More Questions, Answered
The short fix
A correct tankless water heater setup means mounting the unit, sizing water and power or gas correctly, venting it the way the manual says, and pressure-testing every joint. A simple electric replacement can take a few hours; gas installs usually take most of a day and often need a licensed pro.

Get this wrong and you pay for it twice: once in extra labor, and again in leaks, cold showers, or a unit that short-cycles and never quite catches up.

The risky parts are always the same ones — venting, gas piping, electrical work, and the isolation valves that let you service the heater without draining half the house.

The essentials
A straight electric swap may be DIY if the circuit, breaker, and disconnect already match the heater’s nameplate.
Gas tankless units need correct venting, combustion air, and a gas supply that can actually feed the load.
Install full-port isolation valves so you can flush and service the heater later without cutting pipes.
If the job needs a new gas line, vent run, breaker, or permit, stop and call a licensed pro.
Leaks usually start at poor thread prep, missing gaskets, or skipping the pressure test.

Correct Tankless Water Heater Setup

A correct tankless water heater setup means shutting off water and fuel, mounting the unit level and secure, connecting hot and cold lines with service valves, then finishing the venting or electrical hookup before you pressure-test and power up. A straightforward electric replacement in the same spot can take a few hours if you’re comfortable with plumbing and basic wiring, but gas installs—especially ones that need a new gas line, upsized venting, or a 240 V circuit—usually take most of a day and often require a licensed plumber, electrician, or gas fitter to meet code.

a tankless water heater securely mounted and leveled on a wall
Ensure your tankless water heater is installed level and secure.
Safety before you start
Electricity at 240 V can kill. Gas leaks can ignite. Hot water above 120°F can scald in seconds. Improper venting on gas or propane units can fill a room with carbon monoxide. If you’re unsure about shutoff valves, wire sizing, or flue clearances, hire a licensed pro.

The order of work matters. Start by turning off the water supply and the circuit breaker or gas valve, then drain the old heater if you’re replacing one. Mount the new unit where it meets clearance rules and has room for service access. Connect the cold inlet and hot outlet with shutoff valves on both lines so you can isolate the heater later without draining the house. Finish the fuel side last—wiring for electric models, gas piping and venting for combustion units—then pressure-test every joint and check for leaks before you call the job done.

1
Shut off and drain
Turn off the main water shutoff or the branch valves feeding the old heater. Kill power at the breaker or close the gas valve. Open a hot-water tap downstream to relieve pressure, then disconnect the inlet and outlet lines and let the old unit drain into a bucket.
2
Mount level and secure
Mark the mounting holes using the template in the manual. Drill pilot holes and drive lag screws into studs or blocking, not just drywall. Hang the unit and check it with a level; a tilted heater can trap air and cause flow problems.
3
Connect hot and cold with service valves
Install a ball valve on the cold inlet and another on the hot outlet, using Teflon tape or pipe dope rated for potable water. Tighten each fitting with two wrenches to avoid twisting the pipes. Add a pressure-relief valve where the manual calls for one.
4
Finish venting or wiring, then test
For gas units, assemble the vent pipe with the joints sealed and sloped per the manual, then connect the gas line and check every joint with soapy water. For electric models, land the wires in the terminal block, matching line, load and ground. Close the water valves, turn on the supply, and watch for drips. Open the valves slowly, purge air from the hot side, then power up and confirm hot water at a tap.
When a swap becomes a full install
Say you’re replacing a 120 V point-of-use unit under the sink with a whole-house electric model rated for 27 kW. That unit draws about 112 amps at 240 V, so it needs a dedicated double-pole breaker, two hot legs, and 2-gauge copper wire from the panel. If your panel is already full or the wire run is longer than 50 feet, you’re looking at a service upgrade or a subpanel, both of which need a permit and a licensed electrician in most jurisdictions. The plumbing might be a weekend job; the electrical work is not.
New unit27 kW electric tankless
Current draw~112 A at 240 V
Wire size2 AWG copper
ResultPermit and pro required

Gas installs add venting and combustion-air rules that vary by model and local code. A direct-vent unit pulls air from outside and exhausts through a two-pipe system, which means cutting a hole in an exterior wall and sealing it carefully. Power-vent models use a fan and single-wall vent, but they need an electrical outlet nearby and clearance from windows and air intakes. If you’re switching from a tank heater with a 3-inch vent to a tankless that needs 4-inch PVC or stainless, you’ll be patching walls and possibly rerouting the flue. That’s when most DIYers call a pro.

12 to 24 inches
Typical clearance to combustibles
Most tankless heaters need a foot to two feet of clearance from wood framing, cabinets, and other combustibles. Check the manual’s diagram before you measure the install location.

Electric models skip the venting but rarely skip the panel work. Whole-house units pull between 80 and 150 amps, so they need heavy wire, a large breaker, and often a dedicated circuit that didn’t exist before. Point-of-use models under 10 kW can sometimes share a 40-amp circuit with other loads, but only if the panel has the capacity and the wire gauge matches the breaker size. If you’ve never landed wire in a breaker panel, this is the job to learn on with a licensed electrician standing next to you—or to hand off entirely.

In short
Mount it level, connect water lines with service valves on both sides, and test every joint before you power up. Electric installs you can do yourself stay simple when the circuit already exists; gas jobs almost always need a pro for venting, gas line work, or permits.

Where The Unit Can Go Inside

correct tankless water heater setup: Where The Unit Can Go Inside

Only indoor-rated tankless models belong inside a house. Gas units must vent the way the manual specifies—direct vent, power vent, or atmospheric—using listed materials. Outdoor, patio, or construction heaters have no place indoors; they lack oxygen depletion sensors and produce carbon monoxide without a proper flue path.

Pick a spot with service access and room for the venting run. Wall-mounted units need clearance to combustibles—typically 6 inches to the sides, 6 inches below, and 12 to 18 inches above, though the manual always governs. Gas models pull combustion air from the room or through a sealed vent; the former needs enough cubic feet in the space, the latter needs a clear path to an exterior wall. Electric units skip combustion air but still need clearance for the electrical junction and service panels.

LocationWhy It WorksWhat Goes Wrong
Interior wall near existing plumbingShort vent run, easy water tie-in, service accessNone, if clearances are met
Utility room or basementRoom for combustion air, space for ventingCold pipes if unheated; check for asbestos-wrapped old lines
Tight closet or alcoveSaves floor spaceCombustion air starvation on atmospheric models; no room to open the cover
Sealed garageClose to a shower or sinkBuilding code often prohibits combustion appliances in garages; exhaust fumes
Indoor wall mounting suits most homes; tight or sealed spaces cause code and safety trouble.
Old chimneys don’t fit modern units
A masonry chimney built for a tank heater or boiler is oversized and unconditioned for a tankless unit’s cooler exhaust. Condensation forms inside the flue, saturates mortar, and can crack the liner. Modern tankless heaters need direct-vent stainless steel or PVC vent pipe sized to the appliance, not a shared or legacy flue.

Gas units come in three vent flavors. Direct-vent models pull air from outside and exhaust back out through a coaxial or two-pipe system, so they work in closets and tight spaces. Power-vent units blow exhaust out through single-wall or Schedule 40 PVC using a fan, and they draw combustion air from the room. Atmospheric models vent up through a Type B flue and depend on natural draft; they’re rare in new installs and need the most clearance. Every vent joint must seal with listed connectors and slope upward at least a quarter inch per foot to drain condensate where the manual directs it.

Electric units skip the vent
Electric tankless heaters produce no combustion gases, so there’s no vent pipe to route. Mount them near the plumbing and breaker panel, and leave front clearance to open the cover and reach the heating elements. They’re simpler to place but draw heavy amperage—often two or three double-pole breakers—so check panel capacity before you commit to a spot.

Water Lines And Service Valves

correct tankless water heater setup: Water Lines And Service Valves

Hot and cold lines need full-port isolation valves so you can flush or remove the heater later without cutting pipe. These valves sit between the house plumbing and the unit’s inlet and outlet, and they let you shut off water to the heater while the rest of the house stays live. Most manufacturers call for 3/4-inch IPS threaded connections, though some compact electric models use 1/2-inch. Check the manual before you buy fittings.

full-port isolation valves installed between water lines and heater
Install isolation valves for easy maintenance and service.

Thread the cold service valve onto the inlet side and the hot valve onto the outlet. Wrap threads with PTFE tape, three turns clockwise, keeping the tape back from the first thread so nothing tears loose inside the valve. Tighten by hand, then a quarter turn with a wrench. Over-tightening cracks the brass body or distorts the gasket, and either mistake leaks within a week.

KAINGA Tankless Water Heater Service Valve Kit
For 3/4-inch IPS threaded connections
KAINGA Tankless Water Heater Service Valve Kit
This kit gives you hot and cold isolation valves, color-coded handles, and an integrated pressure relief valve rated to 150 PSI. The EPDM union gaskets and drain caps make future maintenance straightforward, and the lead-free brass meets potable water code.
Check today’s price

The pressure relief valve belongs where the manufacturer allows it—usually on the hot outlet or a tee near the heater. It opens when internal pressure climbs past its rating, typically 150 PSI, and prevents the tank or heat exchanger from rupturing. Route the discharge tube down and away, ending six inches above a floor drain or an exterior drain pan. Never cap, plug, or thread another fitting onto the relief valve outlet. Doing so turns a safety device into a bomb.

Plumbing prep
Correct thread size and type (IPS, NPT, or compression) for your unit
PTFE tape or approved pipe sealant, never both on the same joint
Union gaskets sized to match the valve bodies
Clear drain path for the relief valve discharge, sloped away from floors and walls
Enough clearance to turn valve handles and reach drain caps after install

Total install cost depends more on what you replace than what the heater costs. Upgrading from a tank means running new water lines, upsizing gas pipe or adding a 240 V circuit, venting through the roof or wall, pulling permits, and paying for inspection. A straightforward electric swap in the same spot with compatible lines might cost $800 to $1,200 in labor and fittings. Switching fuel type, moving the heater, or bringing an older house up to code can push the bill past $3,000 before the unit itself.

Leave service space
Mount the heater so you can reach every valve handle and drain cap without moving furniture or pulling the unit off the wall. You’ll flush the heat exchanger annually, and isolation valves save you from draining the whole house each time.
From HeaterGuides · our own guideTankless? Page 8 is the descaling routine, page 15 checks the size.Water Heater Owner's Toolkit: the printable guide and its Excel calculatorWater Heater Owner's ToolkitFix the common faults yourself, keep it running for years, and know when a repair is money wasted.No-hot-water flowcharts, gas and electricFlush, anode, relief valve and descaling stepsRepair-or-replace calculator (Excel)$14.99 $9.99Get it for $9.99See what's inside and watch the 2-minute video →18-page printable PDF + Excel calculator · instant download · 30-day refund

Power, Gas, And Permits

correct tankless water heater setup: Power, Gas, And Permits

Most electric tankless units draw between 80 and 150 amps at 240 V, which means a dedicated circuit, wire heavy enough to carry the load without heating up, and a breaker sized to the nameplate. Whole-house models often need two or three breakers on a single multi-pole setup. If your panel has no room for another breaker, or the service entrance is only 100 or 150 amps, you’ll need a panel upgrade or a subpanel before the heater can go in. That’s licensed electrician territory in most states, and it’s not a weekend project.

Wire sizing follows the National Electrical Code: 8 AWG copper handles 40 amps, 6 AWG handles 55, 4 AWG handles 70, and so on. Voltage drop matters on long runs, so add a size if the wire travels more than fifty feet from the panel. Aluminum wire needs one or two sizes larger for the same amperage. Use copper unless you know how to handle aluminum terminations correctly, because loose aluminum connections overheat and start fires. The nameplate on the heater lists the exact voltage, amperage, and wire size required. Match it.

Hire when unsure
If you have to ask whether the line or circuit is enough, measure it or hire it. Undersized wire overheats, undersized gas pipe starves the burner, and bad venting fills the house with carbon monoxide. All three cause injury.

Gas line sizing depends on pipe diameter, length, and the heater’s BTU input. A unit that burns 180,000 BTU per hour needs 3/4-inch black iron or CSST if the run is under fifty feet, and 1-inch pipe beyond that. The manual includes a sizing chart; follow it exactly. Combustion air and venting also follow the manual: category III and IV condensing heaters need PVC or stainless flue pipe, sealed intake and exhaust, and specific termination clearances from windows, doors, and property lines. A licensed plumber or HVAC tech knows these rules and has the tools to pressure-test gas joints and check draft.

Permits are required for gas line changes, venting work, and electrical panel upgrades in nearly every jurisdiction. Some towns also inspect the finished install before you can fire the heater up, and a few manufacturers void the warranty if you skip the permit. Call your local building department before you start, and plan on waiting a few days for the inspector. Vent-free gas heaters are banned outright in California, Massachusetts, and parts of New York; other states allow them but cap the BTU rating or require a carbon monoxide alarm in the same room. Check local code before you buy.

Who installs what
Electric tankless installs are often DIY-friendly if you already have the right circuit and breaker. Gas installs usually need a licensed plumber for the gas line and venting, and an electrician if the heater has a blower or control board that needs 120 V power. Mixing trades without permits is how inspectors red-tag jobs.

Mistakes That Cause Leaks Or Damage

correct tankless water heater setup: Mistakes That Cause Leaks Or Damage

Installing tankless water heaters fails most often at the joints: cross-threaded fittings, missing gaskets, vent parts from the wrong system, or skipping the pressure test before you close the walls. Mounting the unit where you can’t reach the service valves later turns a ten-minute flush into an afternoon of cutting and patching. Poor thread prep—dry threads on gas connections, no pipe dope on tapered threads—causes slow leaks that show up weeks after the install.

Hard water clogs the inlet filter and scales the heat exchanger, cutting flow and efficiency long before the warranty expires. Water above about 120 mg/L calcium carbonate (7 grains per gallon) needs a softener or at least annual descaling with vinegar or citric acid. Skipping the filter entirely lets sediment reach the heat exchanger and score the plates.

Myth
Tankless units are maintenance-free once installed.
Fact
Every tankless heater needs the inlet filter cleaned every few months and a vinegar flush once or twice a year in hard-water areas. Vents collect lint and need an annual check. Ignore that schedule and flow drops, error codes appear, and the heat exchanger fails early.

Water hammer—the bang when a valve closes fast—hits tankless units harder than tanks because there’s no air cushion. Arrestors at the hot and cold inlets stop the shock; without them, joints crack and internal sensors drift out of calibration. Vent runs need the clearances and slope the manual specifies: too close to combustibles, wrong pitch, or mismatched diameter all create backdraft or condensation pooling.

DIY saves
Labor on a straightforward electric swap runs $300 to $600; doing it yourself keeps that money.
You control the timeline and can stage the work around your own schedule.
DIY risks
One wrong vent joint or undersized wire can fail inspection, void the warranty, or create a carbon monoxide or fire risk that costs more to fix than the install would have.
Most places require a licensed plumber or electrician for gas connections, 240 V circuits, and venting; a homeowner permit doesn’t cover every step.
Pressure-test before you finish
Fill the lines, close the valves, and watch the gauge for ten minutes. A drop means a leak you can fix now with a wrench instead of drywall repair later.

More Questions, Answered

Can I install a tankless water heater myself?
You can install a small electric tankless unit yourself if you’re comfortable with plumbing, can verify the existing circuit handles the amperage, and local code allows it. Gas models require running new gas lines, upsizing the meter or regulator, venting to code, and pressure-testing every joint—work that most jurisdictions reserve for licensed plumbers and gas fitters. Check your local permit requirements before you start.
Who installs tankless water heaters?
Licensed plumbers handle the water lines, service valves and venting; electricians run new 240 V circuits and size the wire and breaker for the load. Gas tankless installs often need both a plumber for the unit and vent, and a gas fitter to upsize the meter and run the supply line. Some contractors hold both licenses and can finish the job in one visit.
What are the venting requirements for a gas tankless water heater?
Gas tankless heaters need category III stainless-steel vent pipe rated for the unit’s exhaust temperature, with every elbow and length from the manufacturer’s approved parts list. The vent terminates outside with clearances to windows, doors, and air intakes spelled out in the manual—usually at least 3 feet—and the exhaust must point away from combustible surfaces. Never mix vent parts from different systems or use single-wall pipe.
How much does tankless water heater installation cost?
Electric installs run $800 to $1,500 including the unit if the existing panel has space and capacity; a panel upgrade adds $1,500 to $3,000. Gas models cost $2,500 to $4,500 installed when the gas line, meter, and vent need upsizing, which most do. Condensing units with PVC exhaust cost less to vent than non-condensing models that need stainless; outdoor installations skip the vent and save a few hundred dollars.

Joye Editor

HeaterGuides covers home heating, water heating and HVAC: how the equipment works, what it costs to run, and how to use it safely.

More in Tankless Water Heaters