This repository provides a Docker-based setup for the relayer infrastructure, including the relayer service and the admin dashboard.
- Relayer: Handles the core relay functionality.
- Admin Dashboard: Provides a web interface for managing and monitoring the relayer.
The relayer and dashboard services are versioned using Semantic Versioning.
The versioning scheme follows the format vX.Y.Z
, where:
X
is the major version.Y
is the minor version.Z
is the patch version.
The Docker images are tagged with the version number, e.g., iconcommunity/centralized-relay:v1.9.6
.
- Relayer:
iconcommunity/centralized-relay
- Dashboard:
iconcommunity/relayer-admin-dashboard
The stable
tag is used for the latest stable release, and the unstable
tag is used for the latest development version.
The relayer infrastructure can be set up using the provided install script or manually using Docker Compose.
If you're migrating relayer from previous systemctl based deployment, you can continue from the steps below.
Otherwise, if you're setting up for the first time, please follow the KMS for setting up the KMS first and then follow the below steps.
- Docker: Get Docker
- Docker Compose: Included with Docker setup or install separately
- curl (pre-installed on most systems)
- openssl (pre-installed on most systems)
Following ports are required to be open on the server:
- HTTP:
80
- HTTPS:
443
If you plan to use Let's Encrypt for SSL certificates, you must have a registered domain name with DNS records correctly pointing to your server's IP address. This is necessary for Let's Encrypt to verify your domain and issue SSL certificates.
If you do not have a domain, self-signed certificates will be automatically generated and used for SSL.
While using Let's Encrypt is not strictly necessary, it is recommended for production environments to secure communication between the client and the server with valid SSL certificates.
You can quickly set up the relayer infrastructure using the provided install script.
-
Run the Install Script
Execute the following command to download and run the install script:
curl -L https://raw.githubusercontent.com/icon-project/relayer-docker/main/install.sh -o /tmp/install.sh && bash /tmp/install.sh
-
Provide Configuration Inputs
The script will prompt you for the necessary configuration parameters:
-
AWS Credentials:
- AWS Access Key ID [ optional ]
- AWS Secret Access Key [ optional ]
- AWS Default Region (default:
us-east-1
)
-
Image Versions:
- Relayer Image Version (default:
latest
) - Dashboard Image Version (default:
latest
)
- Relayer Image Version (default:
-
Restart Policy (default:
unless-stopped
) -
Admin Credentials:
- Admin Email (default: <
[email protected]
>) - Admin Password (default:
p@ssw0rd
)
- Admin Email (default: <
-
Let's Encrypt Configuration:
-
Enable Let's Encrypt? (
yes
orno
, default:no
)If enabled:
- Use Let's Encrypt Staging
- Environment? (
yes
orno
, default:no
)
- Environment? (
- Let's Encrypt Domain
- Let's Encrypt Email
- Use Let's Encrypt Staging
-
-
Configuration File Path:
- Path to
config.yaml
for the relayer service.
- Path to
-
-
Wait for Deployment
The script will:
- Check for required commands.
- Download the
docker-compose.yaml
file. - Generate a secure
NEXTAUTH_SECRET
. - Create a
.env
file with your configuration. - Start the Docker services using Docker Compose.
-
Access the Admin Dashboard
-
If Let's Encrypt is enabled and configured:
- Access the dashboard at
https://your-domain
- Access the dashboard at
-
If Let's Encrypt is not enabled:
- Access the dashboard at https://localhost or your server's IP address.
-
The crly
script is a command-line utility that simplifies managing the relayer and admin dashboard services.
It provides commands to start
, stop
, upgrade
, restart
, logs
and verify
the services.
-
Download the
crly
script:curl -L https://raw.githubusercontent.com/icon-project/relayer-docker/main/crly -o crly && chmod +x crly
-
Verify the installation:
./crly --help
-
Help:
crly --help
- [action]:
start
,stop
,upgrade
,verify
,restart
logs
- [service]:
relayer
,dashboard
When no action is provided, the script will execute provided arbitrary commands on the relayer service container.
When no service is provided, the script will execute the action on both the relayer and dashboard services.
-
Perform an Action:
crly [action] [service] [version]
-
Upgrade the services to a specific version:
crly upgrade relayer v1.9.6 # verify is implicitly called before upgrade
-
Execute a arbitrary command on the relayer service:
crly db messages list
-
Verify the services:
crly verify relayer v1.9.6