diff --git a/app/server.go b/app/server.go index eab1724698..2bf1d11cb2 100644 --- a/app/server.go +++ b/app/server.go @@ -525,11 +525,6 @@ func NewServer(options ...Option) (*Server, error) { s.setupFeatureFlags() }) - if s.joinCluster && s.Cluster != nil { - s.registerClusterHandlers() - s.Cluster.StartInterNodeCommunication() - } - // If configured with a subpath, redirect 404s at the root back into the subpath. if subpath != "/" { s.RootRouter.NotFoundHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { @@ -1162,6 +1157,11 @@ func (s *Server) Start() error { } } + if s.joinCluster && s.Cluster != nil { + s.registerClusterHandlers() + s.Cluster.StartInterNodeCommunication() + } + if err := s.ensureInstallationDate(); err != nil { return errors.Wrapf(err, "unable to ensure installation date") }