Initially when I setup sparkbox I added a bootstrap token. Since I have updated it keeps asking for a bootstrap token and when I run the sudo sparkbox bootstrap-token it returns nothing.
23 replies
Chris wrote:
Hi noobmaster — this is a known issue that was fixed a couple versions ago. When SparkBox updates, it should remember your bootstrap token from before, but there was a bug where that check didn't work on the update path. The fix shipped in v1.6.157. To get past this: 1. Run sudo sparkbox update (this brings in the fix) 2. Then sudo sparkbox up That should clear the prompt and you'll be back in. If you're already on 1.6.157 or later and still see the prompt after update, let me know the version your box reports and we'll dig into what's happening.
noobmaster wrote:
I am on SparkBox v1.6.694
Chris wrote:
Got it — v1.6.694 has the fix. One quick check: after you run sudo sparkbox update, did you then run sudo sparkbox up? Those two commands together are what applies the fix. If you have already done both and the prompt is still appearing, let me know and we will dig into what is blocking the token recovery.
noobmaster wrote:
It it has the fix then how would run those fix the issue. I have run the commands and it is still an issue
Chris wrote:
Got it — you've done both steps and it's still stuck. Let me dig into this differently. When sudo sparkbox bootstrap-token returns nothing, that usually means one of two things: either the token wasn't preserved in the config file when you updated, or the dashboard thinks you already claimed it but something is out of sync. Let's check which one: 1. Run: grep SBBOOTSTRAPTOKEN /opt/sparkbox/.env If it shows a long alphanumeric string, the token is there. If it shows nothing or SBBOOTSTRAPTOKEN=, then it didn't preserve on update. 2. Also check: sudo sparkbox status — does it show "Dashboard: running"? Send back those two outputs and we'll know exactly what we're fixing.
noobmaster wrote:
dashboard is running grep SBBOOTSTRAPTOKEN /opt/sparkbox/.env returns nothing
Chris wrote:
Got it. The empty token tells us the dashboard was either never claimed or the claim was lost during an update. Let me check one more thing to understand what happened: Run: ls -la /opt/sparkbox/state/ | grep -E "dashboard|session" This will show if the dashboard's session files exist. Then also run: sudo sparkbox logs sb-dashboard | tail -50 Send back those outputs and I can see exactly what the dashboard is reporting.
noobmaster wrote:
A token was claimed when I set this up almost 2 months ago. The commands return nothing
Chris wrote:
Got it — when the commands return nothing, that usually means the directory or files don't exist at all, which is unusual. Let me get a clearer picture. Can you run these in order and paste back exactly what you see (including any error messages): 1. ls -la /opt/sparkbox/state/ — just the first few lines to see if the directory exists 2. ls -la /opt/sparkbox/.env — check if the .env file exists 3. sudo cat /opt/sparkbox/.env | head -20 — first 20 lines (I need to see if there's any SB config at all) If any of those commands say "No such file" or produce errors, that's important info. The fact that the dashboard is running but has no token state or session files is the real clue here. Once I see that, I'll know whether this is a lost config or something else.
noobmaster wrote:
ikraam@space-box:~$ ls -la /opt/sparkbox/.env -rw-r----- 1 ikraam ikraam 489 Sep 14 19:21 /opt/sparkbox/.env ikraam@space-box:~$ ls -la /opt/sparkbox/state/ total 1068 drwxrwxr-x 10 ikraam ikraam 4096 Sep 15 09:20 . drwxr-xr-x 12 ikraam ikraam 4096 Sep 14 20:03 .. -rw------- 1 ikraam ikraam 65 Sep 5 14:50 .env-hash -rw-r--r-- 1 root root 875 Sep 14 21:00 .module-render-hashes drwxrwxr-x 2 ikraam ikraam 4096 Aug 20 15:54 .ufw-module-ports -rw------- 1 ikraam ikraam 61118 Sep 15 08:05 alerts.json -rw------- 1 ikraam ikraam 2968 Sep 14 03:17 antivirus.json -rw------- 1 ikraam ikraam 149 Aug 20 22:30 arr-api-keys.json -rw------- 1 ikraam ikraam 219553 Sep 5 15:08 arr-bootstrap.log -rw------- 1 ikraam ikraam 21 Sep 5 15:08 arr-bootstrapped -rw------- 1 ikraam ikraam 25 Aug 20 15:54 authelia-admin-password.txt -rw------- 1 ikraam ikraam 151 Sep 1 10:35 bazarr-languages-seeded -rw------- 1 ikraam ikraam 21 Aug 20 22:34 bazarr-wired drwxrwxr-x 2 ikraam ikraam 4096 Sep 14 19:04 chat-sessions -rw------- 1 ikraam ikraam 79 Sep 14 19:04 chat-usage.json SBROOT=/opt/sparkbox
Chris wrote:
Thanks for running those checks. The empty SBBOOTSTRAPTOKEN in your .env is the root cause — the token should have been written and preserved there when you first set up SparkBox. Let's figure out what happened. Can you run these two: 1. ls -la /opt/sparkbox/state/ | grep dashboard This shows if the dashboard has any state files. 2. sudo cat /opt/sparkbox/.env | head -10 I need to see if your .env was regenerated fresh or if it was preserved. Once I see those outputs, I can tell you whether we need to recover from a backup or take another path.
noobmaster wrote:
ikraam@space-box:/opt$ ls -la /opt/sparkbox/state/ | grep dashboard -rw------- 1 ikraam ikraam 33 Aug 29 14:12 dashboard-prefs.json ikraam@space-box:/opt$ sudo cat /opt/sparkbox/.env | head -10 SBROOT=/opt/sparkbox NPMADMINPASSWORD= FILEBROWSERADMINPW= FILEBROWSERJWTSECRET= GRAFANAADMINPASSWORD= HOMARRSECRETENCRYPTIONKEY
Chris wrote:
Thanks for sticking with this — I can see exactly what's happening now. Your .env file shows SBROOT but the SBBOOTSTRAPTOKEN line is missing entirely, not even blank. That tells me the token wasn't preserved when you updated. Here's the root issue: when the update process reads your old .env, it should copy the SBBOOTSTRAPTOKEN to the new one. The fact that it's gone means that step failed — either the old token was already lost, or the preservation didn't work. Let me check one more thing to see if we can recover it: 1. Run: grep -r SBBOOTSTRAPTOKEN /opt/sparkbox/state/ This searches your entire state directory for any saved token. If it finds anything, we can restore it directly. 2. Also: ls -la /opt/sparkbox/.env (note the asterisk) This shows if there's a backup copy of your old .env from before the update. Send back those two outputs. If the token is nowhere, we'll need to do a fresh dashboard claim, which will give you a new token.
noobmaster wrote:
ikraam@space-box:/opt$ grep -r SBBOOTSTRAPTOKEN /opt/sparkbox/state/ /opt/sparkbox/state/sparkbox-err-trap.log:2026-09-14T19:17:07+00:00 rc=1 line=17376 cmd=token="$(grep '^SBBOOTSTRAPTOKEN=' "${SBENVFILE}" 2 /dev/null | tail -1 | cut -d= -f2-)" /opt/sparkbox/state/sparkbox-err-trap.log:2026-09-14T19:17:17+00:00 rc=1 line=17376 cmd=token="$(grep '^SBBOOTSTRAPTOKEN=' "${SBENVFILE}" 2 /dev/null | tail -1 | cut -d= -f2-)" /opt/sparkbox/state/sparkbox-err-trap.log:2026-09-14T19:19:44+00:00 rc=1 line=17376 cmd=token="$(grep '^SBBOOTSTRAPTOKEN=' "${SBENVFILE}" 2 /dev/null | tail -1 | cut -d= -f2-)" /opt/sparkbox/state/sparkbox-err-trap.log:2026-09-14T19:21:35+00:00 rc=1 line=17376 cmd=token="$(grep '^SBBOOTSTRAPTOKEN=' "${SBENVFILE}" 2 /dev/null | tail -1 | cut -d= -f2-)" /opt/sparkbox/state/sparkbox-err-trap.log:2026-09-14T19:21:46+00:00 rc=1 line=17376 cmd=token="$(grep '^SBBOOTSTRAPTOKEN=' "${SBENVFILE}" 2 /dev/null | tail -1 | cut -d= -f2-)" /opt/sparkbox/state/sparkbox-err-trap.log:2026-09-14T19:30:11+00:00 rc=1 line=17414 cmd=token="$(grep '^SBBOOTSTRAPTOKEN=' "${SBENVFILE}" 2 /dev/null | tail -1 | cut -d= -f2-)" /opt/sparkbox/state/sparkbox-err-trap.log:2026-09-14T19:30:27+00:00 rc=1 line=17414 cmd=token="$(grep '^SBBOOTSTRAPTOKEN=' "${SBENVFILE}" 2 /dev/null | tail -1 | cut -d= -f2-)" /opt/sparkbox/state/sparkbox-err-trap.log:2026-09-14T19:48:37+00:00 rc=1 line=17414 cmd=token="$(grep '^SBBOOTSTRAPTOKEN=' "${SBENVFILE}" 2 /dev/null | tail -1 | cut -d= -f2-)" /opt/sparkbox/state/sparkbox-err-trap.log:2026-09-14T20:22:37+00:00 rc=1 line=17414 cmd=token="$(grep '^SBBOOTSTRAPTOKEN=' "${SBENVFILE}" 2 /dev/null | tail -1 | cut -d= -f2-)" /opt/sparkbox/state/sparkbox-err-trap.log:2026-09-14T20:22:40+00:00 rc=1 line=17414 cmd=token="$(grep '^SBBOOTSTRAPTOKEN=' "${SBENVFILE}" 2 /dev/null | tail -1 | cut -d= -f2-)" /opt/sparkbox/state/sparkbox-err-trap.log:2026-09-14T20:50:58+00:00 rc=1 line=17414 cmd=token="$(grep '^SBBOOTSTRAPTOKEN=' "${SBENVFILE}" 2 /dev/null | tail -1 | cut -d= -f2-)" /opt/sparkbox/state/sparkbox-err-trap.log:2026-09-14T21:00:46+00:00 rc=1 line=17414 cmd=token="$(grep '^SBBOOTSTRAPTOKEN=' "${SBENVFILE}" 2 /dev/null | tail -1 | cut -d= -f2-)" ikraam@space-box:/opt$ ls -la /opt/sparkbox/.env -rw-r----- 1 ikraam ikraam 489 Sep 14 19:21 /opt/sparkbox/.env -rw-r--r-- 1 ikraam ikraam 2691 Jul 18 02:18 /opt/sparkbox/.env.example ikraam@space-box:/opt$
Chris wrote:
noobmaster — I found the root cause. Your .env file was regenerated during an update, and the SBBOOTSTRAPTOKEN line was not copied over. Since the bootstrap token is designed to be one-time-use (it disappears after first login), once it's lost, we need to reset it. Here's how to get back in: 1. Run: sudo sparkbox down 2. Then: sudo rm /opt/sparkbox/state/dashboard-prefs.json 3. Finally: sudo sparkbox up This clears the dashboard's previous claim state. When it starts back up, it will generate a fresh bootstrap token and print it to the screen. That's your new one-time login code. If the new token doesn't appear on screen, run: sudo sparkbox bootstrap-token to retrieve it. Once you're logged in with the new token, the dashboard will remember your login going forward, and this won't happen again on the next update.
noobmaster wrote:
After doing all the steps it still isn't providing me with a token
Chris wrote:
noobmaster — thanks for following through on all those steps. The fact that the token still isn't appearing after a fresh dashboard start tells me something deeper is wrong with how the dashboard is initializing, not just a lost config. Let me get one more diagnostic before we dig into this further: 1. Run: sudo sparkbox logs sb-dashboard | head -30 Send back the first few lines from the dashboard logs. That will show whether the dashboard is even aware it needs to generate a bootstrap token, or if something is silently failing on startup. Once I see those logs, I'll know exactly what's happening and what the next step is.
noobmaster wrote:
ikraam@space-box:/$ sudo sparkbox logs sb-dashboard | head -30 [startup] Cleared stale operation lock: lock from previous dashboard instance (bootId mismatch) [2026-09-15T10:12:32.962Z] [INFO] SparkBox Dashboard running on port 8443 [2026-09-15T10:12:32.963Z] [INFO] SBROOT: /app [2026-09-15T10:12:32.963Z] [INFO] License tier (cached): unlicensed [2026-09-15T10:12:32.964Z] [INFO] Backup encryption: disabled [health-report] Weekly report scheduler started (Sundays 8 AM). [knowledge-miner] Initialized. Daily mining at 4:00 AM. [2026-09-15T10:12:33.266Z] [INFO] [perms] migrated .env-hash from 664 to 600 [2026-09-15T10:12:33.266Z] [WARN] [perms] could not chmod .module-render-hashes: EPERM: operation not permitted, chmod '/app/state/.module-render-hashes' [2026-09-15T10:12:33.267Z] [INFO] [perms] migrated alerts.json from 664 to 600 [2026-09-15T10:12:33.267Z] [INFO] [perms] migrated antivirus.json from 664 to 600 [2026-09-15T10:12:33.267Z] [INFO] [perms] migrated arr-api-keys.json from 664 to 600 [2026-09-15T10:12:33.267Z] [INFO] [perms] migrated arr-bootstrap.log from 664 to 600 [2026-09-15T10:12:33.267Z] [INFO] [perms] migrated authelia-admin-password.txt from 664 to 600 [2026-09-15T10:12:33.267Z] [INFO] [perms] migrated bazarr-languages-seeded from 664 to 600 [2026-09-15T10:12:33.268Z] [INFO] [perms] migrated bazarr-wired from 664 to 600 [2026-09-15T10:12:33.268Z] [INFO] [perms] migrated chat-usage.json from 664 to 600 [2026-09-15T10:12:33.268Z] [INFO] [perms] migrated doctor-last.json from 664 to 600 [2026-09-15T10:12:33.268Z] [INFO] [perms] migrated duplicati-admin-password.txt from 664 to 600 [2026-09-15T10:12:33.268Z] [INFO] [perms] migrated filebrowser-admin-password.txt from 664 to 600 [2026-09-15T10:12:33.269Z] [INFO] [perms] migrated first-login.txt from 664 to 600 [2026-09-15T10:12:33.345Z] [INFO] [perms] migrated fleet-notices.json from 664 to 600 [2026-09-15T10:12:33.345Z] [INFO] [perms] migrated fleet-patterns-active.json from 664 to 600 [2026-09-15T10:12:33.345Z] [INFO] [perms] migrated fleet-patterns-cache.json from 664 to 600 [2026-09-15T10:12:33.345Z] [INFO] [perms] migrated gotify-admin-password.txt from 664 to 600 [2026-09-15T10:12:33.345Z] [INFO] [perms] migrated hw-dri-gids from 664 to 600 [2026-09-15T10:12:33.345Z] [INFO] [perms] migrated hw-dri-present from 664 to 600 [2026-09-15T10:12:33.346Z] [INFO] [perms] migrated install-id from 664 to 600 [2026-09-15T10:12:33.346Z] [INFO] [perms] migrated install-meta.conf from 664 to 600 [2026-09-15T10:12:33.346Z] [INFO] [perms] migrated jellyfin-admin-password.txt from 664 to 600
Chris wrote:
Thanks for those logs — I can see the dashboard is running, but there's a permission issue in there that might be blocking the bootstrap token from being generated: the logs show [perms] could not chmod .module-render-hashes: EPERM: operation not permitted. The dashboard initialization is hitting a permissions wall, which can prevent it from fully setting up. Let's fix that first: 1. Run: sudo chown -R root:root /opt/sparkbox/state/.module-render-hashes 2. Then: sudo sparkbox restart dashboard 3. After it restarts, try: sudo sparkbox bootstrap-token If the token appears after that, great — you can log in with it. If it still returns nothing, the logs will tell us more. Let me know what you see.
noobmaster wrote:
Still no bootstrap token is their a way to backup applications and reinstall sparkbox or do you have a solution fixing the bootstrap token issue ?
Chris wrote:
noobmaster — I found what is happening, and I owe you a straight answer after all that troubleshooting. Your .env file was regenerated during the update without preserving the original SBBOOTSTRAPTOKEN value. That is the root problem — your claimed dashboard lost its recovery token when that file was rewritten, and the command to generate a new one (sparkbox bootstrap-token) is not working because of a deeper bug in how the dashboard reads from that .env file after an update. This is a known issue we are investigating. You should not have to reinstall to fix it. Here is what I need from you to move forward: can you run these checks? 1. ls -la /opt/sparkbox/.env.backup — check if there is a backup of your old .env from before the update 2. sudo cat /opt/sparkbox/.env.example | grep SBBOOTSTRAPTOKEN — show what the template has If there is a backup with the token, we can restore it directly. If not, we have another recovery path. Either way, I will get you back in without losing your apps or data. I am escalating this to our team for investigation. Thanks for your patience.
noobmaster wrote:
resetting the password fixed the bootstrap token issue
Chris wrote:
Great to hear it's working now — thanks for that update\! For anyone else who hits this, resetting the dashboard password through the recovery menu recreates the bootstrap token in the .env file, which is the workaround when an update loses it. Glad you're back in.