Skip to content

[Feature]: Make Canvas Directory Configurable #2282

Description

@sanool

Current Behavior:

The Canvas feature currently hardcodes the output directory to ⁠ ~/clawd/canvas ⁠:

[canvas] host mounted at http://127.0.0.1:18789/__clawdbot__/canvas/ (root /Users/sanool/clawd/canvas)

This directory is automatically created on gateway startup, regardless of the configured ⁠ agents.defaults.workspace ⁠ setting.

Problem:

When users customize their workspace directory (e.g., ⁠ ~/Bot ⁠ instead of ⁠ ~/clawd ⁠), the Canvas feature still creates files in ⁠ ~/clawd/canvas ⁠, leading to:
•⁠ ⁠Split configuration across multiple directories
•⁠ ⁠Confusion about where files are being stored
•⁠ ⁠Difficulty maintaining a clean workspace structure

Proposed Solution:

Add a configurable option for the Canvas directory, for example:

⁠ json
{
"canvas": {
"root": "~/Bot/canvas"
}
}
 ⁠

Default Behavior:

If not configured, default to ⁠ /canvas ⁠ to respect the user's workspace setting:
•⁠ ⁠If ⁠ agents.defaults.workspace ⁠ is ⁠ /Users/sanool/Bot ⁠, canvas root becomes ⁠ /Users/sanool/Bot/canvas ⁠
•⁠ ⁠If workspace is not set, fall back to ⁠ ~/clawd/canvas ⁠ (current behavior)

Use Case:

Users who want a unified workspace structure (e.g., everything under ⁠ ~/Bot ⁠) should be able to keep Canvas files in the same location without needing symlinks or workarounds.

Suggested Implementation:

1.⁠ ⁠Add ⁠ canvas.root ⁠ to config schema
2.⁠ ⁠Update gateway canvas initialization to respect this setting
3.⁠ ⁠Default to ⁠ /canvas ⁠ if not explicitly configured
4.⁠ ⁠Document in configuration reference

Alternative Workaround (Current):

⁠ bash
rm -rf ~/clawd
mkdir -p ~/Bot/canvas
ln -s ~/Bot/canvas ~/clawd/canvas
 ⁠

This works but feels like a hack for what should be a configurable option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions