Move a Bot from bot-hosting.net to discordbothost

How-toBy discordbothostUpdated 4 min read

The short answer: Keep your existing Discord application, export the code and live data from bot-hosting.net, then recreate the runtime settings and secrets on discordbothost. Stop the old bot before its final data copy and before starting the new copy. Test commands and persistent data before retiring the old host. The accounts, subscriptions and hosting backups do not transfer automatically.

Step 1: Check whether the destination fits

Write down the runtime version, entry file, installed dependencies, current memory use and disk usage. Include any database, local uploads, scheduled jobs and external services. Compare those requirements with discordbothost plans and the host comparison.

Free provides 256 MB RAM and 1 GB disk for one bot, with renewal every 7 days. A bot that exceeds either limit needs a larger plan or a smaller project. Check Free eligibility before planning the switch. A database hosted on the old provider needs its own migration plan; Free and Starter do not include a managed database.

Step 2: Make a recovery copy

Download the project using the file or SFTP access available on your current deployment. Keep source files, dependency manifests, lockfiles, runtime settings and data files. A Git repository covers only what was committed; it may exclude live SQLite files, JSON state or user uploads.

List the names of required environment variables without publishing their values. Do not put a bot token or database password in Git or a support screenshot. Leave out installed dependencies such as node_modules, Python virtual environments and build caches; recreate them for the destination runtime.

For changing file-based data, stop the old bot before taking the final copy. For SQLite, use its backup facilities or stop every process writing to the database before copying its files. Copying only the main database file during active writes can miss recent transactions.

Step 3: Prepare the new server

Create a server from the matching library template and follow its instructions:

  • discord.js: include package.json and the lockfile; set Main file to your entry script.
  • discord.py: include requirements.txt and every imported local module; set Main file to the Python entry script.
  • JDA: upload a runnable jar, or use the documented Gradle build-on-start workflow.

Upload using the file manager or SFTP, or connect a public GitHub repository and branch. Public repository deployment is included on Free within its disk limit. Private credentials require a paid plan. With Git enabled, edits to tracked files belong in the repository because later starts can replace them.

Set the Bot token privately as BOT_TOKEN and recreate other required settings. If the code expects DISCORD_TOKEN or another name, update it to read BOT_TOKEN. Keep the same Discord application, intents and invite permissions unless your code needs a deliberate change. See environment variables and tokens.

Step 4: Switch with a short maintenance window

  1. Stop the bot on bot-hosting.net and disable any schedule or automatic start that would launch it again.
  2. Take the final consistent data copy and restore it on the new deployment. For a separate database, complete the export and import or verify that the new host can securely reach the existing service.
  3. Confirm the new data paths, runtime settings and environment variables, then start the bot on discordbothost.
  4. Read the console from the first startup line. Check the login message, a command, a scheduled task if used, and a data write followed by a read.

Existing guild invites normally stay valid because the Discord application did not change. Avoid bulk command registration during each restart; use your project's deliberate registration process if commands have changed.

Step 5: Check failures and keep a rollback

If login fails, check the variable name and token troubleshooting. If a dependency is missing, check the manifest, runtime version and missing-module guide. If saved data looks empty, verify the working directory, data paths and database connection before allowing more writes.

To roll back, stop the new process first. Preserve any data written after the switch and decide how to reconcile it before restarting the old bot. Starting an old database copy can discard newer changes. Keep the old deployment until your checks pass; manage its cancellation separately in that provider's dashboard.

Bots restart automatically after a crash. Repeated crashes pause restarts; check the console before starting again. Backups are available: manual on Free, daily and manual on paid plans. On Free, also check the renewal and deletion dates shown in your dashboard. Keep an independent recovery copy after the move.

Sources

Questions

Can I move from bot-hosting.net without creating a new Discord bot?

Yes. Hosting and the Discord application are separate. Keep the same Discord application and invite permissions, move its code and persistent data, and configure its existing token privately on the new host. Reset the token if it has been exposed.

Will my bot database move automatically?

No. Copy file-based data consistently while the old bot is stopped, or arrange a database export and import. A code repository usually does not contain the live database. Verify a data read and write before retiring the old host.

Can I migrate to discordbothost Free?

If the project fits 256 MB RAM and 1 GB disk, meets the Free eligibility rules and capacity is available. Free supports public GitHub repositories and file uploads. It requires renewal every 7 days; private repository credentials require a paid plan.

Can I keep both copies online during the move?

Prepare the new files while the old bot runs, but stop the old process before starting the replacement. Two active copies can duplicate scheduled jobs or replies and conflict over data. Keep the old files for rollback.

  1. 1https://bot-hosting.net/docs/guides/the-new-panel
  2. 2https://www.sqlite.org/backup.html
  3. 3https://discordbothost.com/pricing/

Related