Before you start.
Is this the right guide?
There are two ways to own RS WhatsApp. This guide is for the second one.
| You bought | What you do | Your guide |
|---|---|---|
| A Pro plan (licence) | You install our app on your VPS with one command and sell workspaces. You change no code. Keys, updates and the licence server stay ours. | Pro plan VPS guide |
| The full source code | You put your own name on the app, run your own licence panel, make your own keys and plans, build your own installer and sell it as your product. | This guide |
What is in the source code
| Folder or file | What it is |
|---|---|
out/ | The app itself (the main program, the screens, the server mode). Most of your edits are here. |
src/ | The screens that are built into out/renderer/assets/assistant.js with one command. |
tools/ | Scripts: VPS install, building, signing updates, making your update key. |
build/ | The app icon (icon.png, icon.ico). |
license-server/ | Your licence panel (PHP + MySQL): customers by Gmail, plans, trials, resellers, the VPS install command. |
package.json | The app name, version and installer settings. |
guide/ | These guides. |
How the parts talk to each other:
- 01Your panelKeeps your customers' Gmail plans and signs every licence.
- 02Your appYour name and icon, pointed at your panel.
- 03Your releasesInstallers and updates on GitHub, signed with your key.
- 04Your customersSign in with Google; you set their plan.
What you need
| What | Details |
|---|---|
| A Windows 10 or 11 PC | To build the Windows installer. |
| Node.js 22 (LTS) or newer | Free from nodejs.org. Install it with the default options. |
| VS Code | A free text editor from code.visualstudio.com, to change the lines. |
| A GitHub account | Free. Holds your installer so your customers' apps can update. |
| Web hosting with PHP 8.1+ and MySQL | For your licence panel. Hostinger, any cPanel host or your own VPS works. It needs HTTPS (free SSL is fine). |
| A domain | For example yourbrand.com. The panel will live on license.yourbrand.com. |
| Optional: a VPS | Only if you want to run the app on a server or sell VPS hosting (part 5). |
| A Google account (Google Cloud) | Free. Your customers sign in to your app with Google, and their plan is found by their Gmail (step 14). |
Host your licence panel.
Make the panel's address and database
Do this in your hosting panel (hPanel on Hostinger, or cPanel).
- Add a subdomain:
licenseon your domain, so it becomeslicense.yourbrand.com. Note the folder it makes (for examplepublic_html/licenseordomains/license.yourbrand.com/public_html). - Turn on SSL (HTTPS) for that subdomain. Most hosts do it with one switch.
- Open MySQL Databases and make a new database and a database user with a strong password. Give the user all privileges on that database.
- Write down four things: the database host (usually
localhost), the database name, the user and the password.
https://license.yourbrand.com shows an empty page or the host's default page with a lock icon, and you have the four database details.Upload the panel files
- On your PC, open the source code folder and go into
license-server. - Select everything inside it (also the hidden
.htaccessfile), right-click › Compress to ZIP. - In your hosting panel open File Manager and go into the subdomain's folder from step 4.
- Upload the ZIP there and Extract it. The files (
login.php,update_setup.php,includes…) must sit directly in that folder, not inside another folder. - Delete the ZIP file after extracting.
.htaccess is there. The panel's address rules and safety rules live in it.Put in your database login
- In File Manager, find
config.example.php, copy it and name the copyconfig.php. - Open
config.php(Edit) and change these four lines with your details from step 4:
| Line | Now says | Change to |
|---|---|---|
| 11 | define('DB_HOST', 'localhost'); | Your database host (keep localhost if your host says so) |
| 12 | define('DB_NAME', 'your_database_name'); | Your database name |
| 13 | define('DB_USER', 'your_database_user'); | Your database user |
| 14 | define('DB_PASS', 'your_database_password'); | Your database password |
- Save. Keep the quotes and the semicolon exactly as they are; change only the text inside the quotes.
Build the tables and your admin
- Open
https://license.yourbrand.com/update_setup.phpin your browser. - It builds every table and makes your own signing keys (the keys that prove a licence came from you). You see a list of green lines and Update completed successfully.
- Under it, the form Create the first admin shows. Type a username, your email and a password of 10+ characters, and press Create admin.
- It opens the sign-in page. Sign in with what you just made.
Set up your panel
- Open RS WhatsApp Keys in the sidebar.
- Press the ⋮ menu at the top and choose Server settings.
- Fill in your product name, the key prefix (like
BRND), your support WhatsApp and email, the trial days and the renew / buy link. Press Save. - In the same window, copy the two values at the bottom: Server address (like
https://license.yourbrand.com/api/license) and Public key (a long line). You paste both into the app in step 10. Keep them in a text file.
Your plans and prices
The two plans (Starter and Pro) and their prices are in one line of the panel. In File Manager open includes/lib/license.php, line 68:
return [['Starter', 30, 50, '2.99', 1, array_values(array_diff($all, ['social'])), 'WhatsApp and email', 50], ['Pro', 30, 0, '9.99', 5, $all, 'Priority', 0]];Each plan is in square brackets, in this order:
| Place | Meaning | Starter now |
|---|---|---|
| 1 | Plan name | 'Starter' |
| 2 | Days the plan lasts | 30 |
| 3 | New AI contacts a day (0 = unlimited) | 50 |
| 4 | Price in USD | '2.99' |
| 5 | WhatsApp numbers | 1 |
| 6 | Features (Starter has all except Facebook / Instagram) | array_values(…) |
| 7 | Support text | 'WhatsApp and email' |
| 8 | Messages a day (0 = unlimited) | 50 |
Change only the numbers and the text in quotes, then save. VPS hosting and SaaS seats follow the Pro plan.
Make the app yours.
Open the code on your PC
- Unzip the source code to a short path, for example
C:\rswa. - Open VS Code › File › Open Folder › pick that folder.
- Open the terminal inside VS Code: Terminal › New Terminal. Run this once (it downloads what the app needs, a few minutes):
npm installYour name, panel and contact
Everything that makes the app yours is in one block. Open out/main/index.js and go to line 78 (search for var BRAND = {). Change these lines:
| Line | Field | Put |
|---|---|---|
| 79 | name | Your app name, like "BrandChat". Windows shows it on the window, tray and notifications. |
| 80 | codeName | The same name in small letters with dashes, like "brandchat". |
| 81 | appId | Your own id, like "com.yourbrand.brandchat". Use the same value in package.json (step 12). |
| 82 | publisher | Your business name. |
| 83 | website | Your website. |
| 84, 85 | buyUrl, accountUrl | Where customers buy or renew: your shop page or your WhatsApp link. |
| 86 | licenseServer | The Server address from step 8. |
| 87 | licensePublicKey | The Public key from step 8 (one long line, inside the quotes). |
| 88 | supportWhatsApp | Your WhatsApp number with the country code, digits only, like "923001234567". |
| 89 | supportEmail | Your support email. |
| 90 | releasesRepo | Your GitHub releases repository, like "yourname/brandchat-releases" (step 16). |
Other places with our name
These lines still point at Rameez Scripts. Change each one to your own domain, WhatsApp or email.
| File | Line | What to change |
|---|---|---|
out/main/index.js | 4989 | https://license.rameezscripts.com/r/ → https://license.yourbrand.com/r/ |
out/main/index.js | 5491 | The demo install command text: change the domain to yours. |
out/main/web/server.js | 280 | The sign-in page footer (WhatsApp link and email). |
out/main/saas/tenants.js | 231 | "Ask Rameez Scripts for more seats" → your name. |
src/saas/page.jsx | 62–66 | The WhatsApp number, the Pro plan link and "Rameez Scripts". |
src/settings/page.jsx | 267 | "Rameez Scripts" in the SaaS hint. |
src/integrations/widget.jsx | 19 | The comment inside the website chat button code. |
The app name on the screens
- In VS Code press Ctrl + Shift + H (Replace in files).
- Search
RS WhatsApp, replace with your app name, and in "files to include" typesrc, out/renderer/index.html. Press Replace All. - The language files in
src/i18n/are changed too, which keeps the translations working. - Rebuild the screens:
npm run build:uiInstaller name and icon
Open package.json and change:
| Line | Now says | Change to |
|---|---|---|
| 3 and 40 | "productName": "RS WhatsApp" | Your app name |
| 6 | "description": … | One line about your app |
| 7 | "author": … | Your name and email |
| 8 | "homepage": … | Your website |
| 39 | "appId": "com.rameezscripts.rswhatsapp" | The same appId as step 10 |
| 41 | "copyright": … | Copyright (c) 2026 your business |
| 82, 83 | "shortcutName", "uninstallDisplayName" | Your app name |
| 90, 91 | "owner", "repo" | Your GitHub user name and your releases repository (step 16) |
- Icon: replace
build/icon.png(512 × 512 px) andbuild/icon.icowith your own, same names. - Keep line 85 (
"artifactName") as it is. If you rename the installer there, change the same name intools/sign-update.mjsline 16 too.
Your own update key
Your apps only install updates that are signed with your key. Make it once:
node tools/make-update-key.mjs- It saves your private key in
C:\Users\YOU\.config\rs-whatsapp\update-signing.pemand prints two public values. - Open
out/main/update-verify.js, line 12, and put value 1) inside the quotes ofUPDATE_KEY = "…". - Open
tools/install.sh, lines 36 to 38 (PUB="-----BEGIN PUBLIC KEY-----), and replace the three lines with value 2).
update-signing.pem to a USB stick or a password manager. If you lose it, the apps you already sold can never update again. Never share it and never upload it anywhere.Google sign-in (needed)
Your customers sign in to your app with their Google account. Their plan is found by that Gmail, and their data is kept in their own Google Sheet. You need your own Google "client" for this. It is free.
- Open console.cloud.google.com and sign in with your Google account. Make a new project named after your app.
- APIs & Services › Library: turn on Google Sheets API and Google Drive API.
- APIs & Services › OAuth consent screen (Google Auth Platform): app name, your support email, and your website. Audience: External.
- Under Data access add the scopes
openid,email,profileand.../auth/drive.file. - Under Clients press Create client, type Desktop app, give it a name and press Create. Copy the Client ID and the Client secret.
- Back in Audience, press Publish app so it is In production (in Testing, only test users you add can sign in).
- In your panel: RS WhatsApp Keys › ⋮ › Server settings: paste the Client ID and the Client secret, and Save. The secret stays on your panel, never in the app.
- In the code: open
out/main/google-auth.js, line 18, and put your Client ID inside the quotes ofGOOGLE_CLIENT = "…".
https://license.yourbrand.com/privacy/ you can use.Build and ship.
Build your installer
- Open
package.jsonand set line 4"version"to your first version, for example"1.0.0". - In the VS Code terminal run:
npm run dist- Wait a few minutes. Your installer is in the
distfolder:RS-WhatsApp-Setup-1.0.0.exe(with your app name inside). - Install it on your PC and check: your app name, your icon, and on the License page your own support contact.
- Sign in with Google in the app. Your trial starts, and the Gmail shows up in your panel (step 18).
Send updates to your customers
- On GitHub make a public repository for your installers, for example
brandchat-releases(the one in package.json lines 90–91). - After each
npm run dist, sign the update (use your version number):
node tools/sign-update.mjs 1.0.0- On GitHub open the repository › Releases › Draft a new release. Tag:
v1.0.0. - Attach three files from
dist: the.exe, the.exe.blockmapandlatest.yml. Press Publish release. - In your panel, Server settings › Latest version: type the new version. Installed apps find the update within an hour.
npm run dist, sign, and publish a new release. Only signed releases install.Server and selling.
Run it on a VPS
The app also runs on a Linux VPS and opens in any browser. There are two ways.
A. Your own server (simple)
- Put your source code in a private GitHub repository.
- In
tools/install.shline 24, changeREPO="rameezimdad/rs-whatsapp-source"to your private repository. - Build the Linux version on a Linux PC or in WSL (Ubuntu on Windows):
OUT=dist bash tools/build-linux.sh 1.0.0. It makesRS-WhatsApp-linux-x64-1.0.0.tar.gzand a signedlinux.json. - In that private repository make a release
v1.0.0and attach both files. - On GitHub make a fine-grained access token with read-only access to that one repository (Contents: Read).
- Open your VPS (ssh) and run, with your token and repository:
curl -fsSL -H "Authorization: Bearer YOUR-TOKEN" -H "Accept: application/vnd.github.raw" https://api.github.com/repos/YOURNAME/YOUR-REPO/contents/tools/install.sh | sudo env RSWA_TOKEN=YOUR-TOKEN bashIt asks for your domain and a password, exactly like steps 8 to 10 of the Pro plan VPS guide (DNS record, firewall and first sign-in are the same).
B. Sell VPS hosting to your customers (advanced)
Your Pro customers get a one-time install command from their app, served by your panel. For this:
- In
tools/install.shchange line 27 (LIC=…), line 158 (the download address check) and line 292 (L=…) fromlicense.rameezscripts.comto your panel's domain. - Sign the install script:
node tools/sign-linux.mjs --install tools/install.sh dist/install.sig. - On your hosting, make a folder
rswa-vpsone level above the panel's web folder, and uploadinstall.sh,install.sig,linux.jsonand a filedl.txtthat holds a random folder name (32 letters a–f and 0–9). - Upload the
.tar.gzinto the panel's web folder atvdl/<that random name>/. - Your customers on Pro then press Settings › VPS hosting › Get my install command in their app, and follow the Pro plan VPS guide.
tools/release.sh (lines 41 to 47) does B for us after every release. Read it and change the domain and the SSH name to yours if you want the same one-command release.Give plans and sell
- Your customer installs your app and presses Continue with Google. Their free trial starts by itself, and a row with their Gmail shows in your panel under RS WhatsApp Keys.
- When they pay you, open their row (search their Gmail) and set the plan and the days. Or press Add Gmail at the top and type their Gmail with the plan.
- The customer presses Check now in the app (Settings › About, or the Plans page). The new plan comes in without reinstalling.
- To renew, add time to their row. To stop, pause or cancel it. The app checks once a day.
- Resellers: on the Users page add a user with the role Reseller and a limit. They can add Gmail plans within that limit.
Help.
Problems and fixes
update_setup.php says it cannot connect to the database
Check the four lines in config.php (step 6). On many hosts the user name and database name start with your account prefix, like u123_license.
The panel shows a 500 error or a blank page
Check your host uses PHP 8.1 or newer (PHP settings in your hosting panel), and that .htaccess was uploaded.
My app says the plan is invalid, or cannot reach the server
Lines 86 and 87 in out/main/index.js do not match your panel. Copy the Server address and Public key again from Server settings, rebuild with npm run dist and reinstall.
npm install or npm run dist fails
Check Node.js is version 22 or newer (node -v). Close VS Code, delete the node_modules folder and run npm install again.
My app does not find the update
The release must be public, hold the .exe, .blockmap and latest.yml, and latest.yml must be signed (step 16). The version in package.json must be higher than the installed one.
tools/sign-update.mjs says latest.yml does not match the installer
Run it right after npm run dist, with the same version number, before you change anything in dist.
Google sign-in fails or says the app is blocked
Check step 14: Sheets and Drive APIs on, client type Desktop app, the app published In production, the same Client ID in google-auth.js line 18 and in Server settings, and the secret saved in Server settings.
I lost my update key
The apps you sold cannot update any more. Make a new key (step 13), build, and ask your customers to download and install the new installer once by hand.