||We investigate the thermodynamics of Einstein-Maxwell (-dilaton) theory for an asymptotically flat spacetime in a quasilocal frame. We firstly define a quasilocal thermodynamic potential via the Euclidean on-shell action and formulate a quasilocal Smarr relation from Euler's theorem. Then we calculate the quasilocal energy and surface pressure by employing a Brown-York quasilocal method along with Mann-Marolf counterterm and find entropy from the quasilocal thermodynamic potential. These quasilocal variables are consistent with the Tolman temperature and the entropy in a quasilocal frame turns out to be same as the Bekenstein-Hawking entropy. As a result, we found that a surface pressure term and its conjugate variable, a quasilocal area, do not participate in a quasilocal thermodynamic potential, but should be present in a quasilocal Smarr relation and the quasilocal first law of black hole thermodynamics. For dyonic black hole solutions having dynamic dilaton field, a non-trivial dilaton contribution should occur in the quasilocal first law but not in the quasilocal Smarr relation.