We use the Fokas method to analyze the derivative nonlinear Schr¨odinger (DNLS) equation iqt(x, t) = −qxx(x, t)+(rq2)x on the interval [0, L]. Assuming that the solution q(x, t) exists, we show that it can be represented in terms of the solution of a matrix Riemann-Hilbert problem formulated in the plane of the complex spectral parameter ξ. This problem has explicit (x, t) dependence, and it has jumps across {ξ ∈ C|Imξ4 = 0}. The relevant jump matrices are explicitely given in terms of the spectral functions {a(ξ), b(ξ)}, {A(ξ), B(ξ)}, and {A(ξ), B(ξ)}, which in turn are defined in terms of the initial data q0(x) = q(x, 0), the boundary data g0(t) = q(0, t), g1(t) = qx(0, t), and another boundary values f0(t) = q(L, t), f1(t) =qx(L, t). The spectral functions are not independent, but related by a compatibility condition, the so-called global relation.