I think all of this sort of logic exists in `server/config.go`