Auto-Update: You Don't Need to Worry About It
What You'll Learn
- Know that OpenCode updates automatically (default behavior)
- Manually update to the latest version when needed
- Understand how to disable/enable auto-update
Your Current Pain Points
- Worried about bugs or security issues in old versions
- Seeing a new version prompt but don't know how to update
- Want to stay up-to-date but afraid updates might cause problems
When to Use This
- Default: Don't worry about it, OpenCode will auto-update
- Special cases: Need manual update, specific version, or disable auto-update
🎒 Prerequisites
Make sure you've completed the following:
- [x] OpenCode installed (1.2 Installation)
Core Concepts
- Default behavior: OpenCode automatically checks and downloads updates on startup
- Configuration control: Can be controlled via the
autoupdateoption in config file - Manual update:
opencode upgradecommand
Follow Along
Important Note: You Can Skip This Lesson
Why?
OpenCode's default installation methods (curl | bash or brew install) already have auto-update configured. Every time it starts, it will:
- Check for new versions in the background
- Automatically download updates
- Use the new version on next startup
For you: You don't need to do anything, it will stay up-to-date.
When do you need this lesson?
- You want to know more details (technical curiosity)
- You need to manually update to a specific version
- You want to disable auto-update
Step 1: Manual Update (Optional)
When do you need a manual update?
- Auto-update failed (network issues)
- You want to upgrade to the latest version immediately
- You want to upgrade to a specific version
Upgrade to the latest version:
opencode upgradeYou'll see:
┌ Upgrade
│
● Using method: curl
● From 1.1.5 → 1.1.6
◇ Upgrading...
│
└ Upgrade completeUpgrade to a specific version:
opencode upgrade 1.1.5Or with v prefix:
opencode upgrade v1.1.5Update using a specific installation method:
opencode upgrade --method npmSupported methods: curl, npm, pnpm, bun, brew
Step 2: Configure Auto-Update (Optional)
Auto-update is controlled by the autoupdate field in the config file.
Edit the config file:
macOS/Linux:
# Open with your preferred editor
vim ~/.config/opencode/opencode.json
# or
code ~/.config/opencode/opencode.jsonWindows:
notepad $env:USERPROFILE\.config\opencode\opencode.jsonConfiguration:
{
"$schema": "https://opencode.ai/config.json",
"autoupdate": false
}Three possible values:
true: Automatically download updates (default)false: Don't check for updates"notify": Notify when new version is available, but don't auto-download
Environment Variable Method
You can also disable auto-update via environment variable:
export OPENCODE_DISABLE_AUTOUPDATE=trueChecklist ✅
All items must pass to continue; if any fail, see "Troubleshooting" below
- [ ] Know that OpenCode auto-updates by default
- [ ] (Optional) Know the
opencode upgradecommand - [ ] (Optional) Know how to configure
autoupdate
Troubleshooting
Issue 1: Network Timeout, Download Failed
Symptom:
Error: connect ETIMEDOUTCause: Network unreachable or GitHub connection timeout
Solution:
- Check your network
- Use a proxy (see 1.3 Network Configuration)
- Or temporarily disable auto-update, manually update when network is better
Issue 2: Want to Downgrade to an Older Version
Scenario: New version has bugs, want to rollback
Solution:
opencode upgrade 1.1.5Downgrade and upgrade use the same command, just specify the older version number
Issue 3: Manual Update Shows "rate limit exceeded"
Symptom:
error: rate limit exceededCause: GitHub API has request rate limits:
- Unauthenticated requests: 60/hour
- Authenticated requests: 2000+/hour
OpenCode's opencode upgrade calls GitHub API to check for the latest version. If called multiple times in a short period, it will trigger rate limit restrictions.
Solutions (3 options):
Method 1: Wait about 1 hour and retry
# GitHub API rate limit resets every hour
opencode upgradeMethod 2: Manually specify version number (bypass API call)
# Specify version directly, doesn't call latest() API
opencode upgrade 1.1.6Method 3: Use npm installation method (if you have Node.js)
# npm registry has no rate limit
npm install -g opencode-ai@latestHow to Avoid This Issue
- Try to use OpenCode's auto-update feature, avoid frequent manual
opencode upgrade - Don't execute
opencode upgradecommand multiple times in a short period
Lesson Summary
You learned:
- OpenCode auto-updates by default, most users don't need to worry about it
- Use
opencode upgradefor manual updates when needed - Can disable/enable auto-update via the
autoupdatefield in config file
Next Lesson Preview
Next we'll learn 2.1 Interface & Basic Operations and start actually using OpenCode.
You'll learn:
- Understanding the TUI interface
- Using
@to reference files- Using
!to execute commands- Using
/slash commands

