Running a private well alongside mains water: how to design a villa system with both
Plenty of villas on Koh Samui have a well and a mains connection. The question is not which one to keep — it is how to connect two sources so they back each other up without fighting, without contaminating anything, and without anyone having to be home to switch valves.
October 19, 2026 · 10 min read
Whether a villa should rely on a well or on the water authority is a decision we cover in private well vs municipal water. This guide starts after that decision, at the point where a property has both and somebody has to join them up. Done well, two sources give a villa a supply that keeps going through a mains outage, a dry-season dip in the well, or a pump failure. Done carelessly, two sources give you a tee fitting that leaks well water into the public network, a float valve that quietly runs the mains meter for a month, and pressure that changes depending on which source happens to be winning.
Start by deciding which source is primary
Every dual-source design begins with one question: which source does the villa normally drink from, and which one waits in reserve? The answer sets the control logic, the tank size and where any treatment goes, so it is worth settling before a single fitting is bought.
Well primary, mains backup. The usual choice where the well yields comfortably and the mains supply is intermittent, low-pressure or metered expensively. The well does the daily work; the mains tops up the tank only when the well cannot keep up.
Mains primary, well backup. Sensible where mains is reliable and cheap, and the well is marginal in the dry season, slightly brackish, or high in iron. The well runs only when the mains fails or is shut off, which also keeps a marginal bore from being overworked.
Split duty. Mains for the house, the well for the garden, pool top-up or construction water. This is really two separate systems that share a plot, and it is often the cleanest answer for a well whose water you would rather not drink.
Priority can change with the seasons. A coastal well that is fine in September may be the backup by March, when the level drops and salinity creeps up. A design that lets the owner swap priority with two valves and a switch, rather than a plumber's visit, pays for itself in the first dry season.
The storage tank is where the two sources should meet
The core rule of a dual-source villa is simple: both sources discharge into the storage tank, and nothing else. Neither source is piped into the other, and neither is piped straight to the taps. The tank is the break between two systems that have nothing in common. The mains arrives at whatever pressure the street happens to have that hour; the submersible pump arrives at whatever head it was sized for. The mains water is already chlorinated; the well water may need treatment. The mains may deliver for two hours a night; the well delivers whenever the pump runs. A tank absorbs all of those differences, and it does so with no moving parts. How a tank fits into the rest of the plant is covered in how a villa water system works.
Most villas want one shared tank, sized for the house's normal reserve plus the longest outage you expect of the primary source. Our guide to storage tank size has the arithmetic. Separate storage makes sense in two cases: when the well water needs treatment before it can be mixed with anything (an iron-rich bore feeding a drinking tank, for example), or when the well serves only the garden and pool and should never touch the house line at all.
Why teeing two pressurised lines together is poor design
The shortcut we are asked to undo most often is a tee: the mains pipe and the pump's delivery pipe joined into one line to the house, usually with a check valve on each leg and a ball valve to pick a source. It works on the day it is installed. Then one of three things happens. The pressures fight: whichever source is higher at that moment pushes back against the other, the check valve on the losing side carries the whole load, and check valves do wear out. Or the pump runs against a closed system because the mains is holding the line full, and cycles itself to death. Or, worst of all, the check valve on the mains leg fails and the well pump pushes untreated groundwater back up the service pipe into the public network.
That last case is what water engineers call a cross-connection, and backflow through it is the reason supply authorities everywhere dislike private sources being plumbed into their pipes. Backflow has two causes. Backpressure is a private system that is at higher pressure than the supply, which is exactly what a well pump creates. Backsiphonage is the supply pressure dropping, during a burst main or a big fire draw, and pulling water back out of every connected property. A check valve is not a backflow preventer; it is a mechanical device that fails quietly. The only protection that cannot fail is a physical gap of air between the end of the mains pipe and the water it is filling. That is the air gap, and it is why the mains should end above the tank, not inside the villa's pipework.
Protected fill: air gap, float valve, solenoid
A protected fill is the mains inlet discharging into the top of the tank through open air, with the end of the pipe clearly above the highest level the water can ever reach, including the overflow level. The usual engineering rule is a gap of at least twice the pipe diameter and never less than about 25 mm; on a 25 mm mains inlet we leave 50 to 75 mm. That gap, not any valve, is what keeps the tank's contents out of the mains. Everything else on the inlet is about control, not protection.
The simplest control is a mechanical float valve on the inlet: the ball rides on the water, the valve closes as the tank fills. It needs no electricity and it fails in a predictable way. The step up is a solenoid valve wired to a float switch in the tank, which gives a precise, adjustable fill level and lets a controller decide when the mains is allowed to run. Either way, the inlet should also have a manual isolation valve, a strainer, and a bypass so the float valve or solenoid can be serviced without cutting the mains to the whole property.
A protected fill on a shared tank. The mains inlet ends above the water with an air gap; the float valve and solenoid control when it runs; the bypass loop lets either be serviced without shutting the mains.
Level control and source priority
Priority is set with two levels in the tank, not with a selector switch. With the well as primary, the pump controller fills the tank to its high level. The mains solenoid only opens when the water drops below a lower reserve level, which only happens if the well has been unable to keep up. On a normal day the mains never runs. During a dry spell, or while the pump is out, the mains quietly takes over at the reserve line and the house never notices.
With the mains as primary the logic flips. A float valve holds the tank full from the mains. The well pump is only allowed to start if the level falls to the reserve line, which means the mains has failed. Because that pump may then sit unused for months, it needs the full electrical protection a well pump should have anyway, especially dry-run protection, and a monthly test run so the day it is needed is not the day you discover it has seized.
System schematic
Well and mains feeding one villa
Both sources break to the storage tank through the air; one booster pump feeds the house. Below: the tee that should not exist, and the layout that should.
1
Well and submersible pump
Delivers into the tank at whatever rate the bore sustains, controlled by the tank's high level and the pump's own protection.
2
Mains meter, isolation valve and solenoid
The mains is controlled here, before it reaches the tank. The solenoid opens only when the controller allows it.
3
Air-gap inlet (protected fill)
The mains pipe ends above the highest possible water level. This gap, not a valve, prevents backflow into the public supply.
4
Level control
A float valve or float switch sets the fill level; a second, lower reserve level is where the backup source is allowed to start.
5
Storage
The buffer that lets two sources with different pressures, timings and water quality supply one house.
6
Booster pump and pressure vessel
One pump set draws from the tank and gives the house constant pressure, whichever source filled it.
7
Villa
Taps, showers and appliances see one pressure and one water, and never see a source change.
8
Bad: two pressurised lines teed together
Pressures fight, check valves wear, the pump short-cycles, and a failed check valve lets well water into the mains.
9
Better: both sources break to the tank
The air gap protects the mains, the tank absorbs the differences, and one booster pump does the house.
Backflow protection rules and the authority's requirements for private sources vary by supplier and are not covered here; the air-gap principle is accepted everywhere.
Manual or automatic switching
Manual switching is two labelled valves and a note on the wall. It is cheap, it has nothing to fail, and it is fine for a backup that is used a few times a year, provided someone is on site when the primary source stops. For a rental villa, or an owner who is away for months, that proviso does not hold, and the first anybody hears of a failed well pump is a guest with no shower. Automatic switching, through the two-level logic above, removes the person from the loop. Keep the manual valves anyway. The override that lets an owner force one source, and the bypass that lets a technician take the solenoid out, are what make the automatic system serviceable.
Whichever you choose, test the switch-over, not just the normal state. Close the primary source and watch the backup take over at the reserve level. If the changeover has never been exercised, it is not a backup, it is a hope.
One booster pump feeds the house
Because both sources end in the tank, the house is fed by one booster pump drawing from it, usually with a pressure vessel and a pressure switch or variable-speed controller. This is the single biggest practical benefit of the layout: the villa's pressure is set by one pump and never changes when the source does. A house plumbed straight off the mains on some days and off a submersible pump on others gets a different shower every week, and the sort of pressure complaints we diagnose in low water pressure in a villa. The booster also makes the mains-pressure question irrelevant: it does not matter that the street gives 1.5 bar at night, because the house never sees street pressure.
Treatment: the two waters are not the same
Mains water arrives treated and chlorinated. Well water arrives as the aquifer made it, which on Samui can mean iron, manganese, hardness, sediment or salinity, and it should be tested before anyone decides what it needs. Where that treatment sits depends on the result. Iron and sediment are usually dealt with on the well line, before the tank, so they never accumulate in the storage. Disinfection and polishing are usually on the common line after the booster, where they treat whichever water is in the tank. What you should not do is assume the mains makes the well water fine by dilution, or that the well's filtration can simply be left in a mains-fed line: a filter sized for well water flow and chemistry does different things with chlorinated mains water. Our guide to whole-house filtration design explains how a treatment train is laid out.
Failure modes worth designing for
The point of two sources is resilience, so the design should be checked against the things that actually go wrong on the island.
Mains outage. The tank's reserve volume is the only thing covering it; size the reserve for the longest outage the street has actually had, not the one the supplier promises.
Well pump failure or dry run. Dry-run protection on the pump and an automatic changeover to the mains keeps the taps running while the pump is repaired.
Float valve stuck open. The tank overflows at the mains' expense. Every tank needs an overflow pipe to a safe drain, and the meter is worth glancing at monthly.
Solenoid stuck closed, or a dead controller. Both backup paths fail silently; the manual bypass is the way around them.
Both sources stopped at once. A regional power cut stops the pump; the mains may also depend on pumping. The tank and its reserve are the answer, which is why the dry-season plan for the reserve matters.
Seasonal salinity. A coastal well may need to be demoted to backup for the dry months; make that a valve-and-switch job, not a rebuild.
Maintenance bypass and a drawing on the wall
Every source line should be isolatable on its own, with a bypass around any valve that will need servicing. Label the valves with what they do, not what they are, and leave a one-page schematic in the plant room: which source is primary, where the reserve level sits, what happens when each source fails, and who to call. The owner who inherits the villa, or the manager who takes it over next season, should be able to understand the system without tracing pipes.
If you are joining two sources or inheriting a system somebody else joined, our villa water systems team designs the storage, control and booster side so both sources work for the house rather than against each other.
Common questions
Can I just connect the well pump and the mains to the same pipe with a check valve on each?
You can, and it will work until a check valve wears or the pressures start fighting. The failure modes are a pump that short-cycles, a mains meter that runs backwards, or well water pushed into the public supply. The safe design puts both sources into a storage tank through an air gap and feeds the house from one booster pump.
Which should be the primary source, the well or the mains?
Usually the one that is cheaper and more reliable in your location. A good well with intermittent mains makes the well primary; reliable mains with a marginal, seasonal or brackish well makes the mains primary. The design should let you swap priority with valves and a switch rather than a rebuild.
Does the mains need a float valve or a solenoid valve?
A mechanical float valve is the simplest and needs no power. A solenoid valve with a float switch gives an adjustable fill level and lets a controller hold the mains back until the well has had its chance. Either way, keep the air gap, an isolation valve and a bypass on the inlet.
Do I need separate filtration for the well water and the mains water?
Mains water arrives treated; well water may need iron, sediment or hardness treatment, decided by a laboratory test. Well-specific treatment usually sits on the well line before the tank; disinfection and polishing sit on the common line after the booster pump, where they treat whichever water is in the tank.