Skip to content

agentstack platform start fails on Linux hosts with UID 1000 (cloud-init user-creation conflict) #2619

@maxlinux

Description

@maxlinux

Pre-requisities

  • I am using the newest version of the platform (agentstack version shows CLI and platform 0.7.1, no newer version available)

Describe the bug
On Linux hosts where the calling user has UID 1000 (the default for the first user on most distros), agentstack platform start fails at the "Detecting Kubernetes platform" step with Permission denied (publickey,password).

Root cause is inside the Lima VM: cloud-init's users-groups module fails to create the host user because UID 1000 is already taken by the debian user that ships with the base debian-13-genericcloud image used to build microshift-vm-*.qcow2. With no user account, the SSH public key is never installed in ~/.ssh/authorized_keys, so every subsequent limactl shell call from the CLI is rejected.

Serial-log evidence from ~/.agentstack/lima/agentstack/serial.log:

[5.553806] cloud-init: WARNING: Failed to create user maxl
[5.557106] cloud-init: Running module users-groups failed
[FAILED] Failed to start cloud-init-network.service - Cloud-init: Network Stage.
[FAILED] Failed to start cloud-final.service     - Cloud-init: Final Stage.

To Reproduce

  1. On a Linux host where id -u returns 1000, install via sh -c "$(curl -LsSf https://agentstack.beeai.dev/install.sh)"
  2. Run agentstack platform start
  3. The command hangs/retries on Detecting Kubernetes platform and eventually errors with:
    maxl@127.0.0.1: Permission denied (publickey,password).
    CalledProcessError: ... 'limactl' 'shell' ... 'agentstack' '--' 'sudo' 'bash' '-c' 'command -v k3s || command -v microshift' returned non-zero exit status 255.
    
  4. agentstack platform delete and retrying produces the identical failure.

Expected behavior
agentstack platform start should succeed regardless of the host user's UID. The first user on a fresh Linux install is almost always UID 1000, so this currently breaks the documented happy path on most Linux hosts.

Logs / Screenshots / Code snippets

Lima cloud-config that the CLI generates (note uid: "1000"):

users:
  - name: "maxl"
    uid: "1000"
    homedir: "/home/maxl.linux"

Working workaround (forces a non-conflicting UID inside the VM):

agentstack platform delete
mkdir -p ~/.agentstack/lima/_config
cat > ~/.agentstack/lima/_config/override.yaml <<'OVERRIDE'
user:
  uid: 1001
OVERRIDE
agentstack platform start

After this, cloud-init completes cleanly, the user is created, SSH keys are provisioned, and the platform comes up healthy.

Set-up

  • Host OS: Pop!_OS / Linux 6.17.9-76061709-generic
  • Host user UID: 1000
  • agentstack version: cli 0.7.1, platform 0.7.1
  • Bundled limactl version: 2.0.3
  • VM image: microshift-vm-x86_64.qcow2 (Debian 13 generic-cloud base)

Additional context
The debian user in debian-13-genericcloud-amd64.qcow2 is created at UID 1000 by default. Either deleting that user during the Packer build (apps/microshift-vm/install.sh) or having the CLI emit a non-1000 UID for the Lima user would fix this. The default ~/.lima/_config/override.yaml is not read by agentstack because the CLI sets LIMA_HOME=~/.agentstack/lima, so users hitting this currently have no obvious workaround.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions