// Stay in touch?
Products
Encore CloudEncore Cloud
Encore.tsEncore.ts
Encore.goEncore.go
PricingPricing
Book a DemoBook a Demo
Use Cases
AI-Powered DevelopmentAI-Powered Development
Event-Driven SystemsEvent-Driven Systems
Distributed SystemsDistributed Systems
Case StudiesCase Studies
ShowcaseShowcase
Resources
DocsDocs
InstallInstall
Example AppsExample Apps
Demo videoDemo video
ArticlesArticles
GitHub ReleasesGitHub Releases
Systems Operational
Company
About UsAbout Us
Swag ShopSwag Shop
ContactContact
JobsJobs
PressPress
TermsTerms
Privacy PolicyPrivacy Policy
Data Processing AgreementData Processing Agreement
Enterprise SLAEnterprise SLA
Encore
© 2026 EncoreAll rights reserved
© 2026 Encore All Rights Reserved
GitHubDiscordYouTube

Encore vs

OpenTofu requires writing HCL configuration files, just like Terraform. Encore infers infrastructure from your application code. Both deploy to your own cloud account, with very different approaches.

Trusted in production by

GrouponPave BankBookshop.orgQuiqupEcho

How They Work

OpenTofu

OpenTofu is the open-source fork of Terraform, created in 2023 after HashiCorp moved Terraform to the Business Source License. It is now a Linux Foundation project under the MPL 2.0 license. You describe infrastructure in HCL inside .tf files, run tofu apply to provision it, and OpenTofu tracks what it created in a state file.

It works as a drop-in replacement for Terraform. The same HCL and .tf files carry over, with a compatible provider and module ecosystem served by the OpenTofu Registry. Teams adopt it to keep their infrastructure-as-code workflow on a community-governed, open-source tool.

Encore

Encore analyzes your TypeScript or Go application code to understand what infrastructure you need. Declare a database as a TypeScript object, and Encore provisions RDS or Cloud SQL when you deploy.

Your infrastructure stays in sync with your code because it's defined by your code, so there's no separate config or state to keep reconciled.

Same Cloud, Different Approach

With OpenTofu you write HCL that maps directly to cloud provider APIs. Every resource is something you declare by hand: the database instance, the security groups, the IAM policies, the networking. You manage the state file that tracks what exists and keep your configuration in sync with reality to avoid drift.

OpenTofu's advantage over Terraform is its license. It stays open source under MPL 2.0 with community governance, so you avoid the BSL restrictions while keeping Terraform-compatible workflows. The day-to-day work is the same though: you are still hand-writing HCL that mirrors cloud APIs.

Encore takes a different layer of abstraction. You write application code and Encore provisions the cloud-specific details like networking, IAM, and security using sensible defaults for each provider. When you need more control, those defaults are yours to configure.

Learn more about infrastructure ownership →

Local Development

OpenTofu provisions cloud resources. It does not help you run your application locally. To develop against a database or a queue you either point at real cloud infrastructure or set up and wire those services yourself.

Encore runs encore run and automatically provisions local PostgreSQL, Pub/Sub emulation, and cron scheduling. A local dashboard shows distributed tracing and architecture diagrams.

Your local and production environments use the same code, eliminating "works on my machine" problems.

Learn more about local development →

No HCL Required

Adding a database with OpenTofu means writing HCL for the instance, the security groups, the IAM roles, and the parameter groups, then wiring the connection strings into your application by hand. Each new resource is more configuration to author and keep correct.

With Encore, you declare a database as a TypeScript object. Encore creates the RDS instance with proper networking, security, and IAM, and injects connection details automatically.

import { SQLDatabase } from "encore.dev/storage/sqldb";

const db = new SQLDatabase("users", {
  migrations: "./migrations",
});

// No HCL. No state files. No connection strings.
// Encore provisions RDS/Cloud SQL automatically.

Databases, Pub/Sub, Cron Jobs, Object Storage, and more. See all primitives →

Built-in Observability

OpenTofu provisions infrastructure. It does not provide observability. You add tracing, metrics, and logging through separate tools and configure them yourself.

Encore includes distributed tracing, metrics, and structured logging out of the box. Every API call, database query, and Pub/Sub message is traced automatically.

This works locally too. Run your app and get full tracing in the local development dashboard.

See observability docs →

AI-Assisted Development

With OpenTofu, infrastructure lives in separate HCL files away from your application code. When an AI agent like Cursor or Claude Code works on a feature, it sees the application but not the matching infrastructure, so it produces changes that drift from what is actually provisioned.

With Encore, infrastructure is declared as TypeScript objects alongside the code that uses it. An AI agent sees the application and its infrastructure in one context, so the database, the queue, and the service that depend on each other stay consistent.

Because the infrastructure comes from Encore's defaults rather than hand-written config, you can let an AI agent build features and trust the result is provisioned correctly. Guardrails, auto-generated docs, and built-in observability keep what it produces readable and maintainable as it grows.

Learn about AI-assisted development →

Customer stories

See how teams are shipping faster with Encore.

Groupon
"Encore is our foundation for all new development. Since adopting it, we've seen a 2-3x increase in development speed."
Josef Sima, Engineering DirectorRead story →
Quiqup
95%
less time on DevOps
Read story →
"Encore is an unfair advantage. At Pave we've moved 2x faster than we did at Monzo."
Simon Vans-Colina
Simon Vans-Colina
CTO, Pave Bank
Bookshop.org
$60K
saved annually on cloud
Read story →
"We've reduced time spent on DevOps by 95%, and we're now on track to save $60K annually."
Mason Stewart
Mason Stewart
CTO, Bookshop.org
View all stories
See how teams ship faster →

Feature Comparison

See how Encore and OpenTofu differ across key capabilities.

Encore
OpenTofu
Approach
EncoreInfrastructure-from-code
OpenTofuInfrastructure as Code (HCL)
Configuration
EncoreZero config needed
OpenTofuHand-written .tf files
Cloud Support
EncoreAWS and GCP
OpenTofuAWS, GCP, Azure, and more
State Management
EncoreHandled automatically
OpenTofuManual state files
Local Development
EncoreAutomatic (DBs, queues included)
OpenTofuNot supported
Observability
EncoreBuilt-in tracing & metrics
OpenTofuNot included
Preview Environments
EncoreAutomatic per PR
OpenTofuManual setup
Learning Curve
EncoreTypeScript/Go only
OpenTofuHCL + cloud knowledge
License
EncoreOpen source
OpenTofuOpen source (MPL 2.0)
Time to Deploy
EncoreMinutes
OpenTofuHours to days

Top rated on G2

See how we stack up in the market.

Read G2 reviews →
G2 User LoveG2 High Performer Summer 2025G2 High Performer Fall 2025G2 High Performer Winter 2026

Frequently asked questions

Common questions about Encore vs OpenTofu.

OpenTofu is infrastructure as code: you write HCL in .tf files that maps to cloud provider APIs, then run tofu apply. Encore is infrastructure-from-code: you write your backend in TypeScript or Go, and Encore infers the infrastructure from that code and provisions it in your cloud account. OpenTofu describes infrastructure directly, while Encore derives it from your application.

Encore is built specifically for backend developers. You define APIs, databases, and queues in your application code and get local development, tracing, and per-PR preview environments without extra setup. OpenTofu is a general-purpose IaC tool for provisioning any cloud resource, so it does more across infrastructure but offers nothing dedicated to building a backend.

OpenTofu expects you to know HCL, cloud provider resources, IAM, networking, and state management, which is squarely DevOps work. Encore handles networking, security, and IAM from your code, so backend developers can provision a working system without deep cloud operations knowledge. You keep full access to your AWS or GCP account either way.

Yes. OpenTofu is the community-governed fork of Terraform, created in 2023 after Terraform moved to the Business Source License, and it is now a Linux Foundation project under MPL 2.0. It uses the same HCL, the same .tf files, and a Terraform-compatible provider ecosystem. Because the approach is identical to Terraform, the comparison with Encore is the same: hand-written HCL versus infrastructure inferred from your code.

Choose Encore if you want to build backends without writing and maintaining infrastructure configuration. You get local development, distributed tracing, automatic IAM, type-safe APIs, and per-PR preview environments out of the box, all driven by your application code. OpenTofu remains the right choice when your goal is to provision and manage cloud infrastructure directly with open-source tooling.

Yes. They operate at different layers and run in the same cloud account. Encore can manage your application infrastructure while OpenTofu manages networking, DNS, and other resources in the same AWS or GCP account. Many teams use Encore for the backend and keep OpenTofu for the surrounding cloud setup.

Development Platform
for your cloud on AWS & GCP

Scale your engineering without the ops overhead.