首先要有docker环境,这个环境如何装,这里就不说了,不会装可以通过阿里云购买docker镜像

Depending on the database used there are three type of ThingsBoard single instance docker images:

  • thingsboard/tb-cassandra – 超级大的single instance of ThingsBoard with Cassandra database.The most performant and recommended option but requires at least 4GB of RAM. 8GB is recommended.
  • thingsboard/tb-postgres – 一般的single instance of ThingsBoard with PostgreSQL database.Recommended option for small servers with at least 1GB of RAM and minimum load (few messages per second). 2-4GB is recommended.
  • thingsboard/tb – 最小型的 single instance of ThingsBoard with embedded HSQLDB database.Note: Not recommended for any evaluation or production usage and is used only for development purposes and automatic tests.
$ docker run -it -p 9090:9090 -p 1883:1883 -p 5683:5683/udp -v ~/.mytb-data:/data -v ~/.mytb-logs:/var/log/thingsboard --name mytb --restart always thingsboard/tb-cassandra
 docker run -it -p 9090:9090 -p 1883:1883 -p 5683:5683/udp -v ~/.mytb-data:/data -v ~/.mytb-logs:/var/log/thingsboard --name mytb --restart always thingsboard/tb-cassandra

Where:

  • docker run – run this container
  • -it – attach a terminal session with current ThingsBoard process output
  • -p 9090:9090 – connect local port 9090 to exposed internal HTTP port 9090
  • -p 1883:1883 – connect local port 1883 to exposed internal MQTT port 1883
  • -p 5683:5683 – connect local port 5683 to exposed internal COAP port 5683
  • -v ~/.mytb-data:/data – mounts the host’s dir ~/.mytb-data to ThingsBoard DataBase data directory
  • -v ~/.mytb-logs:/var/log/thingsboard – mounts the host’s dir ~/.mytb-logs to ThingsBoard logs directory
  • --name mytb – friendly local name of this machine
  • --restart always – automatically start ThingsBoard in case of system reboot and restart in case of failure.
  • thingsboard/tb-cassandra – docker image, can be also thingsboard/tb-postgres or thingsboard/tb

After executing this command you can open http://{your-host-ip}:9090 in you browser (for ex. http://localhost:9090). You should see ThingsBoard login page. Use the following default credentials:

You can always change passwords for each account in account profile page.

Comments are closed.