[Feature request] Support configuring initial credentials via environment variables
Maintainers usually reply within 1 day
@patilanup421-pixel is already working on this.
Since Apr 12, 2026.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- docker-compose, helm, java, kubernetes
- Domain
- authentication, database, devops
Research direction
Start by locating the IoTDB entrypoint or startup scripts that initialize the server and credentials. Trace how the initial root account is created, then determine where IOTDB_USER and IOTDB_PASSWORD could be read during first startup. Done means a containerized deployment can provide those variables and start with the requested credentials without manual ALTER USER intervention.
Written by the indexing model from the issue text.
Description
Search before asking
- I searched in the issues and found nothing similar.
Motivation
When deploying IoTDB in a containerized or orchestrated environment (e.g. Kubernetes), there is currently no way to set the initial user credentials through environment variables. The only documented approach is to start the server with default credentials, manually connect, and run:
ALTER USER root SET PASSWORD 'newpwd';
This is impractical for automated deployments where manual intervention is not an option.
Requested behavior:
The entrypoint/startup scripts should check for the presence of environment variables — for example IOTDB_USER and IOTDB_PASSWORD — and, if set, apply those credentials automatically on first startup. This would allow orchestration tools (Helm charts, Docker Compose, etc.) to inject credentials via secrets without requiring a manual post-deploy step.
Use case:
- name: IOTDB_USER
valueFrom:
secretKeyRef:
name: iotdb-secret
key: iotdb-user
- name: IOTDB_PASSWORD
valueFrom:
secretKeyRef:
name: iotdb-secret
key: iotdb-password
In a Kubernetes Helm chart, we inject IOTDB_USER and IOTDB_PASSWORD into the pod spec from a Secret:
The environment variables are present inside the container, but IoTDB ignores them entirely. The server starts with the default root/root credentials regardless.
Solution
If IOTDB_USER and IOTDB_PASSWORD are set, the startup scripts should apply them (e.g. by running the equivalent of ALTER USER root SET PASSWORD ...) so the instance is ready to use with the desired credentials without manual intervention.
Alternatives
No response
Are you willing to submit a PR?
- I'm willing to submit a PR!
- Dominant language
- Java
- Stars
- 6.4k
- Forks
- 1.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 284
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from apache/iotdb
-
[Bug] Python NumpyTablet silently drops trailing zero bytes from BLOB valuesPossibly taken @DaZuiZui claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
[Bug] sbin/replace-conf-from-env.sh word-splits the whole environment and corrupts iotdb-system.propertiesPossibly taken @anishmehta24 claimed this 69 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
apache/iotdb#18655 · 1 reaction ·
Maintainers usually reply within 1 day
-
IoTDB Edge: stop-edge.sh does not stop its own process when IOTDB_HOME is set, and reports successPossibly taken @PDGGK claimed this 88 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
[Bug] findColumn throws NullPointerException instead of SQLException for an unknown column namePossibly taken @PDGGK claimed this 130 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
Similar issues
-
Android Bug Core Drape
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
organicmaps/organicmaps#14449 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
openhab/openhab-addons#22512 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
objectionary/lints#1871 ·
Maintainers usually reply within 1 day
-
help wanted maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
apache/maven-war-plugin#694 ·
Maintainers usually reply within 1 day
-
help wanted maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/maven-resolver-ant-tasks#219 ·
Maintainers usually reply within 1 day