We consider the behavior of the nonlocal minimal surfaces in the vicinity of the boundary. By a series of detailed examples, we show that nonlocal minimal surfaces may stick at the boundary of the domain, even when the domain is smooth and convex. This is a purely nonlocal phenomenon, and it is in sharp contrast with the boundary properties of the classical minimal surfaces. In particular, we show stickiness phenomena to half-balls when the datum outside the ball is a small half-ring and to the side of a two-dimensional box when the oscillation between the datum on the right and on the left is large enough. When the fractional parameter is small, the sticking effects may become more and more evident. Moreover, we show that lines in the plane are unstable at the boundary: namely, small compactly supported perturbations of lines cause the minimizers in a slab to stick at the boundary, by a quantity that is proportional to a power of the perturbation. In all the examples, we present concrete estimates on the stickiness phenomena. Also, we construct a family of compactly supported barriers which can have independent interest.