Skip to content

1. Docker Deployment (TKE)

TKE (ThinkLink Enterprise) is the self-hosted edition of ThinkLink. It runs via Docker Compose and is designed for scenarios where data must stay on-premises or within a private network.

Repository: https://gitee.com/manthink_bj/thinklink-docker


1.1. Requirements

ItemRequirement
Operating SystemLinux (Ubuntu 20.04 / 22.04 or CentOS 7/8 recommended)
CPU Architecturex86_64 (x64) — ARM is not currently supported
Memory≥ 4 GB recommended
DockerDocker Engine + Docker Compose must be installed
PermissionsRoot access required (or a user in the docker group)

Don't have Docker yet? See 1.2. Install Docker below. If Docker is already installed, skip ahead to 1.3. Open Ports.


1.2. Install Docker

If Docker is not installed on your server, run the following one-liner (requires internet access):

bash
curl -fsSL https://get.docker.com | sh

Verify the installation:

bash
docker --version
docker compose version

Both commands should print a version number. If they do, Docker is ready.


1.3. Open Ports

ThinkLink uses the following ports. If your server is hosted on a cloud provider, you must open these ports in its security group / firewall rules. Local or on-premises servers typically require no extra steps.

PortProtocolPurpose
80TCPWeb management UI (HTTP)
443TCPWeb management UI (HTTPS, optional)
1883TCPMQTT (devices and third-party integrations)
1700UDPLoRaWAN Network Server (gateway uplink)
8083TCPMQTT over WebSocket

On cloud providers such as AWS, Azure, GCP, and others, adding an inbound rule to the security group or firewall rules in the console is required. Configuring iptables on the server alone is not enough.


ThinkLink supports two installation methods. Choose based on your server's network access:

MethodWhen to useHow it works
Online installServer has internet accessDocker Compose pulls images from Docker Hub automatically — fewest steps
Offline installAir-gapped / intranet serverDownload image archives on a connected machine, transfer and import them manually

1.4.1. One-Command Install (Online)

Use the following script when the server can reach the internet:

bash
# 1. Clone the configuration repository (requires git)
git clone https://gitee.com/manthink_bj/thinklink-docker.git
cd thinklink-docker

# 2. Start all services (images are pulled automatically)
docker compose up -d

# 3. Check service status
docker compose ps

Once all containers show running, ThinkLink is deployed and ready.

If git is not available, download the ZIP archive from the repository page and extract it manually.


1.4.2. Offline Install (Manual Image Import)

Step 1 — Download the image archive on a machine with internet access

Download the image files (.tar format) from:

https://www.jianguoyun.com/p/DfMDLSgQjJyUBxj__5QGIAA

Step 2 — Transfer the archive to your server

bash
scp imagename.tar user@your-server:/opt/thinklink/

Step 3 — Import the images

On the server:

bash
docker load -i /opt/thinklink/imagename.tar

Run docker images afterwards to confirm the images were loaded successfully.

Step 4 — Transfer the configuration files

Copy the thinklink-docker repository folder (containing docker-compose.yml and related config) to the server — either via scp, a USB drive, or any other transfer method available in your environment.

Step 5 — Start the services

bash
cd thinklink-docker
docker compose up -d
docker compose ps

1.5. Verify the Services Are Running

Check container status

bash
docker compose ps

Expected output (all services show Up under STATUS):

NAME                STATUS          PORTS
thinklink-web       Up              0.0.0.0:80->80/tcp
thinklink-server    Up              0.0.0.0:1883->1883/tcp ...
thinklink-db        Up              ...
...

If any container shows Exit or Restarting, inspect its logs to diagnose the issue:

bash
docker compose logs <service-name>
# For example:
docker compose logs thinklink-server

Check that ports are listening

bash
ss -tlnp | grep -E '80|443|1883|8083'

Each expected port should appear in a LISTEN line, confirming the service is ready to accept connections.


Once the services are running, open a browser and go to:

http://<server-IP>

For example, if your server's IP is 192.168.1.100, navigate to http://192.168.1.100. The ThinkLink login page will appear.

Port 80 is the default HTTP port — browsers use it automatically, so you do not need to type :80 in the address bar.

⚠️ Security notice: change the default password immediately The system ships with a factory default password. Anyone who can reach this address can log in. After your first login, go to Personal Center and change the password right away to prevent unauthorized access.

Then go to Organization Management to create or join an organization before using any platform features.


1.7. Using TKE Alongside the Cloud Platform

If you also use the official ThinkLink cloud platform, we recommend using the same organization account name on your TKE instance. This lets you sync device profiles and thing models from the cloud to your private deployment without any remapping, and gateways can switch between platforms without configuration changes.

See: Organization Management → Why You Need an Organization

⚠️ Important: never have the same LoRaWAN device profile active on two platforms at the same time.

If a device has an active profile on both TKE and the cloud platform (or TKG), both platforms will respond to that device's Join requests and Confirm packets simultaneously. This causes Join conflicts, downlink collisions, and erratic behavior — the device may repeatedly disconnect or fail to communicate. When you see issues like this, check for duplicate active profiles first.

Fix — apply on the platform you are NOT actively using (pick one):

  1. Set the device's LoRaWAN profile enable to false
  2. Set downEnable to false (block downlinks only)
  3. Delete the device profile from that platform

1.8. Troubleshooting

Issue 1: Image pull fails during docker compose up

Symptom: Running docker compose up -d errors out with a connection failure or download timeout from Docker Hub.

Cause: The server has no internet access, or the connection to Docker Hub is too slow.

Solution: Switch to offline install

  1. On a machine with internet access, download the image archive (.tar format) from:

    https://www.jianguoyun.com/p/DfMDLSgQjJyUBxj__5QGIAA

    Also download the repository ZIP from: https://gitee.com/manthink_bj/thinklink-docker (click Download ZIP in the top-right corner of the page).

  2. Transfer both files to the server via USB drive, scp, or any other available method.

  3. Import the images on the server:

    bash
    docker load -i imagename.tar
  4. Extract the configuration archive and start the services:

    bash
    unzip thinklink-docker-master.zip
    cd thinklink-docker-master
    docker compose up -d

Issue 2: A container exits immediately after starting (status Exit)

Diagnosis:

bash
# Show all containers including stopped ones
docker compose ps -a

# View the full logs for the exited container
docker compose logs <service-name>

Common causes:

Log keywordCauseFix
permission deniedCurrent user lacks Docker permissionsRun with sudo, or add the user to the docker group and re-login
address already in usePort is already occupiedUse ss -tlnp to find and stop the conflicting process, or change the port mapping in docker-compose.yml
no space left on deviceDisk is fullCheck with df -h; free space by running docker system prune
cannot connect to the Docker daemonDocker service is not runningRun systemctl start docker

Issue 3: Containers are running but the web UI is unreachable

Diagnosis:

bash
# 1. Confirm containers are running
docker compose ps

# 2. Confirm port 80 is listening
ss -tlnp | grep 80

# 3. Test locally on the server
curl -I http://localhost

Common causes:

  • Cloud security group does not allow port 80 — Add an inbound TCP 80 rule in your cloud provider's console (see 1.3. Open Ports).
  • Local firewall is blocking traffic — Check with firewall-cmd --list-ports or iptables -L.

Issue 4: docker or docker compose command not found

Symptom: command not found

Fix:

  • docker not found → See 1.2. Install Docker.

  • docker compose not found (but docker works) → Docker version is too old. Upgrade to Docker Engine 20.10+ which bundles Compose V2:

    bash
    curl -fsSL https://get.docker.com | sh
  • If the older standalone binary is installed, it uses a hyphen. You can use it as a temporary workaround:

    bash
    docker-compose up -d

Quick-reference: common diagnostic commands

bash
# Show all container statuses (including stopped)
docker compose ps -a

# Stream logs for a service in real time
docker compose logs -f <service-name>

# Monitor live resource usage
docker stats

# Check disk space
df -h

# Check which ports are listening
ss -tlnp | grep -E '80|443|1883|1700|8083'

# Restart all services
docker compose restart

# Full stop and restart
docker compose down && docker compose up -d