  A code over a finite alphabet is called locally recoverable (LRC code) if
every symbol in the encoding is a function of a small number (at most $r$)
other symbols of the codeword. In this paper we introduce a construction of LRC
codes on algebraic curves, extending a recent construction of Reed-Solomon like
codes with locality. We treat the following situations: local recovery of a
single erasure, local recovery of multiple erasures, and codes with several
disjoint recovery sets for every coordinate (the {\em availability problem}).
For each of these three problems we describe a general construction of codes on
curves and construct several families of LRC codes. We also describe a
construction of codes with availability that relies on automorphism groups of
curves.
