Introduction:

TangSengDaoDao is a lightweight, high-performance, security-focused open-source instant messaging system, dedicated to private deployment.

Features:

  • 🆓 Open Source & Free: Server-side code, APP code, Web/PC-side code are all open source under the Apache 2.0 open-source license (commercially usable), no one can control you.
  • 🔏 Private Deployment: All programs and data are on your own server. No need to worry about data leakage or data being used for other purposes.
  • 🆚 Guaranteed Message Delivery: Uses tcp + ack mechanism to ensure message delivery, supports offline messages, and message roaming.
  • 🔐 Content Security: Message transmission uses a private binary encryption protocol, DH + streaming encryption, to prevent message content leakage.
  • 💽 Permanent Message Storage: Messages support permanent storage, thanks to WuKongIM's proprietary messaging db. Permanent storage doesn't affect performance, just consumes some disk space.
  • 📱 Multi-Device Message Sync: Supports 1 mobile end, multiple Web/PC ends online simultaneously, and real-time message synchronization between multiple devices.
  • 📟 Full Platform Support: iOS, Android, Windows, MAC, Ubuntu, Web

Note:

In the self-deployed client, new users must use the iOS/Android app for registration and password recovery is not available.
The open source version has a lot of features that are not available and Tailchat is more recommended
Deployment Tutorial:https://enblog.fuyiran.link/Technology/13.html

System Requirements:

Configuration >= 2H8G

Deployment Steps:

Step 1: Update Source

Ubuntu/Debian:

apt update -y && apt upgrade -y

Centos:

yum update -y && yum upgrade -y

Step 2: Install and Set Up Docker

Install Docker:

curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh ./get-docker.sh

Start Docker:

sudo systemctl start docker

Set Docker to auto-start on boot:

sudo systemctl enable docker

Step 3: Create Installation Directory

sudo mkdir -p ~/tsdd && cd ~/tsdd

Step 4: Configure Parameters

  1. Configure docker-compose.yaml file

    nano docker-compose.yaml

    Enter the content below:

version: '3.1'
services:
  wukongim:  # TangSengDaoDao Communication Service (Wukong IM)
    image: registry.cn-shanghai.aliyuncs.com/wukongim/wukongim:latest
    restart: always
    ports:
      # - "5001:5001" # http api port (business side call, intranet open only)
      - "5100:5100"  # tcp long connection port (open for extranet)
      - "5200:5200" # websocket port (open on extranet)
      - "5300:5300" # monitor port
    volumes:
      - ./wukongim:/root/wukongim
    environment:
      - WK_MODE=${WK_MODE}
      - WK_EXTERNAL_IP=${EXTERNAL_IP}
      - WK_CONVERSATION_ON=true
      - WK_WEBHOOK_GRPCADDR=tangsengdaodaoserver:6979
      - WK_DATASOURCE_ADDR=http://tangsengdaodaoserver:8090/v1/datasource
      - WK_DATASOURCE_CHANNELINFOON=true
      - WK_TOKENAUTHON=true  
  tangsengdaodaoserver:  # TangSengDaoDao's operational services
    image: registry.cn-shanghai.aliyuncs.com/wukongim/tangsengdaodaoserver:latest
    restart: always
    command: "api"
    healthcheck:
      test: "wget -q -Y off -O /dev/null http://localhost:8090/v1/ping > /dev/null 2>&1"
      interval: 10s
      timeout: 10s
      retries: 3
    depends_on:
       - redis
       - mysql
       - wukongim
    ports:
      - "8090:8090"
    volumes:
      - ./tsdd:/home/tsdddata
      # - ./tsdd/configs/tsdd.yaml:/home/configs/tsdd.yaml
    environment:
      - TS_MODE=${TS_MODE}
      - TS_WUKONGIM_APIURL=http://wukongim:5001
      - TS_DB_MYSQLADDR=root:${MYSQL_ROOT_PASSWORD}@tcp(mysql)/${MYSQL_DATABASE}?charset=utf8mb4&parseTime=true&loc=Local
      - TS_DB_REDISADDR=redis:6379
      - TS_EXTERNAL_IP=${EXTERNAL_IP}
      - TS_SMSCODE=${TS_SMSCODE}
      - TS_FILESERVICE=${TS_FILESERVICE}
      - TS_MINIO_ACCESSKEYID=${MINIO_ROOT_USER}
      - TS_MINIO_SECRETACCESSKEY=${MINIO_ROOT_PASSWORD}
      - TS_AVATAR_DEFAULTBASEURL=https://api.multiavatar.com/{avatar}.png
  tangsengdaodaoweb:  # TangSengDaoDao's web service
    image: registry.cn-shanghai.aliyuncs.com/wukongim/tangsengdaodaoweb:latest
    restart: always
    environment:
      - API_URL=http://${EXTERNAL_IP}:8090/
    ports:
      - "82:80" 
  tangsengdaodaomanager:  # TangSengDaoDao's background management system
    image: registry.cn-shanghai.aliyuncs.com/wukongim/tangsengdaodaomanager:latest
    restart: always
    environment:
      - API_URL=http://${EXTERNAL_IP}:8090/
    ports:
      - "83:80"    
  minio: # minio document management service
    image: minio/minio:latest # use a remote image
    expose:
      - "9000"
      - "9001"
    command: "server /data --console-address ':9001'"
    ports:
      - "9000:9000"
      - "9001:9001"
    environment:
      - MINIO_ROOT_USER=${MINIO_ROOT_USER}
      - MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
      interval: 30s
      timeout: 20s
      retries: 3
    volumes:
      - ./miniodata:/data    
  mysql:  # mysql database
    image: mysql:latest
    command: --default-authentication-plugin=mysql_native_password
    healthcheck:
      test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
    environment:
      - TZ=Asia/Shanghai
      - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
      - MYSQL_DATABASE=${MYSQL_DATABASE}
    volumes:
      - ./mysqldata:/var/lib/mysql                    
  redis:  # redis
    image: redis
    restart: always
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 1s
      timeout: 3s
      retries: 30
  adminer:  # mysql web admin tool for debugging, don't open it for security purposes.
   image: adminer:latest
   ports:
     - 8306:8080
  1. Configure .env file

    nano .env

    Enter the content below:

# Common config

# The IP address of the server.
EXTERNAL_IP=

# MYSQL Config

 # The password of the root user of the mysql database
MYSQL_ROOT_PASSWORD=
# The name of the mysql database
MYSQL_DATABASE=im

# Minio Config

# The access key ID of the minio file service
MINIO_ROOT_USER=minio
# The secret access key of the minio file service
MINIO_ROOT_PASSWORD=

# WuKongIM Config

# debug or release
WK_MODE=debug

# TangSengDaoDao Config

# File service type, default is minio
TS_FILESERVICE=minio
# debug or release
TS_MODE=debug
# The SMS code for testing, if it is not empty, the SMS code will be this value (If you need to configure real SMS, please refer to the SMS configuration in the complete configuration)
TS_SMSCODE=123456

You need to modify the following parameters:

  • EXTERNAL_IP: External IP address of the server
  • MYSQL_ROOT_PASSWORD: Password for the root user of the MySQL database, fill in randomly
  • MINIO_ROOT_PASSWORD: Password for the Minio file service, fill in randomly (at least 8 characters)
  • TS_SMSCODE: Default SMS verification code for mobile registration

Step 5: Start Docker Containers

docker compose up -d

And open the following ports:

PortDescription
8090API port
82Web IM port
5100TCP long connection port
5200Websocket port
9000Minio file service port
9001Minio file management port (optional)
8306MySQL web management port (optional)

After deployment, you can visit https://<your-ip>:82 to access TangSengDaoDao.

Step 6: Register New User

Log in on the mobile side, click on the settings in the top right corner.

In the server configuration, the server address is the server IP address, and the port is 8090. After configuring, click the Submit button.

Return to the login screen, long press the Welcome to TangSengDaoDao button to enter the hidden login screen.

On this page, input the TS_SMSCODE set earlier as the SMS verification code to register without actual verification.

After successful registration, you can log in on the Web end using your account password or mobile number.

Relevant Links:

Official Website: https://tangsengdaodao.com

GitHub: https://github.com/TangSengDaoDao/TangSengDaoDaoServer

Tag:Configure, Instant Chat Application, TangSengDaoDao

Original link:http://enblog.fuyiran.link/Technology/44.html

Copyright: All posts on this blog, unless otherwise stated, are published using theCC BY-NC-SA 4.0 license agreement. Please indicate the source for reprinting Fu Speaking (enblog.fuyiran.link)

Add a new comment.