Older documentation. Start with the current guides.

Micro Server (Optional)

The Micro server is an optional web dashboard and authenticated API gateway for production environments. It provides a secure entrypoint for discovering and interacting with services that are already running (e.g., managed by systemd via micro deploy).

micro server does not build, run, or watch services. It only discovers services via the registry and provides a UI/API to interact with them.

micro gateway is the current gateway command; micro server remains a deprecated alias used in the examples below.

micro server vs micro run

micro runmicro server
PurposeLocal developmentProduction dashboard
Builds servicesYesNo
Runs servicesYes (as child processes)No (discovers already-running services)
Hot reloadYesNo
AuthenticationDepends on bind addressDepends on bind address
ScopesYes (/auth/scopes)Yes (/auth/scopes)
DashboardFull gateway UI with auth, scopes, agentFull dashboard with API explorer, logs, user/token management
When to useDay-to-day developmentDeployed environments, shared servers

For local development, use micro run instead.

Install

Install the CLI which includes the server command:

go install go-micro.dev/v6/cmd/micro@latest

Run

Start the server:

micro server

Open the gateway using the machine token printed at startup, for example http://localhost:8080/?token=<token>. There is no default username/password. Authentication defaults to on for non-loopback addresses and off for loopback addresses.

Features

Typical Production Setup

After deploying services with micro deploy:

# On your server, start the dashboard
micro server

Services managed by systemd are discovered via the registry and appear in the dashboard automatically. The server provides the authenticated API and web UI for interacting with them.

When to use it

For CLI usage details, see the CLI documentation on GitHub.