Server side of #46.