Quick Deployment
Page Guide
Deployment Entry And Minimal Flow
- First confirm the server system, Docker, Docker Compose, open ports, license certificate, and installation package.
- For quick evaluation, prefer the one-click script; for delivery or secondary-development environments, use the docker-compose approach so the backend jar and frontend static files can be replaced easily.
- After the services start, verify them in this order: containers, backend logs, database, cache, MQTT, Web pages, and the license page.
- Finally, use MQTTX to run through the product, device, reporting, and command-delivery link to confirm the deployment supports real business.
- The server has opened business ports such as 80, 1883, 8083, 5061, and 30000-30100/tcp/udp.
- Before deploying the commercial edition, the license certificate and installation password are ready, and you know that license information must be configured after deployment.
- When redeploying after secondary development, first confirm whether the backend jar package under
/var/dataand the frontendvuedirectory are the latest versions.
提示
- After deploying the commercial edition, log in to the system. You must configure the license information on the home page before the platform can be used normally.
- To redeploy after secondary development, you only need to replace the corresponding fastbee-admin.jar package and the contents of the
vuedirectory under/var/data.
1. One-Click Deployment Script
The one-click deployment script is built on Docker and requires Docker and Docker Compose to be installed first. The actual flow is similar to the docker-compose deployment below, consolidated into a single script so one command completes the deployment.
The command is as follows:
sudo wget -c https://hub.fastbee.cn/resource/install.sh && bash ./install.sh
Notes:
- The script covers both the open-source and commercial editions. The commercial edition is only for licensed users, and installation requires a password and certificate (contact customer service to obtain them).
- Downloading files during deployment takes some time. The script uses the official Docker images and automatically configures registry mirrors, so it is relatively fast.
- Open the corresponding ports on the server (for example: 80, 1883, 8083, 5061, 30000-30100/tcp/udp).
2. Quick Deployment With docker-compose
To deploy with docker-compose, install Docker and Docker Compose on the server first.
docker-compose installs the applications and runtime dependencies required by the project on a server or local machine. Follow the steps below to complete the deployment:
2.1. Upload Files
First upload the docker/data/ directory from the FastBee repository to the /var/ directory on the server or local machine. For the commercial edition, the backend and frontend must be repackaged: upload the backend to the /var/data/java/ directory and replace the jar file; upload the frontend to the /var/data/nginx/vue/ directory and replace its contents.
2.2. Start Deployment
Enter the /var/data/ directory on the server or local machine and run: docker-compose up -d . Wait for the execution to finish to complete the deployment.
2.3. Access The System
- After deployment, access the FastBee IoT platform through the server address. The default account is
admin admin123. - EMQX is used in the deployment. You can access the EMQX console through port 18083. The default account and password are
admin admin123.
提示
- For later redeployment, you only need to replace the
fastbee-admin.jarfile and the contents of thevuedirectory.
- The MySQL container takes time to initialize. If the backend reports errors, run
docker restart javato restart the backend. - Default accounts for quick deployment:
- System administrator: admin admin123
- mysql: root fastbee
- redis: fastbee
- EMQX console: admin admin123
- TDengine: root taosdata
- SIP: 12345678
- Data source monitoring: fastbee fastbee
2.4. Common Deployment Commands
# Pull the service images first. Duration depends on the network; you can configure Docker to use a registry mirror.
docker-compose pull
# Build and start the service containers.
docker-compose up -d
# Stop and remove the service containers.
docker-compose down
# Create the data directory.
mkdir /var/data
# Grant read, write, and execute permissions to the directory.
sudo chmod 777 /var/data2.5. Docker Registry Mirror Configuration
Run the following commands to complete the registry mirror configuration. The Docker registry mirror addresses are collected from the network; add or remove them as needed.
# 1. Stop the Docker service.
sudo systemctl stop docker
# 2. Create the directory if it does not exist.
sudo mkdir -p /etc/docker
# 3. Modify the Docker configuration file.
sudo tee /etc/docker/daemon.json <<-EOF
{
"registry-mirrors": [
"https://mirrors.ustc.edu.cn",
"https://docker.chenby.cn",
"http://mirror.azure.cn",
"https://dockerpull.org",
"https://dockerhub.icu",
"https://hub.rat.dev",
"https://dockerproxy.com",
"https://mirror.baidubce.com",
"https://docker.m.daocloud.io",
"https://docker.nju.edu.cn",
"https://docker.mirrors.sjtug.sjtu.edu.cn",
"https://docker.rainbond.cc",
"https://mirror.ccs.tencentyun.com",
"https://registry.docker-cn.com",
"https://hub-mirror.c.163.com",
"https://docker.1ms.run",
"https://doublezonline.cloud",
"https://dislabaiot.xyz",
"https://docker.fxxk.dedyn.io",
"https://docker.unsee.tech",
"https://docker.1panel.live",
"https://docker.nastool.de",
"https://docker.zhai.cm",
"https://docker.5z5f.com",
"https://a.ussh.net",
"https://docker.udayun.com",
"https://hub.geekery.cn",
"https://noohub.ru",
"https://huecker.io",
"https://dockerhub.timeweb.cloud",
"https://0c105db5188026850f80c001def654a0.mirror.swr.myhuaweicloud.com",
"https://5tqw56kt.mirror.aliyuncs.com",
"https://docker.ckyl.me/",
"https://docker.hpcloud.cloud"
]
}
EOF
# 4. Restart the Docker service.
sudo systemctl daemon-reload
sudo systemctl start docker3. Deployment Verification
After deployment, do not only check whether the page opens. Run a complete acceptance pass in the order of "containers, backend, database, cache, MQTT, business pages".
3.1. Container Status
cd /var/data
docker-compose ps
docker psAll core containers should be running. If the java, mysql, redis, emqx, or nginx container keeps restarting, check the corresponding logs first.
docker logs -n 200 java
docker logs -n 200 mysql
docker logs -n 200 redis
docker logs -n 200 emqx
docker logs -n 200 nginx3.2. Backend Service
docker logs -n 300 javaFocus on confirming that the following errors do not keep appearing:
- Database connection failure.
- Redis authentication failure.
- License certificate reading failure.
- Port occupancy.
- SQL initialization failure.
- Time-series database connection failure.
If MySQL initialization is slow, wait 1-2 minutes after the backend fails to start the first time, then restart it:
docker restart java3.3. Web Pages
Access in a browser:
http://server-ip/Default account:
| User | Password |
|---|---|
admin | admin123 |
After logging in, open at least the following pages to confirm the APIs are available:
| Page | Acceptance Criteria |
|---|---|
| Home | Statistic cards and menus load normally |
| Product Management | The list opens and the add button works |
| Device Management | The list opens and the device detail entry works |
| System Management | The user, role, and menu pages open |
| License page | The commercial edition can upload or view license information |
3.4. MQTT Service
EMQX console address:
http://server-ip:18083/Default account:
| User | Password |
|---|---|
admin | admin123 |
After entering the console, confirm the listeners are normal. Then follow Product To Device Closed Loop to establish a connection with MQTTX.
3.5. Minimal Business Verification
The final acceptance standard for deployment is not running containers, but the platform completing a real business link:
- Create a product.
- Define the thing model.
- Publish the product.
- Create a device.
- Connect to the platform with MQTTX.
- Report property data.
- Deliver commands from the platform.
For the complete steps, see Product To Device Closed Loop.
4. Docker Tutorial
Docker is an open-source application container engine. It allows developers to package their applications and dependencies into a lightweight, portable image, then publish it to any popular Linux or Windows machine, and also enables virtualization. Containers use a complete sandbox mechanism with no interfaces between each other (similar to apps on an iPhone); more importantly, container performance overhead is extremely low.
4.1. Install Docker
提示
- Docker images are pulled from the official registry by default. If downloads are slow, you can configure a registry mirror in China; see the reference tutorial.
- The desktop edition already includes the Docker engine and Docker Compose. Servers usually have Docker Engine and Docker Compose installed separately.
Install Docker on Linux
Install Docker Desktop on Windows
- Reference tutorial (installing the WSL subsystem and Windows Terminal first, then installing Docker, is recommended)
- Docker installation tutorial
Install Docker Desktop on Mac
4.2. Common Docker Commands
docker -v # Show the Docker version and verify installation.
docker ps # Show running containers.
docker ps -a # Show all containers.
docker images # Show local images.
docker info # Show Docker system-level information.
docker pull [image] # Pull an image.
docker run [image] # Run a container.
docker restart [container] # Restart a container.
docker stop [container] # Stop a container.
docker stats [container] # Show container resource usage.
docker inspect [container] # Show container metadata.
docker logs -n 1000 [container] # Show the latest 1000 log lines of a container.
docker exec -it [container] /bin/bash # Enter a running container.
docker save nginx:latest > nginx.tar # Save a single image.
docker load -i nginx.tar # Load an image from a tar file.
docker network create -d bridge fastbee-bridge # Create a new network named fastbee-bridge.
docker network ls # Show all networks.
docker network connect fastbee-bridge test # Add the test container to the custom network.
docker inspect fastbee-bridge # Show the containers in the fastbee-bridge network.4.3. Docker Network Modes
Docker has five network modes. You can specify a container network mode with --net=***.
bridge mode # Default. When accessing services inside a container from outside, use the host IP and host port.
host mode # The container IP address is the host IP address.
container mode # The container shares the network environment of another container.
overlay mode # Cross-host communication.
none mode # No network environment is created for the container; the container can only use the local network 127.0.0.1.4.4. Docker Bridge Network
A bridge network is used for communication between containers. If the containers run separately, create a bridge network with the following command:
docker network create -d bridge fastbee-bridge4.5. Common docker-compose Commands
docker-compose -v # Show the docker-compose version and verify installation.
docker-compose up -d # Build and start the service containers.
docker-compose down # Stop and remove the service containers.
docker-compose ps # List all containers in the services.
docker-compose start # Start the service containers.
docker-compose stop # Stop running service containers.
docker-compose restart # Restart the service containers.
docker-compose logs # Show service container output.
docker-compose pull # Pull images used by the services.
docker-compose config # Validate and show the compose file configuration.
