  We pursue a systematic treatment of the variational capacity on metric spaces
and give full proofs of its basic properties. A novelty is that we study it
with respect to nonopen sets, which is important for Dirichlet and obstacle
problems on nonopen sets, with applications in fine potential theory. Under
standard assumptions on the underlying metric space, we show that the
variational capacity is a Choquet capacity and we provide several equivalent
definitions for it. On open sets in weighted R^n it is shown to coincide with
the usual variational capacity considered in the literature.
  Since some desirable properties fail on general nonopen sets, we introduce a
related capacity which turns out to be a Choquet capacity in general metric
spaces and for many sets coincides with the variational capacity. We provide
examples demonstrating various properties of both capacities and
counterexamples for when they fail. Finally, we discuss how a change of the
underlying metric space influences the variational capacity and its minimizing
functions.
