Tankless water heaters are typically smaller than traditional tank water heaters, so the options for their installation are usually more flexible. If you're replacing a conventional heater with a tankless heater in an existing home, you can simply put the new heater where the old one was, or you can take advantage of the greater flexibility to put the heater in a more convenient place. You must, however, be sure to follow the installation requirements specified by the heater's manufacturer.
Because they are mounted on the wall and don't take up floor space, tankless heaters can be mounted in small spaces such as closets, provided that the installation meets all requirements for clearance space around the unit, and they can be installed close to kitchens or bathrooms so that hot water can reach those places quickly. They can also be installed in attics, crawl spaces or other out-of-the-way places more easily than a large tank heater. Gas or propane heaters can be installed outside your home on an exterior wall; electric heaters generally must be installed inside unless they are fully enclosed to protect them from the elements.
Ventilation and Utilities
Tankless water heaters may be fueled by natural gas, propane or electricity. A gas- or propane-fired tankless water heater requires access to the gas supply, as well as to your home's electrical supply. Because the flame of a gas or propane unit produces toxic exhaust gases, the heater must be vented to the outside of your home, so it's best to mount it on a wall on the perimeter of the house, as opposed to wall in the interior, to minimize the cost and complexity of the venting system. An electric water heater does not require venting but obviously must be installed where there is access to electrical service.
To make the heater as safe as possible, you have to install it in a location with adequate clearances around the unit according to the manufacturer's instructions. The heater must be positioned the proper distance away from any combustible materials, walls or other structures. In addition to safety concerns, you should also take maintenance into consideration when you choose a location; there should be enough space around the heater to allow for easy access for repair and maintenance of the unit.
The water heater is, of course, connected to your home's water supply, and it's possible that the unit itself or the connections from the water supply to the heater will fail, resulting in a water leak. You shouldn't install the heater in a location where a leak will cause damage to the structure of the building or anything else in the vicinity of the heater. If damage is possible, a drain pan under the unit can reduce the risk; the pan must be installed so that it doesn't restrict air flow to the heater.