CLI guide (Linux and macOS)¶
The bash installer downloads NadekoBot, adds your token, installs the music tools and starts the bot. Use it on a Linux server or on your own Linux or macOS computer.
Before you start¶
The installer works on these 64-bit systems:
- Ubuntu 22.04, 24.04
- Debian 12, 13
- Linux Mint 21, 22
- Fedora 42, 43
- Rocky Linux, AlmaLinux 8, 9
- openSUSE Leap 15.7, Tumbleweed
- Arch Linux, Artix
- macOS 14 (Sonoma) or later. Music does not work on macOS yet.
You also need:
- Create a Discord bot and copy its token.
- To keep the bot online all day, get a Linux server.
-
Install
curl. Most systems already have it.sudo apt install curlsudo dnf install curlsudo zypper install curlsudo pacman -S curlInstall Homebrew, then:
brew install curl
Install the bot¶
-
Go to your home folder, then download and start the installer:
cd ~ curl -L -o n-install.sh https://raw.githubusercontent.com/nadeko-bot/bash-installer/refs/heads/v6/n-install.sh bash n-install.sh
-
Type
1(Install) and press Enter. -
Type
1to select the latest version and press Enter. The installer puts the bot in thenadekofolder.
-
Press Enter to go back to the menu.
- Type
3(Add Token), paste your token and press Enter. In most Linux terminals, paste with Ctrl+Shift+V. - For music, type
4(Install music dependencies) and press Enter. Typeyat each question. The installer installs ffmpeg and yt-dlp. It also installs Deno if your system has no JavaScript runtime. - Type
2(Run) and press Enter. The bot comes online in your server.
The bot stops when you close the terminal. To keep it running, do the steps in the next section.
Your token, owner IDs and API keys are in nadeko/data/creds.yml. To edit the file, type nano nadeko/data/creds.yml. To save and exit nano, press Ctrl+X, then Y, then Enter. Restart the bot after you edit the file.
Keep the bot running¶
tmux keeps the bot running after you close the terminal.
- Stop the bot if it runs: press Ctrl+C.
-
Start a tmux session:
tmux new -s nadeko -
Type
bash n-install.sh, then type2(Run). - Press Ctrl+B, then D. The bot continues to run in the background.
To go back to the bot, type tmux a -t nadeko.
systemd starts the bot when the server starts and restarts it after a crash. The .die command stops the bot.
- Stop the bot if it runs: press Ctrl+C.
-
In your home folder, create the service:
cd ~ sudo tee /etc/systemd/system/nadeko.service > /dev/null <<EOF [Unit] Description=NadekoBot After=network-online.target Wants=network-online.target StartLimitIntervalSec=120 StartLimitBurst=3 [Service] User=$USER WorkingDirectory=$PWD/nadeko Environment=PATH=$HOME/.local/bin:$HOME/.deno/bin:/usr/local/bin:/usr/bin:/bin ExecStartPre=-$HOME/.local/bin/yt-dlp -U ExecStart=$PWD/nadeko/NadekoBot Restart=on-failure RestartSec=10 [Install] WantedBy=multi-user.target EOF -
Start the bot now and at each boot:
sudo systemctl daemon-reload sudo systemctl enable --now nadeko
| Task | Command |
|---|---|
| Stop the bot | sudo systemctl stop nadeko |
| Start the bot | sudo systemctl start nadeko |
| Show the bot's log | journalctl -u nadeko -f |
Update the bot¶
- Stop the bot. With systemd, type
sudo systemctl stop nadeko. In other cases, type.diein Discord. -
Go to your home folder, then download and start the installer again:
cd ~ curl -L -o n-install.sh https://raw.githubusercontent.com/nadeko-bot/bash-installer/refs/heads/v6/n-install.sh bash n-install.sh -
Type
1(Install), select the newest version, then typey. - Start the bot again. With systemd, type
sudo systemctl start nadeko. In other cases, type2(Run) in the installer.
The installer keeps your data folder. It also puts a copy of the old data folder in nadeko_backups.