Skip to content

Commit ab1136a

Browse files
Stephen Belangerclaude
andcommitted
docs: improve rootless Podman socket mounting instructions
Map the rootless host socket to /run/podman/podman.sock inside the container rather than preserving the host's /run/user/<uid>/ path. The container has no user profile, so the user-scoped path is a host concept that doesn't belong in the container environment. Mapping to the standard rootful path requires no XDG_RUNTIME_DIR inside the container and avoids uid-specific paths in compose configs. Also split the Podman Compose example into separate rootful and rootless variants using ${XDG_RUNTIME_DIR} for the rootless case. Verified: rootless socket mounted at /run/podman/podman.sock is detected correctly and can_apply returns true. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent cf98cf5 commit ab1136a

File tree

1 file changed

+31
-3
lines changed

1 file changed

+31
-3
lines changed

docs/content/docs/(getting-started)/docker.mdx

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,10 @@ podman run -d \
319319
ghcr.io/spacedriveapp/spacebot:slim
320320
```
321321

322-
**Rootless Podman** — enable the user socket and pass `XDG_RUNTIME_DIR`:
322+
**Rootless Podman** — enable the user socket and map it to the standard rootful
323+
path inside the container. The container has no user profile, so mapping to
324+
`/run/podman/podman.sock` (not the host's user-scoped path) is cleaner and
325+
requires no extra environment variables:
323326

324327
```bash
325328
systemctl --user enable --now podman.socket
@@ -330,9 +333,8 @@ podman run -d \
330333
--name spacebot \
331334
-e ANTHROPIC_API_KEY="sk-ant-..." \
332335
-e SPACEBOT_DEPLOYMENT=docker \
333-
-e XDG_RUNTIME_DIR=/run/user/$(id -u) \
334336
-v spacebot-data:/data \
335-
-v $XDG_RUNTIME_DIR/podman/podman.sock:$XDG_RUNTIME_DIR/podman/podman.sock \
337+
-v $XDG_RUNTIME_DIR/podman/podman.sock:/run/podman/podman.sock \
336338
--security-opt label=disable \
337339
-p 19898:19898 \
338340
ghcr.io/spacedriveapp/spacebot:slim
@@ -349,6 +351,8 @@ any custom socket location.
349351

350352
### Podman Compose
351353

354+
For rootful Podman, use the system socket directly:
355+
352356
```yaml
353357
services:
354358
spacebot:
@@ -370,6 +374,30 @@ volumes:
370374
spacebot-data:
371375
```
372376

377+
For rootless Podman, map the user socket to the standard rootful path inside
378+
the container (no `XDG_RUNTIME_DIR` needed inside the container):
379+
380+
```yaml
381+
services:
382+
spacebot:
383+
image: ghcr.io/spacedriveapp/spacebot:slim
384+
container_name: spacebot
385+
restart: unless-stopped
386+
ports:
387+
- "19898:19898"
388+
volumes:
389+
- spacebot-data:/data
390+
- ${XDG_RUNTIME_DIR}/podman/podman.sock:/run/podman/podman.sock
391+
environment:
392+
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
393+
- SPACEBOT_DEPLOYMENT=docker
394+
security_opt:
395+
- label=disable
396+
397+
volumes:
398+
spacebot-data:
399+
```
400+
373401
Run with `podman-compose up -d`.
374402

375403
> **Note:** `SPACEBOT_DEPLOYMENT=docker` is required regardless of whether you

0 commit comments

Comments
 (0)