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.
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.
-
You can manage the services using Docker Compose commands.
-
Check Service Status:
docker-compose ps
-
View Logs:
docker-compose logs -f
-
Stop Services:
docker-compose down
-
Start Services:
docker-compose up -d
-
Restart Services:
docker-compose restart
-
Upgrading Services:
docker-compose pull docker-compose up -d
-
E