The purpose of this paper is to construct nontrivial MDS self-dual codes over Galois rings. We consider a building-up construction of self-dual codes over Galois rings as a GF(q)-analogue of (Kim and Lee, J Combin Theory ser A, 105:79-95). We give a necessary and sufficient condition on which the building-up construction holds. We construct MDS self-dual codes of lengths up to 8 over GR(3(2),2), GR(3(3),2) and GR(3(4),2), and near-MDS self-dual codes of length 10 over these rings. In a similar manner, over GR(5(2),2), GR(5(3),2) and GR(7(2),2), we construct MDS self-dual codes of lengths up to 10 and near-MDS self-dual codes of length 12. Furthermore, over GR(11(2),2) we have MDS self-dual codes of lengths up to 12.