deploy-backend.md (2140B)
1 --- 2 label: 2. Deploy Backend 3 order: 870 4 --- 5 6 # Step 2: Deploy Backend (The Listener) 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 Logs 25 Go to `https://your-app.onrender.com/logs` to see the logs from server. You have to login first to see the logs. 26 !!! 27 28 ## Excluding specific chats from logging 29 30 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: 31 32 ```javascript 33 // --- CONFIGURATION --- 34 const PORT = process.env.PORT || 3000; 35 const AUTH_USER = process.env.AUTH_USER; 36 const AUTH_PASS = process.env.AUTH_PASS; 37 const MAX_LOGS = 500; 38 const MAX_CONNECTIONS_PER_TOKEN = 15; 39 const VERSION = '4.2.3'; 40 const EXCLUDED_JIDS = new Set(['']); 41 42 module.exports = { 43 PORT, 44 AUTH_USER, 45 AUTH_PASS, 46 MAX_LOGS, 47 MAX_CONNECTIONS_PER_TOKEN, 48 VERSION, 49 EXCLUDED_JIDS 50 }; 51 ``` 52 53 `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. 54 55 Continue to [Connect WhatsApp](connect-whatsapp.md).