Skip to content

launchd auto start support missing? #74

Description

@csetera

The colima stuff is working great as a Docker Desktop replacement with one minor exception for me. I've been unable to get it to autostart via launchd. I think that it is likely because the "start" command forks the hypervisor and then eventually exits. My understanding is that launchd expects the command to run indefinitely. I took a look at the code, but not conversant enough in Go to figure out how to "fix" this. Is this something that is on the roadmap?

Activity

  1. abiosoft commented on Nov 30, 2021

    @abiosoft
    Owner

    Yeah, auto-startup has not been added to the project.

  2. csetera commented on Nov 30, 2021

    @csetera
    Author

    Thanks. In the short term, simply making an option that leaves the colima application running in the foreground might be enough to give people a way to wrap it up in launchd. Anyway... Thanks for this project!

  3. Amar1729 commented on Jun 6, 2022

    @Amar1729
    Contributor

    see also #96

  4. resker commented on Sep 12, 2026

    @resker

    FYI — upstream Lima can do this natively now, which should make it straightforward for Colima to adopt.

    limactl autostart enable --condition=boot <instance> installs a system LaunchDaemon w/ KeepAlive, so it starts at boot rather than at login — no GUI session needed.

    The blocker for Colima was that the generated plist carried no LIMA_HOME, so at boot it resolved the default ~/.lima and never found an instance under ~/.colima/_lima. Fixed in lima-vm/lima#5489 (merged, slated for Lima v2.3.0):

    LIMA_HOME=~/.colima/_lima limactl autostart enable --condition=boot colima

    It'd seem to be worthwhile to expose this as an option rather than having users hand-roll plists — #1490 shows how that goes wrong, and #262 / #1265 are after the same thing from different angles.

    A macOS limitation (by design) that'd represent a caveat to document though: /Library/LaunchDaemons is root-owned so the invoking account needs sudo, and limactl won't run as root — so sudo limactl isn't a way around it.

    I'll follow up w/ a PR for consideration.

  5. resker commented on Sep 12, 2026

    @resker

    Following up on the above — draft PR is #1636 (there are some open questions whether this is approach is desired by the Colima project though)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions