Skip to content

[FEATURE]:Full air-gapped/offline mode – please make it actually work without any internet #18492

Closed

Description

@xpat07

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Hey team

been just a little bit intoxicated, but I love OpenCode and use it daily with local models (Ollama/vLLM mostly), but air-gapped / fully offline environments are still a pain in 2026.

Right now even with a custom provider and local-only config, startup often fails because of:

This breaks things in restricted networks (defense, finance, some gov/corp setups) even when the LLM endpoint is 100% internal.

Related issues I've seen piling up:

What I'd love (and I think a lot of enterprise users would too):

A simple, reliable offline mode toggle, something like:

  • opencode --offline / env OPENCODE_OFFLINE=1 / config "offline": true
  • When on → skip all non-LLM network requests (models.dev, manifests, CDNs, updates, etc.)
  • Graceful fallback: just use whatever providers/models are already defined locally
  • Maybe a startup message like "Offline mode active – only talking to your local LLM"
  • Bonus: optional internal mirror for models list if someone wants it (OPENCODE_MODELS_URL=http://...)

Workarounds like firewall blocks or OPENCODE_DISABLE_MODELS_FETCH=1 help partially but aren't complete and sometimes still cause crashes/500s.

This would make OpenCode way more adoptable in high-security places without everyone having to fork or patch. The core already works great offline once you bypass the startup noise.

Thanks for all the awesome work – hoping this can get some love! 🙏

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Mar 21, 2026
  2. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 21, 2026
  3. github-actions commented on Mar 21, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Consider adding a +1 or comment on one of those issues rather than opening a new one, so discussion stays consolidated.

  4. solarkraft commented on Mar 21, 2026

    @solarkraft

    I would like to pile on that this is important to me and a lot of others trying to run OpenCode in sensitive environments (it keeps coming up, the recent Hacker News thread is filled with “this project is a joke with its security stance” comments: https://news.ycombinator.com/item?id=47460525).

    Considering all of the open issues regarding this complex, I would like to ask for official clarification:

    Is this use case a project priority or even a project interest?

    Statements suggest that maintainers aren’t necessarily opposed to privacy but actions suggest that it’s not a priority (definitely below out-of-the-box UX). Yet there seem to be some plans for enterprise compatibility, which this would be essential for.

    I’d really like to find a solution for this because I really like OpenCode. But this is a gigantic issue making adoption way harder than it would have to be.

  5. xpat07 commented on Mar 23, 2026

    @xpat07
    Author

    Thanx for your comment.
    I am working for local government and we have a lot of young developers and devops guys.
    I would be very happy to introduce opencode as very potent tool and as future way of work on our code and infrastructure.
     
    But our organisation is prohibiting use of cloud models and provider for now.
We have small but good local AI infrastructure. 
For now and for us would be the best for now to be able to use opencode in offline mode with local models.
I hink also for education will be such offline mode also very good.

    I’m not very skilled opensource developer but the future of our devs, devops is very important to me.
    I don’t think if I would be able to fully fork or to implement such a feature. Maybe I can try?

    For my personal use I can configure it such and be every happy.
    Em I missing something?
    What do you think?

  6. thdxr commented on Mar 26, 2026

    @thdxr
    Member

    Fixed by #19299 - The WebUI is now embedded directly in the binary, so it works fully offline without requiring any CDN assets. This addresses the air-gapped/offline use case for the web interface. Note: Other non-LLM network calls (models.dev, update checks) may still require additional configuration via existing environment variables like OPENCODE_DISABLE_MODELS_FETCH.

  7. thdxr commented on Mar 26, 2026

    @thdxr
    Member

    Closing as fixed by #19299

  8. xpat07 commented on Mar 26, 2026

    @xpat07
    Author

    And what about TUI? Thanks for the effort. I am trying to implement opencode --offline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions