Docker Single Node Deployment
Deploy WuKongIM as a single node using Docker Compose for development and small production environments.Overview
Single node deployment is ideal for:- Small Applications: Up to 400k daily active users
- Development Environment: Testing and development
- Simple Setup: Quick deployment with minimal configuration
- Cost-Effective: Single server deployment
Scaling: Single node can be easily upgraded to cluster mode later without data migration.
Advantages
- Simple deployment and management
- Good performance for moderate loads
- Supports online scaling to cluster
- Lower resource requirements
Disadvantages
- No automatic failover
- Manual backup required
- Single point of failure
Prerequisites
Before starting, ensure you have:1
Linux System
Ubuntu 18.04+ or CentOS 7+ (Ubuntu 20.04+ recommended)
2
Hardware Requirements
- Minimum: 2 cores, 4GB RAM
- Recommended: 4 cores, 8GB RAM
3
Docker Installation
Docker 20.10+ and Docker Compose 1.29+
4
Network Access
Ports 5001, 5100, 5200, 5300 available
Installation
1. Create Installation Directory
2. Create Docker Compose Configuration
Create adocker-compose.yml file with the following content:
Important: Replace the following placeholders with your actual values:
YOUR_EXTERNAL_IP: Your server’s external IP addressYOUR_INTERNAL_IP: Your server’s internal IP address
3. Configure Prometheus Monitoring
Create aprometheus.yml file for monitoring:
4. Start the Services
Configuration
Environment Variables
Key environment variables for single node deployment:| Variable | Description | Example |
|---|---|---|
WK_CLUSTER_NODEID | Unique node identifier | 1001 |
WK_EXTERNAL_IP | External IP for client connections | 203.0.113.1 |
WK_CLUSTER_SERVERADDR | Internal communication address | 10.0.1.100:11110 |
WK_TOKENAUTHON | Enable token authentication | true |
WK_MODE | Running mode | release |
Security Configuration
For production environments, enable authentication:Verification
1. Health Check
2. Get Connection Information
3. Access Management Interface
Open your browser and navigate to:- Management Interface:
http://YOUR_EXTERNAL_IP:5300 - Prometheus Monitoring:
http://YOUR_EXTERNAL_IP:9090 - Demo Interface:
http://YOUR_EXTERNAL_IP:5172
Data Management
Backup
Restore
Troubleshooting
Common Issues
Port binding errors
Port binding errors
Check if ports are already in use:
Connection refused
Connection refused
Verify the service is running and healthy:
External IP issues
External IP issues
Ensure firewall allows connections:

