  We present a variational formulation of Einstein-Maxwell-dilaton theory in
flat spacetime, when the asymptotic value of the scalar field is not fixed. We
obtain the boundary terms that make the variational principle well posed and
then compute the finite gravitational action and corresponding Brown-York
stress tensor. We show that the total energy has a new contribution that
depends of the asymptotic value of the scalar field and discuss the role of
scalar charges for the first law of thermodynamics. We also extend our analysis
to hairy black holes in Anti-de Sitter spacetime and investigate the
thermodynamics of an exact solution that breaks the conformal symmetry of the
boundary.
