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

Background

This guide allows you to easily deploy and manage a Syndicate Read Node on Google Cloud Platform (GCP) to access your Appchain’s onchain data. Your node will run components of the open source Syndicate Stack.

Read Nodes perform state derivation for an existing Appchain — allowing you to query transactions, balances, and other blockchain data directly from your own infrastructure.

Currently, the Read Node configuration is available to be deployed via GCP Marketplace.

A corresponding Write Node configuration will also be available in the GCP Marketplace and is actively being worked on.

Deploy and Configure Your RPC Node

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

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

  2. Select the Terraform deployment tab and provide a descriptive name for your RPC VM (such as my-appchain-rpc-node) and select or configure the 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
    • Disks:
      • Syndicate Data Disk: 100GB minimum recommended for production
      • Nitro Data Disk: 200GB minimum recommended for production
    • 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. Coordinate with Syndicate to make sure you are setting the correct appchain-specific overrides in each file.

    # Set Sequencing Ingestor overrides
    sudo vi /opt/rpc-node/sequencing_ingestor.env
    
    # Set Settlement Ingestor overrides
    sudo vi /opt/rpc-node/settlement_ingestor.env
    
    # Set M-Chain overrides
    sudo vi /opt/rpc-node/mchain.env
    
    # Set Translator overrides
    sudo vi /opt/rpc-node/translator.env
    
    # Set Nitro overrides
    sudo vi /opt/rpc-node/nitro.env
    
    # Nitro chain info
    sudo vi /opt/rpc-node/config/chain_info.json
  6. Spin up all services in docker:

    sudo docker compose -f /opt/rpc-node/docker-compose.yml up -d
  7. When the docker containers are running, verify the node is working properly.

    If you enabled public access via the firewall config above, then you can test the RPC using its external IP address:

       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, then you can test the RPC using localhost from within the VM:

       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 may still be syncing.

Managing Your RPC Node

You can check the status of the RPC node by logging into the VM and running these commands:

# View running containers
sudo docker ps

# Check service logs
sudo docker compose -f /opt/rpc-node/docker-compose.yml logs

Access Your RPC Node

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

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

If you did not enable public access, then your RPC 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.


Troubleshooting

Why can't my node process transactions? It returns this error: error code -32000: publishing transactions not supported by this endpoint

At this time, only Syndicate Read Nodes are supported by the GCP Marketplace. This error response is expected until full nodes are supported. In the mean time, please reach out to Syndicate if you need access to an RPC endpoint that can process transactions.

Additional Support

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