Observation suggests that the Earth's surface environment is maintained by processes in which non-living and living causes are linked inextricably. Once established on Earth, life rapidly became a dominant influence on the evolution of the planetary environment. But life was also shaped by that evolution, constrained and directed by the physical and chemical processes that moulded the planet's surface. Life and the planetary environment form a closely coupled entity, a view of the Earth as a complex system which is prefigured in the writings of James Hutton. Hutton compared the workings of the Earth's surface to the body of an animal, being both wasted and repaired continually. In modern times, James Lovelock has argued that it is a property of this system that it acts to maintain the planet in a habitable condition. Alternatively, perhaps it is pure chance that the planet has always remained hospitable for life-it could just as easily have followed an infinity of different evolutionary paths, many and perhaps most of which would lead rapidly to global extinction. Consideration of the fates of our near-neighbour planets, Mars and Venus, and the dangerous nature of the inner solar system, leads to the conclusion that there is indeed a substantial element of luck involved in the Earth's biosphere having survived as long as it has. The fact that our own existence is dependent on it having survived makes it nearly impossible to accurately assess a priori the probability of survival. Abstract models such as 'Daisyworld' can capture some of the complex behaviour of the Earth-life system. This may include periods of stasis and sudden changes to new states, the stasis being an example of regulatory behaviour where the system is dominated by negative feedback, and the sudden changes being essentially the opposite - brief but traumatic periods where the dominant feedbacks are positive. GEOCARB, a biogeochemical model for the Phanerozoic which links changes in the long-term carbon cycle to planetary temperature, shows examples of both regulatory and destabilizing behaviour in a less abstract system, and suggests that such responses have indeed characterized Earth history. I conclude that the properties of the Earth-life system are complex and not easily predictable. The longevity of Hutton's animal (nearly 4 Ga) is no guide to its future life expectancy, and even if the system as a whole lasts many aeons into the future, any given species (such as humans) is most unlikely to.