Related samples:
See also:
This page is a current reference for using Nacos as a registry with Dubbo Go. Older versions of this page described a CLI debugging flow; that content is no longer the main Nacos integration path.
The current registry/nacos sample shows:
The sample includes:
go-server/cmd/server.gogo-client/cmd/client.goproto/greet.protoFirst start a Nacos server and make sure it is reachable from your Dubbo Go applications. The sample README uses the standard Nacos server and default web console.
From the sample:
go run ./go-server/cmd/server.go
The provider exports the service and registers it into Nacos.
You can verify the service is up by sending an HTTP request to the sample service endpoint:
curl \
--header "Content-Type: application/json" \
--data '{"name": "Dubbo"}' \
http://localhost:20000/greet.GreetService/Greet
Then run:
go run ./go-client/cmd/client.go
The consumer resolves the target service through Nacos and performs the RPC call.
In current Dubbo Go, Nacos can appear in several related places:
dubbo.WithRegistry(registry.WithNacos(), ...)client.WithRegistry(...) or client.WithRegistryIDs(...)server.WithRegistry(...) or server.WithRegistryIDs(...)registriesUseful registry options come from registry/options.go, including:
registry.WithNacos()registry.WithAddress(...)registry.WithGroup(...)registry.WithNamespace(...)registry.WithRegisterService()registry.WithRegisterInterface()registry.WithRegisterServiceAndInterface()For current Dubbo Go deployments, Nacos is commonly used together with application-level service discovery. In that model:
If you are deciding between old interface-level registration and current defaults, start from the application-level service discovery page linked above.
dubbogo-cli can still be useful for debugging and interoperability workflows, but it is no longer the primary content of the Nacos registry page. If you need the CLI, install it from:
and read the dedicated tools page.