Maximum principle of harmonic function on compact manifold Theorem (Maximum Principle).  Let $h$ be a harmonic function on a domain $D$ in $C$.
  
  (a) If $h$ attains a local maximum in $D$, then $h$ is constant.
  
  (b) Suppose that $D$ is bounded and $h$ extends continuously to the boundary $\partial D$ of $D$. If $h\leq 0$ on $\partial D$, then $h\leq 0$ on $\overline{D}$.


The above is a very well known result. 

Can anyone please suggest a reference of maximal principle for harmonic function on compact Riemannian manifold with boundary? I only need it for dimension 2 
manifold.
I found a paper online which may be helpful for your question. The link is: https://projecteuclid.org/download/pdf_1/euclid.ojm/1353054807
I found a paper online which may be helpful for your question. The link is: https://projecteuclid.org/download/pdf_1/euclid.ojm/1353054807