# 保存場所の変更

## 既定の保存場所

Cherry Studio のデータ保存はシステムの規則に従い、データは自動的にユーザーディレクトリ下に配置されます。具体的な保存先は以下のとおりです：

> macOS: /Users/username/Library/Application Support/CherryStudioDev

> Windows: C:\Users\username\AppData\Roaming\CherryStudio

> Linux: /home/username/.config/CherryStudio

以下の場所でも確認できます：

<figure><img src="/files/acbce02e7b9552df91a752f6b1435f8beb65d550" alt=""><figcaption></figcaption></figure>

## 保存場所の変更（参考）

方法1：

シンボリックリンクを作成する方法で実現できます。ソフトウェアを終了し、データを保存したい場所へ移動したあと、元の場所に移動先を指すリンクを作成すればよいです。

具体的な手順は以下を参照してください：<https://github.com/CherryHQ/cherry-studio/issues/621#issuecomment-2588652880>

方法2：\
Electron アプリの特性に基づき、起動パラメータの設定で保存場所を変更します。

> \--user-data-dir\
> 例: Cherry-Studio-\*-x64-portable.exe --user-data-dir="%user\_data\_dir%"

> 例：

```shell
PS D:\CherryStudio> dir


    ディレクトリ: D:\CherryStudio


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         2025/4/18     14:05                user-data-dir
-a----         2025/4/14     23:05       94987175 Cherry-Studio-1.2.4-x64-portable.exe
-a----         2025/4/18     14:05            701 init_cherry_studio.bat
```

> init\_cherry\_studio.bat (encoding: ANSI)

```bash
@title CherryStudio 初期化
@echo off

set current_path_dir=%~dp0
@echo 現在のパス:%current_path_dir%
set user_data_dir=%current_path_dir%user-data-dir
@echo CherryStudio データパス:%user_data_dir%

@echo 現在のパスで Cherry-Studio-*-portable.exe を検索中
setlocal enabledelayedexpansion

for /f "delims=" %%F in ('dir /b /a-d "Cherry-Studio-*-portable*.exe" 2^>nul') do ( #このコードは GitHub 版と公式サイト版に対応しています。その他は各自で修正してください
    set "target_file=!cd!\%%F"
    goto :break
)
:break
if defined target_file (
    echo ファイルを見つけました: %target_file%
) else (
    echo 一致するファイルが見つかりませんでした。このスクリプトを終了します
    pause
    exit
)

@echo 確認して続行してください
pause

@echo CherryStudio を起動しています
start %target_file% --user-data-dir="%user_data_dir%"

@echo 操作完了
@echo on
exit
```

> user-data-dir ディレクトリの初期化後の構造：

```shell
PS D:\CherryStudio> dir .\user-data-dir\


    ディレクトリ: D:\CherryStudio\user-data-dir


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         2025/4/18     14:29                blob_storage
d-----         2025/4/18     14:07                Cache
d-----         2025/4/18     14:07                Code Cache
d-----         2025/4/18     14:07                Data
d-----         2025/4/18     14:07                DawnGraphiteCache
d-----         2025/4/18     14:07                DawnWebGPUCache
d-----         2025/4/18     14:07                Dictionaries
d-----         2025/4/18     14:07                GPUCache
d-----         2025/4/18     14:07                IndexedDB
d-----         2025/4/18     14:07                Local Storage
d-----         2025/4/18     14:07                logs
d-----         2025/4/18     14:30                Network
d-----         2025/4/18     14:07                Partitions
d-----         2025/4/18     14:29                Session Storage
d-----         2025/4/18     14:07                Shared Dictionary
d-----         2025/4/18     14:07                WebStorage
-a----         2025/4/18     14:07             36 .updaterId
-a----         2025/4/18     14:29             20 config.json
-a----         2025/4/18     14:07            434 Local State
-a----         2025/4/18     14:29             57 Preferences
-a----         2025/4/18     14:09           4096 SharedStorage
-a----         2025/4/18     14:30            140 window-state.json
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cherry-ai.com/docs/jp/pre-basic/personalization-settings/storage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
