How to Install OpenTofu on macOS

The easiest way to install OpenTofu on macOS is Homebrew. One command installs it, one command keeps it up to date, and OpenTofu then runs in Terminal as the tofu command.

This guide is the Mac setup step for the OpenTofu Tutorial for Beginners. When you finish, OpenTofu is installed and tofu -version shows which version you have.

Cost: free. OpenTofu and Homebrew are free and open source, and you don’t need an account.

Every command and output on this page is real, run on an Apple silicon Mac with macOS 26 Tahoe, Homebrew 7.0 and OpenTofu 1.13.9.

Prerequisites

  • A Mac with Apple silicon and macOS 15 Sequoia or later. On an Intel Mac or an older macOS, see the FAQ below.
  • Homebrew, the free package manager for macOS. To check for it, open Terminal (press ⌘ Space, type Terminal and press Return), then run brew --version. If it prints Homebrew and a version number, you’re ready. If it says zsh: command not found: brew, install Homebrew from brew.sh first.

Step 1: Install OpenTofu with Homebrew

In Terminal, run this command. brew install downloads a package and installs it. The package is called opentofu, and the command it gives you is tofu.

brew install opentofu

If Homebrew hasn’t updated itself in the last 24 hours, it does that first and prints more lines above these. The end of the output looks like this:

A macOS Terminal window running brew install opentofu, where Homebrew downloads the OpenTofu 1.13.9 bottle, pours it into /opt/homebrew/Cellar/opentofu/1.13.9 and lists zsh completions under Caveats.
Homebrew installs OpenTofu 1.13.9 on an Apple silicon Mac.
==> Downloading bottle manifests
✔︎ Bottle Manifest opentofu (1.13.9)
==> Fetching downloads for: opentofu
✔︎ Bottle opentofu (1.13.9)
==> Pouring opentofu--1.13.9.arm64_tahoe.bottle.tar.gz
🍺  /opt/homebrew/Cellar/opentofu/1.13.9: 10 files, 106MB
==> Caveats
zsh completions have been installed to:
  /opt/homebrew/share/zsh/site-functions

The 🍺 line means OpenTofu is installed. The Caveats lines only say that Homebrew also added tab-completion files for zsh, the Mac’s command shell. You don’t need them for this guide.

Step 2: Check That OpenTofu Works

Ask OpenTofu which version it is:

tofu -version
A macOS Terminal window running tofu -version, which prints OpenTofu v1.13.9 on darwin_arm64.
tofu -version confirms that OpenTofu 1.13.9 is installed.
OpenTofu v1.13.9
on darwin_arm64

The first line is the version you installed. The second line is the build for your Mac: darwin_arm64 means macOS on Apple silicon. If you see a version number, OpenTofu is ready to use.

Keep OpenTofu Up to Date

When a new OpenTofu version comes out, update to it with one command:

brew upgrade opentofu

If you already have the newest version, Homebrew says so and changes nothing:

Warning: opentofu 1.13.9 already installed

Common Mistakes

MistakeWhat happensDo this instead
Running brew install tofuHomebrew installs Tofu, an unrelated e-reader app, not OpenTofu.Install the package named opentofu: brew install opentofu.
Typing opentofu to run OpenTofuzsh answers zsh: command not found: opentofu.The package is opentofu, but the command is tofu.
Installing Terraform firstYou get a second tool you don’t need.OpenTofu works on its own. It doesn’t need Terraform.

Troubleshooting

ProblemWhyFix
zsh: command not found: brewHomebrew isn’t installed, or your shell can’t find it.Install Homebrew from brew.sh. When it finishes, it prints the commands that add brew to your shell. Run them, then open a new Terminal window.
Warning: opentofu 1.13.9 is already installed and up-to-date.OpenTofu is already on your Mac.Run tofu -version to see it, or brew upgrade opentofu to update it.
tofu -version shows an older version than the newest releaseHomebrew’s package list is out of date, or the release is so new that Homebrew doesn’t have it yet.Run brew update, then brew upgrade opentofu.

FAQ

Is OpenTofu free to use on a Mac?

Yes. OpenTofu is open source under the Mozilla Public License 2.0, so it’s free for personal and commercial use. Is OpenTofu Free for Commercial Use? explains the license.

Do I need Terraform installed to use OpenTofu?

No. OpenTofu is a separate tool with its own tofu command. OpenTofu vs Terraform: What’s the Difference? explains how the two compare.

Should I run brew update first?

You can, and OpenTofu’s own install page does. You don’t have to: before an install, Homebrew updates itself automatically if it hasn’t done so in the last 24 hours.

Does this work on an Intel Mac or an older macOS?

OpenTofu 1.13 needs macOS 13 Ventura or later, the minimum for the Go version it’s built with. Homebrew has ready-made OpenTofu packages only for Apple silicon Macs on macOS 15 Sequoia and later. It lists Intel Macs as Tier 3, which it describes as not supported, and it no longer builds new packages for them. On an Intel Mac, or on macOS 13 or 14, use OpenTofu’s standalone installer instead.

Can I install OpenTofu without Homebrew?

Yes. OpenTofu’s installation page lists other ways, including a standalone installer script and ready-made downloads for macOS on its GitHub releases page.

Which OpenTofu version does the tutorial use?

The newest one. The OpenTofu Tutorial runs on OpenTofu 1.13, and Homebrew installs the newest version it has.

Conclusion

OpenTofu is now installed on your Mac: brew install opentofu installed it, tofu -version confirmed it, and brew upgrade opentofu keeps it current. Next, set up your editor with the guide How to Set Up VS Code for OpenTofu, then build your first project in Part 2 of the OpenTofu Tutorial. If you’re new to OpenTofu, start with Part 1: What Is OpenTofu?

Related

Additional Resources

OpenTofu® is a registered trademark of LF Projects, LLC. Terraform and other names mentioned are trademarks of their respective owners. JD Bots isn’t affiliated with or endorsed by the OpenTofu project or HashiCorp.

2 thoughts on “How to Install OpenTofu on macOS”

Add yours

Leave a Reply

Up ↑