oceanbase / oceanbase/powercontext
feat: configure the Web Dashboard / Server port through powercontext config
@longdafeng is already working on this.
Since Sep 18, 2026.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 212
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 199
Description
Feature description
Allow users to choose and persist a custom Web Dashboard / Server port through powercontext config, including a fresh local setup and an existing configuration that still uses the default port 8000.
Problem and proposed solution
Users may need a different port because 8000 is occupied or their local environment requires another port. They should be able to configure it through the CLI configuration tool without manually editing environment files.
The underlying Server already supports POWERCONTEXT_SERVER_HTTP_PORT. However, the current powercontext config init wizard only prompts for the local Server port when the stored port is invalid or is already different from 8000:
if state.scenario == "local" and (invalid_port or port != 8000):
# Prompt for the Server port here.
...
Consequently, a fresh local setup skips the port selection, and users cannot change a valid default port through that part of the wizard. Remote custom-listener and reverse-proxy paths already expose a port prompt.
Please make the port editable in the configuration workflow for all relevant scenarios, with the existing value (or 8000 for a fresh setup) as the default. For example, users should be able to run powercontext config init, choose local setup, select 18000, save, and start the Server with the saved configuration to access the Dashboard at http://127.0.0.1:18000/.
Acceptance criteria
- A fresh local setup exposes an editable Web / Server port with
8000as the default. - Users can change an existing port from
8000to a custom value, change between custom values, and restore8000throughpowercontext config. - The chosen port is validated as an integer in the range
1–65535and persisted asPOWERCONTEXT_SERVER_HTTP_PORT. - Starting or restarting the Server with that saved configuration uses the selected port.
- Generated local client URLs and displayed Dashboard / Server URLs reflect the selected port; explicitly configured remote or proxy URLs remain consistent with their access scenario.
- The UI explains that the Dashboard, HTTP API, and MCP share the Server listener and port. A separate Dashboard-only listener is not required.
- The workflow clearly indicates when an already-running Server needs to be restarted for the change to take effect.
- Add focused coverage for fresh setup and changing an existing default port, and document the configuration steps.
Alternatives considered
- Manually edit
POWERCONTEXT_SERVER_HTTP_PORTin the environment file. This is a workaround, but it does not meet the need to configure the port throughpowercontext config. - Choose a remote access scenario just to expose its port prompt. Local users should not need to select a different deployment scenario to change a local port.
Additional context
Source inspected: _network in config_wizard.py.
Related issues reviewed:
- #1290 establishes the shared Dashboard / HTTP API / MCP listener.
- #949 concerns changing the legacy default port.
- #1160 requests legacy PowerMem management commands, including port selection.
These related issues are closed and do not specifically track making the default local Web / Server port editable through the current powercontext config workflow. Automatic port fallback is outside this request.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.