What is ngctl¶
ngctl is a command-line tool for managing the Meta service of NebulaGraph Database Developer Edition. Use it to sign in to the Meta service, sign out, change your password, and manage users.
Usage scenarios¶
ngctl can be used in the following scenarios:
- On the first Docker Compose deployment, ngctl sets the password and initializes the default service group automatically.
- Log in to the Meta service to obtain a Meta access token.
- Manage users in the Meta service.
- Configure sessionless mode, which requires logging in to the Meta service.
Run ngctl with Docker Compose¶
The supplied compose.yaml starts an ngctl container. After NebulaGraph Database Developer Edition starts, open a terminal on the development machine, go to the directory containing compose.yaml, and enter the container:
docker compose exec ngctl sh
For user management operations, sign in to the Meta service as root inside the container. You do not need to sign in first to change a password.
Replace <root-password> with NebulaGraph Database Developer Edition's current root password. For initial password settings and escaping rules, see Set the root password:
ngctl auth login -H graph-cluster -P 9559 -u root -p '<root-password>'
graph-cluster is an address inside the container network. After logging in, run management commands in the same container. For example:
ngctl user show
Run exit to return to the development machine's terminal. The login token remains available when you enter the same container again; log in again if the container is recreated. For the full user management procedure, see User management.
Download standalone packages¶
The supplied Docker Compose deployment includes an ngctl container. Download a standalone package to run the client directly on your development machine or another machine.
Current version: 5.3.1. Choose the package for the operating system and CPU architecture of the machine that will run the client.
| Operating system | CPU architecture | Package | Checksum |
|---|---|---|---|
| macOS | Apple Silicon (ARM64) | Download | SHA-256 |
| macOS | Intel (x86-64) | Download | SHA-256 |
| Linux | ARM64 | Download | SHA-256 |
| Linux | x86-64 | Download | SHA-256 |
| Windows | x86-64 | Download | SHA-256 |
To check file integrity, see Verify a package.
Extract and connect¶
Make sure NebulaGraph Database Developer Edition is running as described in the deployment guide. Open a terminal in the download directory. Replace <package-name> with the downloaded filename before running the commands below. Replace <root-password> with the current root password.
The examples use 127.0.0.1:9559 to connect to a database running on the same machine. To connect from another machine, replace 127.0.0.1 with the Docker host's IP address. If you changed the port mapping, use the host port you configured.
tar -xzf "<package-name>"
cd nebula-graph-ngctl/bin
./ngctl auth login -H 127.0.0.1 -P 9559 -u root -p '<root-password>'
tar -xzf "<package-name>"
Set-Location nebula-graph-ngctl/bin
.\ngctl.exe auth login -H 127.0.0.1 -P 9559 -u root -p '<root-password>'
After signing in, run management commands in the same bin directory, such as ./ngctl user show, or .\ngctl.exe user show in Windows PowerShell.
Command references¶
See the following topic to learn about the commands supported by ngctl:
Note
Command references use ngctl as the executable name. Run it directly in the container above. For a standalone installation, use ./ngctl from the bin directory, or .\ngctl.exe in Windows PowerShell.
Run ngctl -h to view the available commands and options.