Changing Passwords · API Keys
Edge's credentials start out identical on every box. Change them once during commissioning, and you're done.
Platform · AI · Studio are changed with a rotation tool called bin/passwd.sh. Edge has no such tool. In Edge, credentials are simply configuration keys under app.properties, so you change them the same way as any other setting: fix it on screen and restart.
Where are the initial values?
Once installation finishes, a shipping summary file is generated exactly once.
sudo cat /etc/kopens/credentials.txt
| Item | Value |
|---|---|
| Permissions | 0600, root:root — only root can read it |
| Created | Once, on the first run of install.sh |
| Contents | UI login · REST API key · MQTT · OPC UA · TSE · keystore password |
This file exists so it can be printed once before shipping and sent along with the sealed box. It is not meant to stay on the box. After you've changed all the credentials, move it to your operational vault and delete it from the box.
This file does not track changed values. It retains whatever the initial values were at install time, so if you trust this file after changing a password, you'll be looking at the old value.
What to change
| Key | What | Initial value |
|---|---|---|
edge.admin_password | UI login password (admin) | admin123! |
edge.rest.api.key | REST API authentication key (X-API-Key / Bearer) | Fixed default |
mqtt.server.password | Embedded HiveMQ broker (Sparkplug transmit) | edge123! |
opc.ua.server.password | OPC UA server (northbound) | edge123! |
server.api_key | Platform integration token | Injected at install time |
ai.api.key | AI feature key | Empty |
tse.server.password | Embedded time series engine (TSE) | tse123! |
The first six appear in the configuration screen. tse.server.password isn't on screen, so you fix it in the config file.
You don't change the usernames — leave edge.admin_user · mqtt.server.user, etc. as they are; standard operation is to change only the passwords.
Method ① From the screen (for changing one or two)
- Log in to
https://<gateway-ip>/ui/main - Top-right gear icon (
fa-cog) → Configuration (/ui/system/config) - Find the key in the relevant tab and enter the new value — every key in the table above renders as a password input field (
edge.admin_passwordhas no eye icon either, so the value never shows on screen) - Top-right Save (
fa-save) - Restart — saving alone does not apply it
Save only writes to the app.properties file. The running process still holds the value from when it started, so you must restart for the new value to take effect. The restart on screen restarts only Tomcat without killing the container (30–90 seconds).
See Restart for details.
Method ② By command (commissioning — changing several at once)
bin/config.sh changes the keys for you. You can change several at once and restart only once at the end, so this is the faster route during commissioning.
cd /opt/kopens/install/bin
./config.sh --get edge.admin_password # 현재 값 확인
./config.sh --set edge.admin_password '<new-password>'
./config.sh --set edge.rest.api.key '<new-key>'
./config.sh --set mqtt.server.password '<new-password>'
./config.sh --diff # 직전 백업과 비교
./config.sh --restart # 마지막에 한 번만
Run it without arguments and it opens the file in an editor, then asks whether to save and restart.
Each change automatically leaves a app.properties.bak.YYYYMMDD_HHMMSS backup.
2026.08-20260825 or laterEarlier versions of config.sh --set silently lose values. Instead of the canonical real file, a compatibility symlink was pointed to sed -i, so edits never reached the app and were overwritten on the next restart. This is the root cause of the "it says it changed but doesn't take effect" symptom.
Check the image tag your box is running — IMAGE_TAG is the canonical version.
grep '^IMAGE_TAG=' /etc/kopens/version.env
If you're on a lower version, use method ③ below (direct file editing), or change it from the screen.
Method ③ Edit the file directly
The canonical copy of the config file is a single real file.
sudo vi /etc/kopens/conf/app.properties
sudo systemctl restart plantpulse-edge.service
conf/| Path | Identity |
|---|---|
/etc/kopens/conf/app.properties | Canonical real file — the app reads this directly via -Dpe.conf.dir |
/etc/kopens/app.properties | Symlink — a convenience name pointing to the file above |
Opening the symlink in an editor still edits the real file, so vi can use either one. But a custom-written sed -i script will delete the symlink and create a new plain file in its place.
When that happens, your edits end up in /etc/kopens/app.properties while the app still reads conf/app.properties with the old value — a state where the save succeeded but nothing actually changed.
(Using sed -i --follow-symlinks prevents this.)
After editing, verify that the change actually landed in the real file.
grep '^edge.admin_password' /etc/kopens/conf/app.properties
Verification
# 실파일에 새 값이 들어갔는지
sudo grep -E '^(edge.admin_password|edge.rest.api.key|mqtt.server.password)' \
/etc/kopens/conf/app.properties
# UI 로그인 — 새 비밀번호로 접속되는지
# REST API — 새 키로 통과하는지
curl -k -H "X-API-Key: <new-key>" https://<gateway-ip>/api/v1/system/status
/etc/kopens/env.sh.generated (0600) retains the value decided at install time, in export ADMIN_PASS=... form. When reinstallation or upgrade regenerates app.properties, it reads and preserves the existing app.properties value first, so values changed via screen or file are not reverted by an upgrade.
However, the sidecar itself is never refreshed, so treat its values as initial values too.
Related documents
- Post-Installation Inspection — commissioning sequence
- Configuration — all keys changeable from the screen
- Restart — how to apply changes
- Production Readiness Check — pre-shipping checklist