deploy-backend.mdx (2230B)
1 --- 2 title: "Step 2: Deploy Backend (The Listener)" 3 sidebarTitle: "2. Deploy Backend" 4 --- 5 6 import Copyright from "/snippets/copyright.mdx"; 7 8 1. **Fork the repository** to your own GitHub account: [WhatsApp-Logger-Self-Hosted-](https://github.com/notamitgamer/WhatsApp-Logger-Self-Hosted-) 9 2. Log in to [Render](https://render.com/). 10 3. Click **New +** → **Web Service**. 11 4. Connect your forked repository. 12 5. **Runtime**: select **Docker**. 13 6. Add the following **environment variables** under "Advanced": 14 15 | Variable | Value | 16 |---|---| 17 | `FIREBASE_SERVICE_ACCOUNT` | The entire content of the service-account JSON file downloaded in the Firebase step | 18 | `AUTH_USER` | A username of your choice (e.g. `admin`) | 19 | `AUTH_PASS` | A strong password — this locks your logger | 20 21 7. Click **Create Web Service**. 22 8. Wait for deployment to finish. Render gives you a URL like `https://your-app.onrender.com`. 23 24 <Tip> 25 **Logs** 26 27 Go to `https://your-app.onrender.com/logs` to see the logs from server. You have to login first to see the logs. 28 </Tip> 29 30 ## Excluding specific chats from logging 31 32 If there are chats you don't want logged at all — a bot, a broadcast/status JID, a business account — edit `EXCLUDED_JIDS` in `src/config.js` on your fork before deploying: 33 34 ```javascript 35 // --- CONFIGURATION --- 36 const PORT = process.env.PORT || 3000; 37 const AUTH_USER = process.env.AUTH_USER; 38 const AUTH_PASS = process.env.AUTH_PASS; 39 const MAX_LOGS = 500; 40 const MAX_CONNECTIONS_PER_TOKEN = 15; 41 const VERSION = '4.2.3'; 42 const EXCLUDED_JIDS = new Set(['']); 43 44 module.exports = { 45 PORT, 46 AUTH_USER, 47 AUTH_PASS, 48 MAX_LOGS, 49 MAX_CONNECTIONS_PER_TOKEN, 50 VERSION, 51 EXCLUDED_JIDS 52 }; 53 ``` 54 55 `EXCLUDED_JIDS` is a set of full JIDs (the `...@s.whatsapp.net` / `...@g.us` / `...@lid` identifiers, not just a phone number) that are skipped entirely — they won't be cached, streamed, or included in exports. It ships empty by default. You can find a chat's exact JID from the live server logs (see the tip above) the first time it logs a message, then add it here, e.g. `new Set(['917278779512@s.whatsapp.net', '201554426618024@lid'])`, and redeploy. 56 57 Continue to [Connect WhatsApp](/whatsapp-logger/connect-whatsapp). 58 59 <Copyright />