Discord Bots Tutorials

Moving an Existing Discord Bot to WinterNode

Move a Discord bot from your PC or another host: what to copy, where your token and settings go, how packages install, and how to check it's online.

Last updated: November 19, 2026

4.9

788+ Satisfied Customers

To move a bot that already runs somewhere else, copy its code and package list (not node_modules or a virtual environment), put your token and settings in a .env file, match the language version, stop the old copy, and press Start. Discord bot hosting runs Node.js, Python, and Java bots, and the steps are the same for each, with the differences called out below.

Starting a brand new bot instead? Follow Setting Up Your Discord Bot, which explains every setting on the Server Options page this guide mentions.

Step 1: Match your language version

Find the version your bot runs on now. On your PC or old host, run the one that applies:

node --version
python --version   # or python3 --version
java -version

Then pick the closest match under Language on the Server Options page. See Change your language or version for the versions on offer.

For Java, pick the version your .jar was built for, or a newer one. A .jar built for a newer Java than the one you picked won’t run. If your version is older than the oldest on offer, pick the closest newer version and check the console for errors on the first start.

Step 2: Copy the right files

Copy your bot’s code and the files it needs to run. Leave out anything that gets rebuilt when your bot starts.

LanguageCopyLeave out
Node.jsYour code, package.json, and package-lock.json if you have onenode_modules
PythonYour code and requirements.txtYour virtual environment folder (often venv or .venv) and __pycache__
JavaYour built .jar, with its libraries includedYour source code and build folders (the .jar is what runs)
AnyConfig files and data your bot saves to disk, such as a SQLite database or JSON filesOld log files

Node.js packages install from package.json and Python packages from requirements.txt when you start your bot, so the package list is what matters. Java bots get nothing installed for them, so the .jar needs its libraries built in.

No requirements.txt yet? On the machine where your bot runs now, with its virtual environment active, run:

pip freeze > requirements.txt

Get your files onto the server one of two ways:

  • Upload them with the File Manager or SFTP. The File Manager takes files up to 100mb, so for a lot of files, upload one .zip and use Extract. Zip the files themselves, not the folder around them, so they extract straight into your server’s top folder. Keep your main file and package list in that top folder.
  • Deploy from GitHub. Follow Deploy from GitHub. Your repository only downloads into an empty server folder (a .env file is fine), so set this up before you upload your other files.

Step 3: Move your token and settings into .env

Your token and other secrets (API keys, database passwords) go in a .env file in your server’s files, one per line, using the same names your code already reads:

DISCORD_TOKEN=your-bot-token
DATABASE_PASSWORD=your-database-password

Where they come from depends on where your bot ran before:

  • On your PC: you probably already have a .env or config file. Upload it with your other files.
  • On another host: values typed into a dashboard or “secrets” page don’t come with your files. Copy each one into .env by hand.

Your code reads .env the same way it normally would. If it never loaded a .env file before because your old host set the values for it, add a loader (for example dotenv for Node.js or python-dotenv for Python) and list it in package.json or requirements.txt.

To change a value later, open .env in the File Manager, edit it, save, and restart your bot (press Start if it’s offline).

Keep .env out of your repository. If your token was ever shared or committed, reset it in the Discord Developer Portal: open your app, go to the Bot page, and click Reset Token under Token. Discord only shows a token once, so put the new one straight into .env.

Using a database

If your bot stores data in MySQL, every plan includes 3 MySQL databases. Create one, copy your data over from the old database, and put the new database’s name, username, password, and address in .env. A SQLite database is just a file, so copying it in Step 2 is enough.

Step 4: Start your bot

  1. Stop your bot on your PC or old host, so only one copy is running.
  2. On Server Options, check Language. If your main file isn’t named index.js (Node.js) or main.py (Python), or you have more than one .jar, set Main File to it.
  3. Open Console and press Start.

The first start can take a minute while Node.js or Python packages install.

Step 5: Check it’s online

  1. Read the console. Lines that start with [WinterNode] come from us. On a first start, a Node.js bot shows them installing your packages and then launching your bot:

    [WinterNode] Installing packages from package.json. The first start after a change can take a minute.
    [WinterNode] Dependencies ready.
    [WinterNode] Starting your Node.js 24 bot (index.js)

    A Python bot shows requirements.txt in the first line, and a Java bot shows [WinterNode] Java runtime; no dependency installation required. Later starts with an unchanged package list show [WinterNode] Dependencies unchanged; skipping install. The last line names your language, version, and main file, so check that they match what you set. After it you should see your bot’s own startup output, such as the message your code prints when it logs in. An error here means it didn’t start, and the panel restarts a crashed bot automatically, so the same error can appear twice. See Bot Won’t Start or Goes Offline.

  2. Check Discord. Your bot should show as online in your server’s member list.

  3. Run one of its commands. This is the real test. When a bot drops its connection without closing it cleanly, Discord can keep showing it online for a few minutes, so a command tells you more than the status dot does.

Once it answers, your bot is running on our server instead of your PC, so you can turn off your PC or cancel the old host.

Frequently Asked Questions

No. Node.js installs packages from package.json and Python installs from requirements.txt when your bot starts, so upload the package list instead of the installed packages.

Put each one on its own line in a .env file in your server's files, using the same names your code already reads. Keep that file out of your GitHub repository.

No. Your existing token works on any host. Reset it in the Discord Developer Portal only if it was shared or committed to a repository, then put the new one in .env.