KB: Configure MOKO / KKM / Taguard Gateways to connect to eruditek.com

Use this guide to configure IoT gateways (MOKO, KKM, Taguard) to connect to the Mosquitto MQTT broker running on eruditek.com. The broker supports plain MQTT, MQTT over TLS, WebSockets and WSS.

1. Broker information

ProtocolHostnamePortSecurityNotes
MQTT (non-SSL)eruditek.com1883NoneStandard MQTT
MQTT (non-SSL, extra)eruditek.com1884NoneExtra plain TCP port
MQTT (non-SSL, extra)eruditek.com8884NoneExtra plain TCP port
MQTT (TLS)eruditek.com8883TLS/SSLRequires CA certificate
WebSocket (non-SSL)eruditek.com1885NoneFor browser-based clients
WebSocket Secure (WSS)eruditek.com8885TLS/SSLRequires CA certificate

2. Certificates required (for TLS / WSS)

For secure connections (ports 8883 and 8885), gateways must use the CA certificate that signed the broker certificate.

  1. Download the CA certificate (example):
    https://eruditek.com/ca.crt
  2. Upload or paste this CA certificate into the gateway's CA Certificate or Trusted Root field.
  3. No client certificate/key is required unless you enable mutual TLS (mTLS) later.

3. MOKO Gateway configuration (summary)

  1. Open the MOKO Gateway Web UI and go to MQTT Settings.
  2. Configure:
Host: eruditek.com
Port: 8883  # recommended (TLS)
Client ID: MOKO-GW01
Username/Password: (leave empty if allow_anonymous = true)
TLS Enable: ✔ (if using 8883)
CA Certificate: Upload ca.crt
    

Save & reboot the gateway. Check gateway logs for a successful connection message.

4. KKM Gateway configuration (summary)

  1. Open the KKM Gateway web console > Network → MQTT Settings.
  2. Enter settings:
    Server: eruditek.com
    Port: 8883  # secure or 1883 for non-secure
    Protocol: MQTT (or WSS for websocket-based clients)
    Client ID: KKM-GW01
    TLS/SSL: Enable for 8883
    CA Certificate: Upload ca.crt
            
  3. Apply and restart the gateway service, then check diagnostics.

5. Taguard Gateway configuration (summary)

  1. Access Taguard Gateway Dashboard > IoT Cloud → MQTT Config.
  2. Fill settings:
    Broker Address: eruditek.com
    MQTT Port: 8883  # preferred
    Client ID: TAGUARD-GW01
    Authentication: Disabled (unless you enable username/password later)
    Enable TLS: ✔ (for 8883)
    Upload CA Cert: ca.crt
            
  3. Save — gateway will auto-reconnect until successful.

6. Testing the connection

Run these from a machine with mosquitto-clients installed:

# Non-SSL test
mosquitto_sub -h eruditek.com -p 1883 -t "test/topic" -v

# TLS test
mosquitto_sub -h eruditek.com -p 8883 --cafile ca.crt -t "test/topic" -v
    
Expected: client connects and shows subscription; TLS test verifies CA trust.

7. Firewall & Network

8. Troubleshooting

Note: If you prefer, you can restrict anonymous access and create username/password accounts. Additionally, you can bind listeners to specific interfaces by adding bind_address per listener in /etc/mosquitto/mosquitto.conf.