This guide provides detailed instructions to set up and run the DeSpeed Bot on an Ubuntu server. Follow these steps carefully to ensure everything works as expected.
Register here.
- Operating System: Ubuntu 20.04 or 22.04 LTS
- RAM: Minimum 512MB
- Bandwidth: At least 1 Mbps
- CPU: 1 core or more
- Connect to the server via SSH:
ssh root@<YOUR_SERVER_IP>
- Update and upgrade the server:
sudo apt update && sudo apt upgrade -y
- Add Node.js repository:
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - - Install Node.js:
sudo apt install -y nodejs
- Verify installation:
node --version npm --version
- Install Git:
sudo apt install -y git
- Clone the repository:
git clone https://github.com/mumumusf/despeed.git
- Navigate to the project directory:
cd despeed - Install dependencies:
If the installation is slow, use a mirror:
npm install node-fetch https-proxy-agent socks-proxy-agent ws uuid
npm install -g cnpm --registry=https://registry.npmmirror.com cnpm install
- Start the bot:
node bot.js
- Provide the required inputs:
- Token: Obtain the token from DeSpeed Website:
- Login, open Developer Tools (F12), go to the "Application" tab, and copy the token from Local Storage.
- Proxy (if any): Provide the proxy details in the format:
IP:PORT:USERNAME:PASSWORD - Interval Time: Suggested interval is 30 minutes or more.
- Token: Obtain the token from DeSpeed Website:
- Install Screen:
sudo apt install -y screen
- Create a new session:
screen -S despeed
- Start the bot:
node bot.js
- Detach the session:
- Press
Ctrl + A, thenD.
- Press
- Reattach the session:
screen -r despeed
- Install PM2:
npm install -g pm2
- Start the bot with PM2:
pm2 start bot.js --name despeed
- Manage PM2 processes:
- View running processes:
pm2 list
- View logs:
pm2 logs despeed
- Stop the bot:
pm2 stop despeed
- Restart the bot:
pm2 restart despeed
- View running processes:
- Enable PM2 startup on reboot:
pm2 save pm2 startup
- Set timezone:
sudo timedatectl set-timezone Asia/Shanghai
- Enable a firewall:
sudo ufw allow ssh sudo ufw enable - Add swap (if low on memory):
sudo fallocate -l 2G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile
- Update system periodically:
sudo apt update && sudo apt upgrade -y
-
Bot crashes frequently:
- Check logs with PM2:
pm2 logs despeed - Ensure your token and proxy (if used) are valid.
- Check logs with PM2:
-
Dependencies fail to install:
- Use a faster npm mirror:
npm install -g cnpm --registry=https://registry.npmmirror.com
- Use a faster npm mirror:
-
Node.js version is outdated:
- Reinstall Node.js following Step 3.
With these steps, your DeSpeed bot should be running smoothly on Ubuntu Server!