Skip to main content

Deploy Bridge UI

This guide walks you through deploying the Surge Bridge UI, including all necessary configurations and services.

1. Clone the Repository

First, clone the Surge Taiko Mono repository and navigate to the project directory:

git clone https://github.com/NethermindEth/surge-taiko-mono.git
cd surge-taiko-mono

2. Switch to the Correct Branch

Checkout the surge/devnet branch:

git checkout surge/devnet

3. Set Up SSL Certificates

Navigate to the Bridge UI nginx directory and generate the SSL certificates:

cd packages/bridge-ui/nginx
chmod +x ./generate-certs.sh
./generate-certs.sh

4. Configure Nginx Reverse Proxy

Prerequisites

Ensure you have the following endpoints ready:

  • L1 RPC URL
  • L1 Blockscout URL
  • L1 to L2 Relayer URL
  • L2 RPC URL
  • L2 Blockscout URL
  • L2 to L1 Relayer URL

Update Configuration

Edit the ./nginx/nginx.conf file with your actual URLs. For example:

# L1 RPC endpoint
location /l1-rpc/ {
proxy_pass http://your-l1-rpc-endpoint:32002/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
warning

Ensure all URLs used in configuration files are accessible via HTTPS.

5. Configure Application Components

Bridges Configuration

Required:

  • L1 Chain ID
  • L1 Contract Addresses:
  • L1_BRIDGE
  • L1_ERC20_VAULT
  • L1_ERC721_VAULT
  • L1_ERC1155_VAULT
  • L1_SIGNAL_SERVICE
  • L2 Chain ID
  • L2 Contract Addresses:
  • L2_BRIDGE
  • L2_ERC20_VAULT
  • L2_ERC721_VAULT
  • L2_ERC1155_VAULT
  • L2_SIGNAL_SERVICE

Path: ./config/configuredBridges.json

tip

This file contains default addresses. Replace them if needed.

6. Deploy Services

Use Docker Compose to deploy the Bridge UI and nginx services:

# Deploy Bridge UI
docker compose --profile bridge-ui up -d --build

# Deploy Nginx
docker compose --profile nginx up -d

Verification

Use the following commands to verify your services:

# Check container status
docker compose ps

# View Bridge UI logs
docker compose logs bridge-ui -f

# View Nginx logs
docker compose logs nginx -f
warning

Double-check that all URLs in your nginx config are secured and publicly accessible before deployment.