The effect of confining boundaries on gravity currents in porous media is investigated theoretically and experimentally. Similarity solutions are derived for currents when the volume increases as tα in horizontal channels of uniform cross-section with boundary height b satisfying b ∼ a|y/a|n, where y is the cross-channel coordinate and a is a length scale of the channel width. Experiments were carried out in V-shaped and semicircular channels for the case of gravity currents with constant volume (α=0) and constant flux (α=1). These showed generally good agreement with the theory. Typically, we find that the propagation of the current is well described by L ∼ tc for some scalar c. We study the dependence of c on the time exponent of the volume of fluid in the current,α, and the geometry of the channel, parameterized by n. For all channel shapes, there exists a critical value of α,αc = 1/2, above which increasing n causes an increase in c and below which increasing n causes a decrease in c, where increasing n corresponds to opening up the channel boundary to the horizontal. The current height increases or decreases with respect to time depending on whether is greater or less than αc. It is this fact, along with global mass conservation, which explains why varying the channel shape n affects the propagation rate c in different ways depending on α. We also consider channels inclined at an angle Øto the horizontal. When the slope of the channel is much greater than the slope of the free surface of the current, the component of gravity parallel to the slope dominates, causing the current to move with a constant velocity, Vf say, regardless of channel shape n and flux parameter α, in agreement with results for a two-dimensional gravity current obtained by Huppert & Woods (1995) and some initially axisymmetric gravity currents presented by Vella & Huppert (2006). If the effect of the component of gravity perpendicular to the channel may not be neglected, i.e. if the slopes of the channel and free surface of the current are comparable, we find that, in a frame moving with speed Vf, the form of the governing equation for the height of a current in an equivalent horizontal channel is recovered. We calculate that the height of a constant flux gravity current down an inclined channel will tend to a fixed depth, which is determined by the channel shape, n, and the physical properties of the fluid and rock. Experimental and numerical results for inclined V-shaped channels agree very well with this theory.