Xstro is a simple WhatsApp bot I made to make using WhatsApp faster and easier. It fully depends on the XSTRO API where all the functionality is processed. I used Axios to keep it lightweight and fast. All you need is a decent internet connection from your server. Powered By Baileys Open Source WhatsApp Web API.
First, fork your own copy of the repo to your GitHub account.
Get the Session ID from the render server.
I’m not responsible for you messing around and getting your account banned. As long as you don’t modify the source code to fit your idiotic needs, you’re fine. Seriously, don’t spam others—I'm tired of repeating this.
Xstro fully supports Render. To deploy Xstro on Render without errors and timeouts:
- Register a Render Account.
- Use BetterStack for monitoring.
BetterStack ensures the bot stays alive. Don’t ask, “Why is my bot dead after 5 mins on Render?”—this is why.
PostgreSQL Database (Optional):
- Useful if you prefer a faster database instead of local
Sqlite3
. - Prevents loss of session and configurations on redeployment.
- Acquire the database URL from the Render Dashboard.
Thanks to GitHub Actions, all Docker builds are tested and successful.
- Use PORT:8000 to avoid crashes.
- Deploy BluePrint
Create a Heroku Account and add your credit card details. Use eco dynos to save money.
Ensure Xstro is built as a Heroku Container.
- Deploy to Heroku.
- Fill variables correctly. Wrong configs = runtime failure. Don’t blame me.
Choose worker as the runtime. If you pick web, the application will crash—Heroku’s issue, not mine.
I have no idea—Koyeb banned me.
Xstro now supports panel deployment.
- Create an
index.js
file at the root of your panel. - Add variables in the correct format (
SESSION_ID: 'Xstro_something'
). - Run the script below to install and start Xstro:
const { existsSync, writeFileSync } = require('node:fs');
const { spawnSync } = require('node:child_process');
const path = require('node:path');
const CONFIG = {
SESSION_ID: '', // Put your Session ID Here kid!
PROJECT_DIR: 'Xstro',
REPO_URL: 'https://github.com/AstroX11/Xstro.git',
APP_NAME: 'Xstro',
MAIN_SCRIPT: 'index.js',
};
function handleError(message, error) {
console.error(message, error);
process.exit(1);
}
function cloneRepository() {
console.log('Cloning repository...');
const cloneResult = spawnSync('git', ['clone', CONFIG.REPO_URL, CONFIG.PROJECT_DIR], { stdio: 'inherit', shell: true });
if (cloneResult.error || cloneResult.status !== 0) handleError('Failed to clone repository.', cloneResult.error);
}
function writeEnvFile() {
try {
writeFileSync(path.join(CONFIG.PROJECT_DIR, '.env'), `SESSION_ID=${CONFIG.SESSION_ID}`);
} catch (error) {
handleError('Failed to write .env file', error);
}
}
function installDependencies() {
console.log('Installing dependencies...');
const installResult = spawnSync('yarn', ['install'], { cwd: path.resolve(CONFIG.PROJECT_DIR), stdio: 'inherit', shell: true });
if (installResult.error || installResult.status !== 0) handleError('Failed to install dependencies.', installResult.error);
}
function startApplication() {
console.log('Starting application...');
const startResult = spawnSync('pm2', ['start', CONFIG.MAIN_SCRIPT, '--name', CONFIG.APP_NAME, '--attach'], {
cwd: path.resolve(CONFIG.PROJECT_DIR),
stdio: 'inherit',
shell: true,
});
if (startResult.error || startResult.status !== 0) handleError('Failed to start the application.', startResult.error);
}
function XstroPanel() {
if (!existsSync(CONFIG.PROJECT_DIR)) cloneRepository();
writeEnvFile();
installDependencies();
startApplication();
}
XstroPanel();
Warning: Don’t change any code—just add your Session ID and run the bot.
Download Node.js v22.12.0 here. Restart your PC after installation.
Install Git, then paste the following commands in PowerShell:
npm i -g pm2 yarn
git clone https://github.com/AstroX11/Xstro.git
cd Xstro
yarn install
If you don’t trust the terminal, create a .env
file manually and paste:
SESSION_ID=null
CMD_REACT=true
BOT_INFO=Astro;Xstro-Md;
MODE=private
AUTO_STATUS_READ=false
AUTO_READ=false
STICKER_PACK=Astro;Xstro
PREFIX=./,
npm start
npm stop
Want to help? Fork the repo and create a pull request. Don’t break anything.