diff --git a/docs/getting-started/setting-up-a-local-chain.md b/docs/getting-started/setting-up-a-local-chain.md index 51fe1fd45a6..cbf5ae49df6 100644 --- a/docs/getting-started/setting-up-a-local-chain.md +++ b/docs/getting-started/setting-up-a-local-chain.md @@ -71,7 +71,7 @@ gnoland start --chainid NewChainID ``` We can verify the chain ID has been changed, by fetching the status of the node and seeing the -associated chain ID. By default, the node exposes the JSON-RPC API on `http://127.0.0.1:26657`: +associated chain ID. By default, the node exposes the JSON-RPC API on `http://0.0.0.0:26657`[^1]: ```bash curl -H "Content-type: application/json" -d '{ @@ -140,3 +140,7 @@ Following this pattern, potential entries into the genesis balances file would l g1qpymzwx4l4cy6cerdyajp9ksvjsf20rk5y9rtt=10000000000ugnot g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq=10000000000ugnot ``` + +[^1]: The address `0.0.0.0` means that the node can be accessed by any IPv4 address, + including any loopback address like `127.0.0.1`, a private network address like + `192.168.0.X`, or a public IP address. diff --git a/gno.land/cmd/gnoweb/main.go b/gno.land/cmd/gnoweb/main.go index 547134548ff..4ec255cff2d 100644 --- a/gno.land/cmd/gnoweb/main.go +++ b/gno.land/cmd/gnoweb/main.go @@ -36,7 +36,7 @@ func runMain(args []string) error { fs.StringVar(&cfg.HelpChainID, "help-chainid", cfg.HelpChainID, "help page's chainid") fs.StringVar(&cfg.HelpRemote, "help-remote", cfg.HelpRemote, "help page's remote addr") fs.BoolVar(&cfg.WithAnalytics, "with-analytics", cfg.WithAnalytics, "enable privacy-first analytics") - fs.StringVar(&bindAddress, "bind", "127.0.0.1:8888", "server listening address") + fs.StringVar(&bindAddress, "bind", ":8888", "server listening address") if err := fs.Parse(args); err != nil { return err diff --git a/tm2/pkg/bft/rpc/config/config.go b/tm2/pkg/bft/rpc/config/config.go index 76c490bf94c..cd2e8c7e7cb 100644 --- a/tm2/pkg/bft/rpc/config/config.go +++ b/tm2/pkg/bft/rpc/config/config.go @@ -88,7 +88,7 @@ type RPCConfig struct { // DefaultRPCConfig returns a default configuration for the RPC server func DefaultRPCConfig() *RPCConfig { return &RPCConfig{ - ListenAddress: "tcp://127.0.0.1:26657", + ListenAddress: "tcp://0.0.0.0:26657", CORSAllowedOrigins: []string{"*"}, CORSAllowedMethods: []string{http.MethodHead, http.MethodGet, http.MethodPost, http.MethodOptions}, CORSAllowedHeaders: []string{"Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time"},