Skip to content

Run Snapchain on AWS

This guide will get you set up with a Snapchain node on an AWS EC2 instance and will cost roughly $100/month. You can run Snapchain on any server you like and costs may vary depending on provider.

Launch a new instance

  1. In AWS, go to EC2 > Instances > Launch Instances
  2. Give it a name and select Ubuntu Server 22.04 LTS (HVM), SSD Volume Type and 64-bit (x86). Choose m5.xlarge instance type . select-configuration
  3. In Key pair (login), select Create a new key pair , then select RSA and .pem format, and save it
  4. In Network settings, select Allow SSH traffic from Anywhere
  5. In Configure storage, select 2 TB of gp3 storage.
  6. Click Launch Instance on the right-hand side menu.

Configure network firewall

  1. Go to EC2 → Instances and find your instance
  2. Click on the Instance ID
  3. Click on Security > Security groups > (Security Group ID)
  4. Click on Edit inbound rules and Edit outbound rules on the group page and add rules until they match the below. inbound outbound

Connect to your instance

  1. Find your .pem file from earlier and run chmod 400 key.pem
  2. Go to EC2 → Instances, click on the Instance ID and copy the IPv4 Address
  3. Connect with ssh ubuntu@<ipv4 address> -i key.pem

Start syncing a node

# Install docker
curl -fsSL https://get.docker.com -o get-docker.sh
chmod +x get-docker.sh
./get-docker.sh
 
# Start Snapchain
mkdir snapchain && cd snapchain
curl https://raw.githubusercontent.com/farcasterxyz/snapchain/refs/heads/main/docker-compose.mainnet.yml -o docker-compose.yml
sudo docker compose up # -d to run in background, if you set up rootless docker remove sudo

Follow the remaining steps in Getting Started to validate and query your node.