Encore.go
An open source infrastructure SDK for Go
Encore.go is an open source infrastructure SDK that lets you declare the cloud infrastructure your application needs, such as databases, Pub/Sub topics, object storage, caches, cron jobs, and secrets, directly in your Go code.
Instead of stitching together Terraform, YAML, and cloud consoles to wire up these resources, you declare them as typed values and use them through their SDK methods. Encore then takes care of running the matching infrastructure locally during development, and (with Encore Cloud) provisioning the real cloud resources in your own AWS or GCP account when you deploy.
What you get with Encore.go
- Infrastructure as Go: Declare SQL databases, Pub/Sub topics and subscriptions, object storage buckets, caches, cron jobs, and secrets as values in your code. Encore understands how these resources are used and generates the runtime wiring for you.
- Local infrastructure, automatically: Run
encore runand Encore boots a local environment that mirrors production: real Postgres, a local Pub/Sub broker, local object storage, and so on. No Docker Compose files to maintain. - Type-safe service-to-service calls: Define APIs as plain Go functions. Calling another service is a normal function call; Encore handles serialization, routing, and validation at the boundary.
- Built-in observability: A local development dashboard with distributed tracing, logs, and a database explorer, so you can see what your application is doing without bolting on extra tools.
- AI-ready by design: Because infrastructure is declared in code, AI coding assistants can understand and modify your full stack. Encore also ships AI instructions and an MCP server for editor integrations.
A tight iteration loop, local to production
Because the SDK is the source of truth for your infrastructure, the same model runs locally, in per-PR preview environments, and in production. encore run boots the whole system on your laptop with real Postgres, real Pub/Sub semantics, and real tracing. Opening a pull request spins up a preview environment in your own VPC with the same infrastructure model and (optionally) a database branched from a seed environment.
This is the loop that makes Encore.go particularly effective with AI coding agents: every change can be validated end-to-end against real infrastructure, locally and in the cloud, instead of waiting for a production deploy to find out if it works. For more, see the Development Workflow page.
Deploying to production
Encore.go is fully open source and you are never locked into a particular deployment path. There are two supported ways to run an Encore.go application in production.
With Encore Cloud: the optional managed platform reads the infrastructure you declared in your code and provisions matching resources (RDS, Cloud SQL, SNS+SQS, Pub/Sub, S3, GCS, etc.) in your own AWS or GCP account, then manages deploys, environments, secrets, and IAM on top. You own the cloud account and the infrastructure; Encore Cloud is the control plane that drives it from your code.
Self-hosted: build a standard Docker image with encore build docker and run it anywhere. You provision your own infrastructure however you like (Terraform, Pulumi, CloudFormation, the cloud console), and tell the Encore runtime how to reach those resources via an infrastructure config file. See the self-hosting guide for the full workflow.
Where to go next
- New to Encore? Start with the Quick Start to build and run your first application.
- Want to understand the model first? Read App Structure and the Services page.
- Looking up a specific primitive? See the Primitives overview.
- Curious about the local-to-production iteration loop? See the Development Workflow.
- Ready to deploy? See Deploy with Encore Cloud or Build Docker Images for self-hosting.
Get started
Paste into your coding agent to install Encore and scaffold an app.
Paste into your coding agent to install Encore and scaffold an app.