This quickstart guide is designed for subgraph developers who want to run Graph Node locally to test their subgraphs during development. If you’re looking to contribute to Graph Node itself, see the Installation page.
What You’ll Build
By the end of this guide, you’ll have:- A fully functional Graph Node instance running locally
- IPFS and PostgreSQL configured and ready
- The ability to deploy and query subgraphs
Prerequisites
Before you begin, ensure you have:- Docker and Docker Compose installed (Get Docker)
- An Ethereum node or RPC endpoint (e.g., Infura, Alchemy, or a local node)
- graph-cli for deploying subgraphs:
npm install -g @graphprotocol/graph-cli
Quick Setup with Docker Compose
Clone Graph Node repository
First, clone the Graph Node repository to get the Docker Compose configuration:
Configure your Ethereum connection
Edit Common configurations:
docker-compose.yml to point to your Ethereum node. By default, it uses:The format is
NETWORK_NAME:RPC_URL. You can specify multiple networks separated by commas.Start the services
Launch Graph Node along with IPFS and PostgreSQL:You should see output indicating all three services are starting. The first run will download Docker images (~2-3 GB).
Service Endpoints
Your Graph Node setup exposes the following endpoints:GraphQL HTTP
http://localhost:8000/subgraphs/name/<subgraph-name>Query your deployed subgraphsGraphQL WebSocket
ws://localhost:8001/subgraphs/name/<subgraph-name>Subscribe to real-time updatesGraphiQL Interface
http://localhost:8000/Interactive query explorerAdmin API
http://localhost:8020/Manage deploymentsIPFS API
http://127.0.0.1:5001Access IPFS directlyPostgreSQL
postgresql://graph-node:let-me-in@localhost:5432/graph-nodeDirect database accessDeploy Your First Subgraph
Now that Graph Node is running, let’s deploy a subgraph:Data Persistence
Docker Compose creates persistent data directories:- IPFS data:
./data/ipfs - PostgreSQL data:
./data/postgres
Monitoring and Logs
View logs
Check service status
Adjust log verbosity
Edit theGRAPH_LOG environment variable in docker-compose.yml:
Running on Apple Silicon (M1/M2)
To build a native image for Apple Silicon:Increase Docker memory
Open Docker Desktop → Resources → Advanced → Memory and increase to at least 8GB.
Common Configuration
Multiple Ethereum networks
Editdocker-compose.yml to support multiple networks:
Archive node features
If your RPC endpoint is an archive node with tracing support:Connection pool size
For better performance under load:Troubleshooting
Graph Node can't connect to Ethereum node
Graph Node can't connect to Ethereum node
Symptoms: Logs show connection errors to Ethereum RPCSolutions:
- Verify your RPC URL is correct
- Check that
host.docker.internalresolves (macOS/Windows only) - For Linux, use
--network="host"or your machine’s IP address - Ensure your Ethereum node is running and accessible
Out of memory errors on M1 Macs
Out of memory errors on M1 Macs
Symptoms: Container killed with exit code 137Solutions:
- Increase Docker Desktop memory limit (8GB minimum)
- Build a native ARM64 image using the steps above
- Consider using a cloud Ethereum provider instead of local node
Postgres connection refused
Postgres connection refused
Symptoms:
could not connect to server: Connection refusedSolutions:- Ensure PostgreSQL container is running:
docker-compose ps - Check PostgreSQL logs:
docker-compose logs postgres - Verify port 5432 isn’t in use by another process
- Reset containers:
docker-compose down && docker-compose up
IPFS timeout errors
IPFS timeout errors
Symptoms:
ipfs.cat timeouts in logsSolutions:- Increase IPFS timeout: Add
GRAPH_IPFS_TIMEOUT: 120to environment - Check IPFS is running:
curl http://localhost:5001/api/v0/version - Restart IPFS container:
docker-compose restart ipfs
Subgraph deployment fails
Subgraph deployment fails
Symptoms: Deployment command hangs or failsSolutions:
- Verify admin endpoint is accessible:
curl http://localhost:8020/ - Ensure IPFS is running:
docker-compose ps ipfs - Check Graph Node logs:
docker-compose logs graph-node - Try recreating:
graph remove <subgraph-name> --node http://localhost:8020
Next Steps
Installation
Learn about running Graph Node from source
Configuration
Advanced configuration with TOML files
Subgraph Development
Official subgraph development guide
Environment Variables
Fine-tune Graph Node behavior

