Documentation
Production
Deploy

Deploy

Database schema

Ponder uses a single database schema for user tables, metadata, and reorg information. This schema follows a strict set of rules to avoid two Ponder apps writing to the same tables or accidentally dropping tables from a running Ponder app.

💡

The default schema is "public" but gets overriden when executing on Railway. This behavior can be configured in ponder.config.ts

Cached indexing

Healthchecks

/health

Returns a 200 status code immediately after the app starts running

/ready

Returns a 200 status code after the app has completed the historical backfill and is available to serve traffic

Railway (recommended)

Railway is currently the best place to deploy Ponder apps. Most Ponder apps cost ~$5 per month, and the deployment process is simple.

Sign up or log in to Railway

Connect your GitHub account, and make sure that your Ponder app has been pushed to remote.

Create a Ponder app service

From the Railway console:

  1. Click New ProjectDeploy from GitHub repo and select your repo from the list
  2. Click Add variables, then add your project's RPC URL (e.g. PONDER_RPC_URL_1) and any other environment variables
  3. Expose your service to the public internet. Open the Settings tab and click Generate Domain under Networking
  4. Set a healthcheck path. In the Settings tab, enter /ready for Healthcheck Path under Deploy
⚠️

Monorepo users: Update the service Root Directory and/or Start Command to run ponder start at the Ponder project root. For example, set the root directory to packages/ponder or set the start command to cd packages/ponder && pnpm start.

Create a Postgres database service

  1. From your project's dashboard, click NewDatabaseAdd PostgreSQL.
  2. Go back to your service. Open Variables tab and click on New Variable
  3. Click on Add Reference, select DATABASE_URL, and click on Add

After a moment, your Ponder service should redeploy successfully. Check the Build Logs and Deploy Logs tabs to debug any issues.

Zero downtime deployments

Ponder uses a unique database schema for each deployment on Railway. By default, this allows for zero downtime deployments with reindexing occurring on every redployment.

⚠️

Healthcheck Timeout must be set higher than the time it takes to complete the historical backfill.

Manual redployments

Other environments

Ponder has not been thoroughly tested on cloud providers other than Railway. However, Ponder apps should work in any environment that supports Node.js and can connect to a Postgres database.