-
Notifications
You must be signed in to change notification settings - Fork 64
File Transfer
Transfer files and directories between host and containers.
Copy files from your host into a container:
# Push single file
coi file push ./config.json my-container:/workspace/config.json
# Push directory (recursive)
coi file push -r ./src my-container:/workspace/src
# Push with custom permissions
coi file push ./script.sh my-container:/usr/local/bin/script.shCopy files from a container to your host:
# Pull single file
coi file pull my-container:/workspace/build.log ./build.log
# Pull directory (recursive)
coi file pull -r my-container:/home/code/.claude ./saved-sessions/session-123/
# Pull build artifacts
coi file pull -r my-container:/workspace/dist ./output/# Save AI tool session to host
coi file pull -r my-container:/home/code/.claude ./backups/session-$(date +%Y%m%d)/# Push config files before starting session
coi file push ./custom-config.toml my-container:/home/code/.config/tool/config.toml# Copy compiled binaries or build output
coi file pull -r my-container:/workspace/build ./artifacts/# Pull from one container, push to another
coi file pull my-container-1:/workspace/data.json ./temp.json
coi file push ./temp.json my-container-2:/workspace/data.json- File ownership is preserved when possible
- Use
-rflag for recursive directory operations - Paths in containers must be absolute
- Works with both running and stopped containers
Coi containers use Incus UID mapping — idmapped (shift=true) mounts or a per-instance raw.idmap, selected automatically per host/filesystem — so that files owned by your host user appear as the code user (UID 1000) inside the container. When pushing files, the ownership is shifted automatically — you do not need to chown files after pushing.
When pulling files, the reverse shift applies: files owned by code inside the container appear owned by your host user on the filesystem.
Note: Pushing to System Paths Pushing files to paths outside
/home/codeand/workspace(e.g.,/usr/local/bin) may require the file to be owned by root inside the container. Usecoi container exec <name> -- chown root:root /path/to/fileafter pushing if the tool requires root ownership.
- Container Operations - Full list of container management commands
- Container Lifecycle and Sessions - Session save, resume, and slot management
Home · Getting Started · Configuration · Migration Guide · GitHub · Issues
Getting Started
Setup
Configuration & Usage
- Best Practices
- Configuration
- Profiles
- Supported Tools
- Container Lifecycle & Sessions
- Container Operations
- Snapshot Management
- File Transfer
- Port Publishing
- Tmux Automation
- Headless Orchestration
- Image Management
- Resource & Time Limits
- Resource Usage (coi top)
Security
- Threat Model: Containment Limits
- Security Monitoring
- Audit Log
- Session Logs
- Security Best Practices
- Network Isolation
Maintenance
Help & Reference