Skip to main content

💾 Whinself on Synology NAS

This guide will walk you through setting up Whinself on a Synology NAS, turning your network storage into a powerful WhatsApp API server.

Prerequisites

Before you begin, ensure you have:

  • A Synology NAS with Docker package installed
  • DSM 6.2 or later
  • Admin access to your Synology
  • A WhatsApp account
  • Basic knowledge of Synology DSM interface

Step 1: Prepare Your Synology NAS

First, make sure your Synology is up to date and has the Docker package installed:

  1. Log in to your Synology DSM interface
  2. Go to Control Panel > Update & Restore and apply any available updates
  3. Open Package Center and search for "Docker"
  4. Install the Docker package if it's not already installed

Step 2: Create the Configuration File

  1. Create a folder for Whinself on your Synology:

    • Open File Station
    • Navigate to a location where you want to store Whinself configuration (e.g., create a folder named "whinself" in docker folder)
    • Create a new folder if needed
  2. Create the config.json file:

    • Right-click in the folder and select Create > Create File
    • Name it config.json
    • Edit the file and add the following configuration:
{
"slotid": "synology-whatsapp",
"nrurl": "https://your-webhook-endpoint.com/api/messages",
"portin": 9001,
"devicename": "Synology WhatsApp Bot",
"debuglevel": 0,
"logstdout": true,
"logsse": true
}

Replace https://your-webhook-endpoint.com/api/messages with your actual webhook URL where you want to receive incoming messages. You can use a service like webhook.site for testing.

Step 3: Deploy Whinself Container via Docker

  1. Open the Docker package from the Synology main menu
  2. Go to the Registry tab
  3. Search for inutil/whingo
  4. Select the image and click Download
  5. Select the latest tag and click Select
  6. Wait for the download to complete

Now set up the container:

  1. Go to the Image tab
  2. Select the downloaded inutil/whingo:latest image
  3. Click Launch
  4. In the "Container Name" field, enter whatsapp-bot
  5. Click on Advanced Settings

In the advanced settings:

  1. Volume tab:

    • Click Add Folder
    • Select the folder where you created the config.json file
    • Set the mount path to: /app/config
    • Make sure "Read/Write" is selected
  2. Port Settings tab:

    • Configure local port and container port both as 9001 (or your chosen port from config.json)
    • Make sure the port matches your portin value in the config.json file
  3. Environment tab:

    • No additional variables needed as we're using the config file
  4. Auto-restart: Set to "On abnormal exit"

  5. Click Apply and then Next and finally Apply to start the container

Step 4: Configure Synology Application Portal (Optional)

For easier access to Whinself through a friendly URL:

  1. Go to Control Panel > Application Portal
  2. Click Create
  3. Set the following options:
    • Name: Whinself
    • Protocol: HTTP
    • Hostname: Leave as default or set a custom one if you have configured DNS
    • Port: 9001 (or your chosen port)
    • Secure connection: Enable if you have HTTPS set up (recommended for production)
  4. Click OK to save

Now you can access Whinself through the Application Portal on your DSM.

Step 5: Access the Whinself Dashboard

Access your Whinself dashboard using one of these methods:

  1. Direct access:

    http://YOUR_SYNOLOGY_IP:9001
  2. Via Application Portal (if configured in Step 4):

    • Log in to DSM
    • Click the Main Menu button
    • Select Whinself from your applications

Step 6: Register an Account

When accessing the Whinself dashboard for the first time, you'll need to create an account:

Note: If you already have a Whinself account, you can skip the registration process and simply log in with your existing credentials.

  1. On the welcome screen, click the "Sign Up" button
  2. Enter your email address and create a password
  3. Submit the registration form
  4. Check your email inbox for a verification email from Whinself
  5. Click the verification link in the email to activate your account
  6. Return to the Whinself dashboard and log in with your newly created credentials

Step 7: Connect WhatsApp

After logging in to your Whinself account:

  1. If you've just created a new account, you'll need to click the "Subscribe" button to activate your free trial

    Note: The free trial doesn't require any credit card information or payment details. It allows you to test Whinself functionality for a few days without any commitment.

  2. Once subscribed, you should see a QR code on the dashboard

  3. Open WhatsApp on your smartphone

  4. Go to Settings > Linked Devices > Link a Device

  5. Scan the QR code displayed on the Whinself dashboard

  6. Wait for the connection to be established

Once connected, you should see the status indicators on the dashboard turn green, indicating that Whinself is connected to WhatsApp. The dashboard will also display the phone number of the WhatsApp account you've connected.

Note: You can connect multiple WhatsApp accounts to your Whinself installation, but only one can be active at a time. To switch accounts, you'll need to disconnect the current one and connect another by scanning a new QR code.

Step 8: Test Sending a Message

You can test sending a message using curl from another computer or directly from your Synology if you have the right packages installed:

curl -X POST http://YOUR_SYNOLOGY_IP:9001/wspout \
-H "Content-Type: application/json" \
-d '{
"text": "Hello from my Synology Whinself server!",
"jid": "[email protected]"
}'

Replace 1234567890 with an actual phone number (including country code) you want to message.

Step 9: Make Whinself Accessible from Outside (Optional)

To access your Whinself server from outside your local network:

Option A: Synology QuickConnect

  1. Go to Control Panel > QuickConnect
  2. Set up QuickConnect if you haven't already
  3. Go to Control Panel > Router Configuration > Port Forwarding
  4. Create a port forwarding rule for port 9001 (or your chosen port)
  5. Access your Whinself dashboard through your QuickConnect ID:
    http://YOUR_QUICKCONNECT_ID.quickconnect.to:9001

Option B: Synology Reverse Proxy

For a more secure setup with custom domain and HTTPS:

  1. Go to Control Panel > Application Portal > Reverse Proxy
  2. Click Create
  3. Configure the reverse proxy:
    • Source: Your custom domain and HTTPS port (443)
    • Destination: localhost and your Whinself port (9001)
    • Enable HTTPS and configure your certificate
  4. Click OK to save

Now you can access Whinself securely through your custom domain with HTTPS.

Troubleshooting

Container not starting

Check logs in the Docker package:

  • Go to Docker > Container
  • Select the whatsapp-bot container
  • Click Details > Log

Cannot access the web interface

  • Verify the container is running
  • Check the port forwarding settings
  • Ensure no firewall rules are blocking access

WhatsApp connection issues

  1. Check container logs
  2. Ensure your Synology has stable internet
  3. Verify your phone has a stable connection
  4. Try reconnecting by generating a new QR code

Managing Your Whinself Installation

Updating Whinself

  1. Go to Docker > Registry
  2. Search for inutil/whingo
  3. Click Download and select latest
  4. Go to Container tab
  5. Stop the existing container
  6. Right-click and select Reset
  7. Start the container again

Backing Up Your Configuration

Make sure to periodically back up your config.json file as part of your regular Synology backup routine.

Conclusion

You now have a reliable WhatsApp API server running on your Synology NAS. This setup allows you to maintain control over your WhatsApp integration while taking advantage of your NAS's reliability and always-on nature.

Remember that Whinself is an unofficial third-party tool that connects to the WhatsApp network using your personal WhatsApp account. It is not affiliated with, authorized, maintained, sponsored, or endorsed by WhatsApp or Meta Platforms, Inc. Always ensure your usage complies with WhatsApp's Terms of Service.