FloatRail is an interesting method to protect boats from sinking. It is installed inside a small rail just above the water line or hidden in a recess of the hull during boat manufacture. The complete system is fully patented. It is manufactured from marine grade materials of modular design with scalable architecture. The system is activated manually or automatically. A patented automatic float switch is installed inside the hull. When a boat takes on water and it reaches a preset level, the hydrostatic pressure of the water trips the mechanical valve, which automatically deploys the system. The FloatRail electronic control system supplements the basic automatic mechanical system. The electronic control system provides self-diagnostics for reliability assurance. It also allows for multiple and redundant sensors and early warnings. When sensors detect certain threats to the vessel, such as water in the hull or stability problems, it first provides a warning, and then, at higher detection levels, automatically deploys the system. It can also automatically notify the coast guard or preset phone numbers. When the system is deployed, compressed gas is released, the small bags inflate and the cover is removed. The large buoyancy bags then inflate with compressed gas. The inflated bags broaden the beam, stabilize the boat, and stop the boat from sinking. Smaller bags then force the flotation bags into the water, further raising the boat. The bags can be set to inflate at any speed from seconds to minutes, depending on the requirements of the vessel.