This is an extension of a question I asked [here on Math.SE](https://math.stackexchange.com/q/3251019/274352)

----------

Assume that I have a finitely generated residually finite centerless group $G$. Is it true that the profinite completion $\hat{G}$ also has trivial center? 

In the linked question, user YCor was able to show that this **fails** in general if you do not assume either finite generation or residually finite. However, the result happens to be true if $G$ is a surface group. I’d like to know if this is a phenomenon specific to surface groups, or if this is a more general fact.