We introduce a three-dimensional analytical model of a coronal flux rope with its ends embedded in the solar surface. The model allows the flux rope to move in the corona while maintaining line-tied conditions at the solar surface. These conditions ensure that the normal component of the coronal magnetic field at the surface remains fixed during an eruption and that no magnetic energy enters the corona through the surface to drive the eruption. The model is based on the magnetic configuration of Titov & Démoulin, where a toroidal flux rope is held in equilibrium by an overlying magnetic arcade. We investigate the stability of this configuration to specific perturbations and show that it is subject to the torus instability when the flux rope length exceeds a critical value. A force analysis of the configuration shows that flux ropes are most likely to erupt in a localized region near the apex, while the regions near the surface remain relatively undisturbed. Thus, the flux rope will tend to form an aneurysm-like structure once it erupts. Our analysis also suggests how the flux rope rotation seen in some eruptions and simulations may be related to the observed orientation of the overlying arcade field. This model exhibits the potential for catastrophic loss of equilibrium as a possible trigger for eruptions, but further study is required to prove this property.