Skip to main content

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 a docker-compose.yml file with the following content:
Important: Replace the following placeholders with your actual values:
  • YOUR_EXTERNAL_IP: Your server’s external IP address
  • YOUR_INTERNAL_IP: Your server’s internal IP address

3. Configure Prometheus Monitoring

Create a prometheus.yml file for monitoring:

4. Start the Services

Configuration

Environment Variables

Key environment variables for single node deployment:

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

Check if ports are already in use:
Verify the service is running and healthy:
Ensure firewall allows connections:

Log Analysis

Next Steps

Scale to Cluster

Upgrade to multi-node cluster deployment

Configure Authentication

Set up user authentication

API Integration

Start using the WuKongIM API

Monitoring Setup

Set up comprehensive monitoring