Edge
ThingsBoard Documentation
Cloud Professional Edition Community Edition Edge IoT Gateway License Server Trendz Analytics
Try it now Pricing
Documentation > Activate edge functionality on ThingsBoard server
Getting Started
Installation Architecture

On this page

Activate edge functionality on ThingsBoard PE/CE server

Ubuntu/CentOS

Enable edges support

Edges functionality disabled on ThingsBoard Professional/Community Edition server by default. To enable it please edit ThingsBoard configuration file:

1
sudo nano /etc/thingsboard/conf/thingsboard.conf

Add the following lines to the configuration file:

1
export EDGES_ENABLED=true

RPC port for edge communication

ThingsBoard Edge connects to ThingsBoard Professional/Community Edition server on 7070 port (by default).

You can overwrite this by setting EDGES_RPC_PORT variable in configuration file. To change it please edit ThingsBoard configuration file:

1
sudo nano /etc/thingsboard/conf/thingsboard.conf

Add the following lines to the configuration file:

1
export EDGES_RPC_PORT=**NEW_EDGES_RPC_PORT**

NOTE: This port must be accessible by edge to be able to communicate. Please update your firewall settings or docker configuration if required.


Important note for securing communication between ThingsBoard Edge and ThingsBoard Professional/Community Edition server

  • ThingsBoard Edge and ThingsBoard Professional/Community Edition server instance are communicating over gRPC protocol
  • gRPC channel is not secured with TLS/SSL mechanism dy default and binary messages that are transferring between ThingsBoard Edge and ThingsBoard Professional/Community Edition server instance could be stolen by non-authorized persons
  • gRPC messages contain sensitive data like user passwords and device credentials, and theft of this data could lead to serious consequences
  • ThingBoard team strongly recommends secure gRPC with TLS/SSL for production environments and environments with sensitive data
  • Please follow this guide to configure gRPC with TLS/SSL

Restart the service

1
2
$ sudo service thingsboard stop
$ sudo service thingsboard start

Windows

Enable edges support

Open the Notepad or other editor as administrator user (right click on the app icon and select “Run as administrator”).
Open the following file for editing (select “All Files” instead of “Text Documents” in file choosing dialog, the encoding is UTF-8):

1
C:\Program Files (x86)\thingsboard\conf\thingsboard.yml

and locate “# Edges parameters” block:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Edges parameters
edges:
  enabled: "${EDGES_ENABLED:false}"
  rpc:
    port: "${EDGES_RPC_PORT:7070}"
    client_max_keep_alive_time_sec: "${EDGES_RPC_CLIENT_MAX_KEEP_ALIVE_TIME_SEC:300}"
    ssl:
      # Enable/disable SSL support
      enabled: "${EDGES_RPC_SSL_ENABLED:false}"
      cert: "${EDGES_RPC_SSL_CERT:certChainFile.pem}"
      private_key: "${EDGES_RPC_SSL_PRIVATE_KEY:privateKeyFile.pem}"
  storage:
    max_read_records_count: "${EDGES_RPC_STORAGE_MAX_READ_RECORDS_COUNT:50}"
    no_read_records_sleep: "${EDGES_RPC_NO_READ_RECORDS_SLEEP:1000}"
    sleep_between_batches: "${EDGES_RPC_SLEEP_BETWEEN_BATCHES:1000}"
  scheduler_pool_size: "${EDGES_SCHEDULER_POOL_SIZE:4}"
  edge_events_ttl: "${EDGES_EDGE_EVENTS_TTL:0}"
  state:
    persistToTelemetry: "${EDGES_PERSIST_STATE_TO_TELEMETRY:false}"

locate “EDGES_ENABLED” parameter. Replace “false” with “true”.

1
  enabled: "${EDGES_ENABLED:true}"

ThingsBoard Edge connects to ThingsBoard Professional/Community Edition server on 7070 port (by default).

You can overwrite this by updating EDGES_RPC_PORT variable in configuration file. locate “EDGES_RPC_PORT” parameter. Replace “7070” with “NEW_EDGES_RPC_PORT”.

1
2
  rpc:
    port: "${EDGES_RPC_PORT:NEW_EDGES_RPC_PORT}"

NOTE: This port must be accessible by edge to be able to communicate. Please update your firewall settings or docker configuration if required.


Important note for securing communication between ThingsBoard Edge and ThingsBoard Professional/Community Edition server

  • ThingsBoard Edge and ThingsBoard Professional/Community Edition server instance are communicating over gRPC protocol
  • gRPC channel is not secured with TLS/SSL mechanism dy default and binary messages that are transferring between ThingsBoard Edge and ThingsBoard Professional/Community Edition server instance could be stolen by non-authorized persons
  • gRPC messages contain sensitive data like user passwords and device credentials, and theft of this data could lead to serious consequences
  • ThingBoard team strongly recommends secure gRPC with TLS/SSL for production environments and environments with sensitive data
  • Please follow this guide to configure gRPC with TLS/SSL

Restart the service

1
2
net stop thingsboard
net start thingsboard