Run an Appchain Node on GCP

Deploy and manage a Syndicate Appchain node on Google Cloud Platform

This integration is under active development. To help improve this guide or for technical support running your own Appchain Node, join our Discord. To report a bug, you can create a new issue in https://github.com/SyndicateProtocol/syndicate-appchains/issues.

Developer Requirements

This guide assumes that the reader is

  • familiar with containerization and Docker
  • comfortable using ssh to execute commands on a remote machine
  • proficient in running and maintaining infrastructure using a cloud provider such as GCP

Before getting started, ensure you have a Google Cloud Platform project with billing enabled.

Background

This guide allows you to easily deploy and manage a Syndicate Appchain Node on Google Cloud Platform (GCP).

Syndicate Appchain Nodes perform state derivation and block production for an existing Syndicate Appchain — allowing you to query blockchain data and submit transactions directly from your own infrastructure.

Your node will run components of the open source Syndicate Stack as well as the Arbitrum Nitro Stack.

Deploy and Configure Your Node

To deploy a Syndicate Appchain node on the Google Cloud Platform, perform the following steps.

  1. Access the "Syndicate Appchain Node" product in the Google Cloud Web3 Portal or Marketplace and click the Launch button.

  2. Select the Terraform deployment tab and provide a name for this VM and configure its service account.

  3. In the VM Instance Configuration section, enter or select appropriate values:

    • Zone: Select a zone close to your users (e.g., us-central1-a)
    • Machine type: n2-standard-8 (8 vCPUs, 32 GB RAM) minimum recommended for production. Refer to the Nitro documentation for system requirements based on your specific node config.
    • Disks:
      • Syndicate Data Disk: 100GB minimum recommended for production
      • Nitro Data Disk: 200GB minimum recommended for production. Refer to the Nitro documentation for system requirements based on your specific node config.
    • Networking: Optional settings to expose this RPC to the internet automatically. Leave unchecked to manage your networking/firewall configuration separately.
  4. Click the Deploy button and wait for the console to confirm the resources are running.

  5. SSH into your Compute Engine VM and edit the following files (as root user). Coordinate with Syndicate to make sure you are setting the correct appchain-specific overrides in each file.

    • All .env files in /opt/rpc-node
    • /opt/rpc-node/config/chain_info.json file

    Want to initialize this node from a snapshot to reduce sync time? Syndicate can provide the snapshot URL and any additional configuration for that!

  6. Spin up all services in docker:

    sudo docker compose -f /opt/rpc-node/docker-compose.yml up -d
  7. Wait for the node to sync to the latest block. This could take minutes or hours depending on how much data needs to sync from the L2 chains. Look for container logs relating to sync status / block number, and monitor the latest block from the local RPC endpoint:

       curl -X POST http://localhost:8545 \
       -H "Content-Type: application/json" \
       -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

    You should receive a JSON response with a block number. If it's not the latest block, then your node is still syncing.

  8. Once the node is synced, it is ready for use!

Managing Your Node

All of the node components run as Docker containers in this VM. They are configured in the /opt/rpc-node/docker-compose.yml file and the config files from Step 5.

Once the node is running and healthy, there should not be any regular management or maintenance needed. But if you need to reconfigure, restart, or troubleshoot any of these services, you can do so using Docker commands within the VM.

# View running containers
sudo docker ps

# Force restart a container
sudo docker compose up -d --force-recreate <container_name>

Access Your Node

If you enabled public access above, then your node exposes the following endpoints externally:

  • HTTP: http://[EXTERNAL_IP]:8545
  • WebSocket: ws://[EXTERNAL_IP]:8548

Test:

   curl -X POST http://[EXTERNAL_IP]:8545 \
   -H "Content-Type: application/json" \
   -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

If you did not enable public access above, then your node is only accessible from within your VPC:

  • HTTP: http://[INTERNAL_IP]:8545
  • WebSocket: ws://[INTERNAL_IP]:8548

Observability

Basic observability is integrated into these Syndicate Appchain Nodes out-of-the-box. Just open the Observability tab in the Compute Engine menu in the GCP console to see metrics and logs for this node.

You can use that data to create dashboards and alerting policies such as logs-based alerting to monitor this node's health.


Additional Support

If you encounter problems running your Syndicate Appchain node that aren't mentioned in this guide, reach out to our Discord for additional support.