I generalize the quasilocal formulation of thermodynamics of Brown and York to include dilaton theories of gravity as well as Abelian and Yang-Mills gauge matter fields with possible dilaton couplings. The resulting formulation is applicable to a large class of theories including two-dimensional toy models and the low energy limit of string theory as well as to many types of matter such as mass...