Run following commands to create a directory for storing data and logs and then change its owner to docker container user, to be able to change user, chown command is used, which requires sudo permissions (command will request password for a sudo access):
Run following commands to create directories for storing data and logs. These commands will change directories owner to *thingsboard* docker container user.
**chown** command requires sudo permissions to be able to change owner (command will request password for a sudo access):
If ThingsBoard Edge is going to be running on the same machine where ThingsBoard server is running you’ll need to update docker compose port mapping.
#### [Optional] Update bind ports
If ThingsBoard Edge is going to be running on the same machine where ThingsBoard server (cloud) is running you'll need to update docker compose port mapping.
Please update next lines of docker compose:
```bash
ports:
- “18080:8080â€
- “11883:1883â€
- “15683-15688:5683-5688/udpâ€
Please make sure ports above are not used by any other application.
- "18080:8080"
- "11883:1883"
- "15683-15688:5683-5688/udp"
```
Please make sure ports above are not used by any other application.
#### Start ThingsBoard Edge
Execute the following commands to pull and up using docker compose V2:
```bash
docker compose pull
docker compose up
{:copy-code}
```
Execute the following commands to up this docker compose directly:
*NOTE*: If you are using outdated docker-compose (we recommend to use docker compose V2), execute the following commands:
```bash
docker-compose pull
@ -80,9 +93,9 @@ docker-compose up
{:copy-code}
```
### Open ThingsBoard Edge UI
#### Open ThingsBoard Edge UI
Once started, you will be able to open ThingsBoard Edge UI using the following link http://localhost:8080.
Once started, you will be able to open ThingsBoard Edge UI using the following link http://localhost:8080
If during installation process you have changed edge HTTP_BIND_PORT please use that port instead for Edge UI URL:
http://localhost:HTTP_BIND_PORT
*NOTE*: If you updated bind ports (optional step) please use updated port instead for Edge UI URL
#### WARNING - 'localhost (127.0.0.1)' is not supported
Please note that your ThingsBoard base URL is **'localhost (127.0.0.1)'** at the moment.
**'localhost (127.0.0.1)'** cannot be used for docker containers - please update **CLOUD_RPC_HOST** environment variable below to the IP address of your machine (*docker **host** machine*). IP address must be next format **192.168.1.XX** or similar. In other case - Edge service, that is running in docker container, will not be able to connect to the cloud.