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.
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
usermodcommand, you'll need to close your terminal and open a new terminal session before the changes take effect.
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.yamlfile inside that directory. Here's the format of a
compose.yamlfile that runs Clarity Gateway:
- <TCP PORT>:80
- <DATA DIRECTORY>:/data
If you choose version
./datafor your data directory, your compose.yaml will look like:
In the example above,
./datais a relative path to your data directory. If your
compose.yamlis located in
/opt/clarity-gateway, and you choose
./dataas 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.
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/dataas 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/dataand 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
docker pscommand to check that Clarity Gateway is running:
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
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:
docker logsclarity-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.