OpenTofu is a free, open source cloud infrastructure management project written in Go and released under MPL-2.0. It has 30,204 GitHub stars, 1,367 forks and 320 open issues, and was last pushed 7 hours ago. On this registry it ranks #3 of 43 tracked projects in Cloud Infrastructure Management, with 5 head-to-head comparisons available. It gained 40 stars over the last 6 tracked days.

What is OpenTofu?

What it is

OpenTofu is an open-source infrastructure as code (IaC) tool that enables users to define and manage cloud and on-premises infrastructure using declarative configuration files. It lives in the cloud infrastructure management ecosystem and serves as a community-driven fork of Terraform, maintaining compatibility with Terraform’s configuration language and provider ecosystem while operating under the MPL-2.0 license.

The project solves the problem of vendor lock-in and licensing uncertainty around Terraform’s shift to a non-open-source model for certain features. OpenTofu provides a fully open alternative for teams needing transparent, auditable, and self-hostable infrastructure provisioning without reliance on proprietary tooling.

Key capabilities

  • Declaratively define infrastructure using HCL (HashiCorp Configuration Language) syntax
  • Generate execution plans to preview changes before applying them
  • Build and visualize resource dependency graphs for parallelized operations
  • Support for existing Terraform providers and modules without modification
  • State management with local and remote backends (e.g., S3, HTTP, Consul)
  • Run in CI/CD pipelines with deterministic, idempotent operations
  • Support for custom in-house providers via plugin protocol

Who uses it and how

  • Engineering teams migrating from Terraform to avoid licensing changes and maintain open-source compliance
  • Organizations requiring self-hosted IaC tooling for air-gapped or highly regulated environments
  • DevOps practitioners using OpenTofu in CI/CD pipelines to provision cloud resources (AWS, Azure, GCP, etc.) and on-prem systems

Getting started

Install via package managers (Homebrew, APT, YUM), download prebuilt binaries from GitHub Releases, or use the official Docker image opentofu/opentofu. Run tofu init, tofu plan, and tofu apply in sequence to deploy infrastructure. Nightly builds are available at https://nightlies.opentofu.org/nightlies.

When to use it — and when not to

Use OpenTofu when you need a fully open-source, Terraform-compatible IaC tool with no licensing restrictions or vendor dependencies. Avoid it if you rely on Terraform Cloud features (e.g., remote state locking via Terraform Cloud, team collaboration UI) since OpenTofu does not include those; users must self-host state backends and manage access controls separately. The project requires operational overhead for state management and does not provide built-in audit trails or governance policies beyond what providers expose.

project readme (upstream, from github) — read inline

OpenSSF Best Practices

Homepage | Slack | Get Started

OpenTofu is an OSS tool for building, changing, and versioning infrastructure safely and efficiently. OpenTofu can manage existing and popular service providers as well as custom in-house solutions.

Getting help and contributing

[!TIP] For more OpenTofu events, subscribe to the OpenTofu Events Calendar!

Key features

  • Infrastructure as Code: Infrastructure is described using a high-level configuration syntax. This allows a blueprint of your datacenter to be versioned and treated as you would any other code. Additionally, infrastructure can be shared and re-used.

  • Execution Plans: OpenTofu has a "planning" step where it generates an execution plan. The execution plan shows what OpenTofu will do when you call apply. This lets you avoid any surprises when OpenTofu manipulates infrastructure.

  • Resource Graph: OpenTofu builds a graph of all your resources, and parallelizes the creation and modification of any non-dependent resources. Because of this, OpenTofu builds infrastructure as efficiently as possible, and operators get insight into dependencies in their infrastructure.

  • Change Automation: Complex changesets can be applied to your infrastructure with minimal human interaction. With the previously mentioned execution plan and resource graph, you know exactly what OpenTofu will change and in what order, avoiding many possible human errors.

Nightly Builds

Nightly builds are available for testing the latest changes on main. These are experimental and not intended for production use. Each build is removed after 30 days.

Nightly builds can be found at https://nightlies.opentofu.org/nightlies. For those who want to automate with tooling, https://nightlies.opentofu.org/nightlies/latest.json will be kept up to date with the latest build information.

For more details, see RELEASE.md.

Reporting security vulnerabilities

If you've found a vulnerability or a potential vulnerability in OpenTofu please follow Security Policy. We'll send a confirmation email to acknowledge your report, and we'll send an additional email when we've identified the issue positively or negatively.

Reporting possible copyright issues

If you believe you have found any possible copyright or intellectual property issues, please contact [email protected]. We'll send a confirmation email to acknowledge your report.

Registry Access

In an effort to comply with applicable sanctions, we block access from specific countries of origin. For more details, see the Registry Inclusion Policy.

License

Mozilla Public License v2.0

Frequently asked questions

Is OpenTofu free to use?

OpenTofu is open source under the MPL-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does OpenTofu do?

Open source infrastructure as code tool

What is OpenTofu written in?

OpenTofu is primarily written in Go. Its source is publicly available at https://github.com/opentofu/opentofu, and it has 30,204 GitHub stars.