Skip to main content

Export and Import

Use Backup under Settings to move selected configuration between installations or bring an older config.json into Stonker Bot for Discord.

Only the Owner and Administrators can open Backup.

Backup panel with Export and import, Save this setup to a file, or bring one in. You can also import an older config.json, and the Export and Import buttons
Backup under Settings

Export

  1. Open Backup under Settings, then select Export….
  2. Leave every section selected, or clear anything that should stay out of the export file.
  3. Select Continue.
  4. Complete Confirm it’s you, then select Confirm.

The downloaded file is named discord-stonker-bot-export-YYYY-MM-DD.json.

Export Sections

  • Connection — The Bot Token and whether the bot is set to run or stay stopped.
  • Features — Every feature's settings and on or off state for every server, each server's saved time zone, and every referenced feature secret.
  • Notifications — Every destination's name, service, events, settings, and secret fields.
  • Access tokens — Your tokens' names, scopes, expiries, and stored hashes. The token values are never included.

warning

The file holds the selected Bot Token, feature secrets, and notification secrets in plain text. It is recommended to protect it like a password.

The export never includes these local or account-bound records.

  • Users — Control panel accounts stay here.
  • Passwords — Password hashes stay here.
  • Sign-in security — Authenticator apps, recovery codes, and passkeys stay with their accounts and hostname.
  • Sessions — Browser sessions stay here.
  • Logs — Activity history and runtime logs stay here.
  • Discord runtime data — Server names, channels, roles, and other discovered data are read from Discord again.

Confirm It's You

Confirm it’s you asks for the current account password and, when the authenticator app is on, its current 6-digit Authenticator code. Select Use a passkey instead to complete the check with a saved passkey.

The confirmation lasts five minutes, works once, belongs only to that browser session, and is limited to the export or import that requested it. Closing the dialog, using another browser session, or switching from export to import requires another confirmation.

Import an Export File

  1. Open Backup under Settings, then select Import….
  2. In Source, choose An export file, then select its JSON file.
  3. In Settings, compare In the file with Here, then open Not brought over when the file holds anything this import leaves out.
  4. Check Review, then select Import.
  5. Complete Confirm it’s you, then select Confirm.
  6. Keep Importing open until it finishes, or close the dialog and return to the running import from Backup.
Import dialog on Review with Ready to import and checked lines to replace the connection, replace 23 features for 2 servers, replace 3 notifications with the same name, and skip 2 access tokens that are already here, above notes that everything is applied at once and that users, sign-in security, sessions, logs and Discord runtime data stay here
Review lists every change before anything is applied

What the Import Changes

  • Connection — When included, the saved Bot Token and run or stopped state replace the current connection.
  • Features — Every feature, on or off state, saved time zone, and referenced secret replaces the current configuration for each server included in the file. Servers not in the file stay as they are.
  • Notifications — A destination with the same name, ignoring letter case, is replaced. A new name is added, and destinations not in the file stay.
  • Access tokens — Tokens are added to the account running the import as stored hashes. A token with the same name on that account, or the same hash anywhere in the installation, is skipped, and tokens not in the file stay.
  • Unselected sections — A section omitted from the file stays as it is here.
  • One transaction — Every selected section is applied together. If a database write fails, none of the reviewed changes are kept.

Import an Older config.json

The same wizard converts the legacy bot's config.json for one selected server.

  1. Select the matching Discord server in the server menu.
  2. Open Backup under Settings, then select Import….
  3. In Source, choose An older config.json, then select a file of up to 750,000 characters.
  4. Select Turn on features that pass checks if valid, supported features should turn on during the import. Leave it clear to bring every recognized feature over switched off.
  5. In Settings, compare the connection and features. Needs attention after import lists features that are imported switched off until you fix them, and Not brought over lists the older data this import leaves out.
  6. Check Review, select Import, complete Confirm it’s you, and select Confirm.
Import dialog on Source with An older config.json selected for Stonker Lounge, config-sample.json chosen, and Turn on features that pass checks ticked
An older config.json goes through the same wizard

What Comes Over

  • Features — The recognized features in the file replace all of the selected server's current features. Current features missing from the file are cleared.
  • Feature secrets — Every stored feature secret for the selected server is cleared, then the supported secrets from the file are saved.
  • Feature state — Valid, supported features turn on only when Turn on features that pass checks is selected. Features with settings that need repairs are still imported, are listed by display name under Needs attention after import, and stay off until fixed on the Features page.
  • Review — Counts features that turn on separately from features that stay off until fixed. When Turn on features that pass checks is clear, a note confirms that imported features stay off until you turn them on.
  • Bot Token — settings.discord.token replaces the installation's Bot Token when the file contains one.
  • Server check — settings.discord.guild.guild-id has to match the selected server when it is present.

Not Brought Over

These are in an older setup but left out. The first two appear in Not brought over on the Settings step.

  • Unknown sections — Top-level sections that do not match a feature are skipped.
  • Twitter and X — The twitter-feeds and x-feeds sections, settings.twitter credentials, and twitter-account copier destinations are skipped.
  • Invite template — invites.ejs is not read. The invite page designer keeps its current design.

What Stays Here

An older config.json never contains these, and an import never changes them. Review notes that they stay here.

  • Notifications — An older config.json has no control panel notification destinations.
  • Access tokens — Control panel access tokens stay here.
  • Users — Control panel accounts stay here.
  • Passwords — Password hashes stay here.
  • Sign-in security — Authenticator apps, recovery codes, and passkeys stay here.
  • Sessions — Browser sessions stay here.
  • Logs — Activity history and runtime logs stay here.
  • Discord runtime data — Server names, channels, roles, and other discovered data are read from Discord again.

Legacy Migration lists every compatibility rule and the features that may need attention after the import.

Security Model

  • Strongest panel permission — Backup requires the users:manage permission, so only the Owner and Administrators can open the page or call its API.
  • Browser session only — Backup refuses personal access tokens, even when a token has every scope.
  • Fresh proof — Export and import each require their own password plus authenticator code, when enabled, or a passkey.
  • Short-lived grant — The five-minute confirmation works once, for one operation, in the browser session that requested it.
  • Strict files — An export file is checked before the wizard previews it and again immediately before import.
  • Atomic import — The reviewed configuration is committed in one database transaction, without writing secret values to the log.

FAQ

Is an Export File a Full Appliance Backup?

No. It moves selected configuration, but it does not contain users, passwords, sign-in security, sessions, logs, or Discord runtime data. Use Storage and Backups for a full database and installation key backup.

Can an Operator or Viewer Open Backup?

No. Only the Owner and Administrators have the users:manage permission that Backup requires.

Does Import Delete Sections Missing from the File?

No. A missing Connection, Features, Notifications, or Access tokens section stays unchanged, but an included Features section replaces the complete feature configuration and secrets for every server it contains.

Can the Export Reveal an Access Token?

No. Access tokens are exported only as the hashes already stored by the control panel, so the file cannot show their original dsb_ values.