Skip to content

Installing an app creates an empty folder (and chowns it) for every named volume in its compose file #525

Closed

Description

@nixfred

What happens

createBindSources() in omarchyd/apps.mjs (~lines 1129-1160) is meant to pre-create bind-mount source folders. It takes the part before the first : of every volume string, or source of every object, and resolves it against the app folder:

const src = typeof v === 'string' ? expandVars(v, env).split(':')[0] : v?.source && expandVars(v.source, env)
...
const path = bindHostPath(src, {home, cwd: dir})   // 'pgdata' -> <app folder>/pgdata

It never checks whether the source is a bind at all. A named volume (pgdata:/var/lib/postgresql/data) or an object with type: volume has a bare name as its source, which bindHostPath turns into <app folder>/<name>. That folder is then created with mkdir and added to app.dataDirs, which prepareOwnership() runs podman unshare chown -R 1000:1000 on.

Result: for every named volume there is an unused, empty folder in the app's data folder next to the real data, and it is handed to the container user. The real data lives in Podman's volume storage, so the folder is just an unused, empty folder inside the app's data folder that is easy to mistake for the volume's content.

How to reproduce

I installed a store app through createApps() (fake run, throwaway data dir) with:

services:
  boss:
    image: x
    volumes:
      - pgdata:/var/lib/postgresql/data
      - ./conf:/conf
      - type: volume
        source: other
        target: /o
volumes:
  pgdata:
  other:

Actual: the app folder contains conf, other, pgdata, and the recorded command is podman unshare chown -R 1000:1000 <app>/pgdata <app>/conf <app>/other.
Expected: only conf (the relative bind) is created and chowned.

Suggested fix

Skip type: volume / type: tmpfs objects, and for short strings only treat a source as a bind when it starts with /, . or ~ (the same rule Compose uses).

Environment

Omarchy Server main (6aa7f7d, 0.9.52), Node 26.

Activity

  1. calledtoconstruct commented on Nov 22, 2026

    @calledtoconstruct
    Collaborator

    Working to resolve this.

    No open pull request references this issue, and no one has commented that they are working on it.

    #526, #342, #524, #527, #133, #102, #777, #129, #239, #243, #236, #233, #232, #142, #242, and #443 share the app store with this and will land in one pull request.

    🤖 Generated with Grok 4.7

  2. calledtoconstruct commented on Nov 22, 2026

    @calledtoconstruct
    Collaborator

    Thanks @nixfred. A named volume or tmpfs is no longer created as an empty folder in the app. This ships in #876.

    🤖 Generated with Grok 4.7

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions