diff --git a/cli/setup.go b/cli/setup.go index d9f26899..5b8579d3 100644 --- a/cli/setup.go +++ b/cli/setup.go @@ -207,8 +207,8 @@ func setup() { } // Store the ports in host:port string format - opts.Conn.Web = fmt.Sprintf(":%d", opts.Port.Web) - opts.Conn.Tcp = fmt.Sprintf(":%d", opts.Port.Tcp) + opts.Conn.Web = fmt.Sprintf("%s:%d", opts.Node.Host, opts.Port.Web) + opts.Conn.Tcp = fmt.Sprintf("%s:%d", opts.Node.Host, opts.Port.Tcp) // -------------------------------------------------- // Certs diff --git a/cli/start.go b/cli/start.go index 691e7ede..56f822a2 100644 --- a/cli/start.go +++ b/cli/start.go @@ -84,6 +84,8 @@ func init() { startCmd.PersistentFlags().StringVarP(&opts.DB.Code, "key", "k", "", flag("key")) + startCmd.PersistentFlags().StringVarP(&opts.Node.Host, "bind", "b", "0.0.0.0", "The hostname or ip address to listen for connections on.") + startCmd.PersistentFlags().StringVarP(&opts.Node.Name, "name", "n", host, "The name of this node, used for logs and statistics.") startCmd.PersistentFlags().IntVar(&opts.Port.Tcp, "port-tcp", 33693, "The port on which to serve the tcp server.")