Clarity Gateway
Search
K
Comment on page

Runnning Clarity Gateway on a 3rd Party Device

Clarity Gateway runs on a wide range of devices that have a modern Linux OS and Docker runtime.

Installing Docker

To install the Docker runtime on your device, download the Docker installation convenience script:
curl -fsSL https://get.docker.com -o get-docker.sh
Execute the script:
sudo bash get-docker.sh
Running the Docker installation script
To run Docker commands on your device without typing sudo, run the following command:
sudo usermod -aG docker pi
After running the usermod command, you'll need to close your terminal and open a new terminal session before the changes take effect.

Running with docker compose

Docker Compose allows you to create a short yaml configuration file that defines the container version, TCP port mappings, and volume mappings you'll be using. Create a directory for Clarity Gateway, e.g. /opt/clarity-gateway, and create a compose.yaml file inside that directory. Here's the format of a compose.yaml file that runs Clarity Gateway:
services:
clarity-gateway:
image: jcoreio/clarity-gateway:<VERSION>
ports:
- <TCP PORT>:80
volumes:
- <DATA DIRECTORY>:/data
If you choose version 7.5.3, port 5050, and ./data for your data directory, your compose.yaml will look like:
services:
clarity-gateway:
image: jcoreio/clarity-gateway:7.5.3
ports:
- 5050:80
volumes:
- ./data:/data
In the example above, ./data is a relative path to your data directory. If your compose.yaml is located in /opt/clarity-gateway, and you choose ./data as your data directory, the absolute path of your data directory will be /opt/clarity-gateway/data. You can also enter the absolute path of a data directory, e.g. /opt/clarity-gateway/data.

Running with docker run

When running Clarity Gateway on the command line, you'll need to choose a location for your data directory, and map that directory into your container. To use /opt/clarity-gateway/data as your data directory, run:
sudo mkdir -p /opt/clarity-gateway/data
To pull and run the Clarity Gateway container, type the following command:
docker run --name clarity-gateway -p 80:80 -v <DATA DIRECTORY>:/data --restart unless-stopped -d jcoreio/clarity-gateway:<VERSION>
If your data directory is /opt/clarity-gateway/data and you want to run version 7.5.3, the command would be:
docker run --name clarity-gateway -p 80:80 -v /opt/clarity-gateway/data:/data --restart unless-stopped -d jcoreio/clarity-gateway:7.5.3
Check the Clarity Gateway page on Docker Hub for a list of available versions.
Run the docker ps command to check that Clarity Gateway is running:

Accessing the Web Interface

Point your browser to http://<DEVICE IP ADDRESS>:<PORT> (for example, http://192.168.1.220) to access the Clarity Gateway web interface:
The default password is password.
Please secure your device by changing your password immediately after starting Clarity Gateway!
After you've successfully logged in, you will see the license entry screen. Enter your license key if you have one, or click "Start Trial" to try Clarity Gateway free for 2 hours:
After entering your license or starting the trial, you can get data flowing through Clarity Gateway by creating connectors:

Container logs

Run the docker logs clarity-gateway to see the container's logs:
In the example above, the container started successfully. You can safely ignore the error message about the local I/O driver: that driver only runs on the Iron Pi, and Clarity Gateway can operate without it.