diff --git a/cmd/root.go b/cmd/root.go index 9ab5d27942..283cb01737 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -189,11 +189,6 @@ func runRoot(cmd *cobra.Command, args []string) { err = configureEnvironment(cmd, &conf) } - // configure network - if err == nil { - err = networkSettings(&conf.Network) - } - // configure plugin external url if err == nil { // network configuration complete, start dependent services like HomeAssistant discovery diff --git a/cmd/setup.go b/cmd/setup.go index 6a9a5e5e38..c186355b65 100644 --- a/cmd/setup.go +++ b/cmd/setup.go @@ -513,6 +513,11 @@ func configureEnvironment(cmd *cobra.Command, conf *globalconfig.All) error { // setup persistence err := wrapErrorWithClass(ClassDatabase, configureDatabase(conf.Database)) + // configure network + if err == nil { + err = networkSettings(&conf.Network) + } + // setup additional templates if err == nil { if cmd.Flags().Changed(flagTemplate) {