# Where Does draw.io Desktop Store Local and Session Data on macOS and Windows

> Find out where drawio Desktop stores local and session data on macOS and Windows. Learn about appData and Electron userData directories for efficient data management.

- Repository: [draw.io/drawio-desktop](https://github.com/jgraph/drawio-desktop)
- Tags: internals
- Published: 2026-03-05

---

**draw.io Desktop stores local application data in platform-specific appData directories (`~/Library/Application Support/draw.io` on macOS and `%APPDATA%\draw.io` on Windows), while session data including cookies, cache, and configuration resides in the Electron userData folder under `draw.io-desktop` subdirectories.**

draw.io Desktop, the offline Electron-based diagramming tool from the jgraph/drawio-desktop repository, manages persistent storage across two distinct filesystem locations. Understanding where the application writes its plugins, backups, settings, and temporary session files is essential for troubleshooting, privacy audits, or migrating configurations between machines.

## Local Application Data Storage

draw.io Desktop creates a dedicated folder for persistent local files using Electron's `app.getPath('appData')` API. This location stores plugins, automatic backups, and other application-specific files that persist between sessions.

### macOS Location

On macOS, the application constructs its data folder inside the system Application Support directory. According to [`src/main/electron.js`](https://github.com/jgraph/drawio-desktop/blob/main/src/main/electron.js), the `getAppDataFolder()` function (lines 2418-2431) resolves this path by joining `app.getPath('appData')` with the string `"draw.io"`.

```

~/Library/Application Support/draw.io

```

This directory contains the `plugins` subdirectory and any `.bkp` backup files generated during autosave operations.

### Windows Location

On Windows, the same function resolves to the Roaming AppData directory, creating a `draw.io` folder within the user's application data path.

```

%APPDATA%\draw.io

```

## Session Data and User Configuration

While the appData folder handles plugins and backups, session-specific information—including cookies, HTTP cache, localStorage, and the `electron-store` JSON configuration—resides in a separate location. Electron automatically manages this data under the `userData` path, using the application's name (`draw.io-desktop`) as defined in [`package.json`](https://github.com/jgraph/drawio-desktop/blob/main/package.json).

- **macOS**: `~/Library/Application Support/draw.io-desktop`
- **Windows**: `%APPDATA%\draw.io-desktop`

Unlike the explicit path construction in `getAppDataFolder()`, this location is determined automatically by the Electron framework. The [`src/main/electron-preload.js`](https://github.com/jgraph/drawio-desktop/blob/main/src/main/electron-preload.js) file accesses this storage indirectly through the `electron-store` module, which defaults to writing its configuration files inside the userData directory.

## Documents Folder for File Operations

For native "Open" and "Save As" dialogs, draw.io Desktop uses the standard Documents folder. The `getDocumentsFolder()` function (lines 3738-3745 in [`src/main/electron.js`](https://github.com/jgraph/drawio-desktop/blob/main/src/main/electron.js)) returns `app.getPath('documents')`, falling back to the current working directory if the system call fails.

- **macOS**: `~/Documents`
- **Windows**: `C:\Users\<User>\Documents`

## How to Access These Paths Programmatically

The storage path logic is implemented in [`src/main/electron.js`](https://github.com/jgraph/drawio-desktop/blob/main/src/main/electron.js) using Electron's path resolution APIs:

```javascript
// Lines 2418-2431: Resolves to %APPDATA%\draw.io or ~/Library/Application Support/draw.io
function getAppDataFolder() {
  const appDataPath = app.getPath('appData'); // Line 2422
  const drawIoFolder = path.join(appDataPath, 'draw.io');
  // Directory creation logic ensures the folder exists
  return drawIoFolder;
}

// Lines 3738-3745: Resolves to the user's Documents folder
function getDocumentsFolder() {
  try {
    return app.getPath('documents'); // Line 2442
  } catch (e) {
    return '.';
  }
}

```

To verify these locations in a running instance, you can inspect the paths via Electron's main process:

```javascript
const { app } = require('electron');
const path = require('path');

// Local plugins and backups
console.log('AppData:', path.join(app.getPath('appData'), 'draw.io'));

// Session storage and electron-store config
console.log('UserData:', app.getPath('userData'));

// Default save/open location
console.log('Documents:', app.getPath('documents'));

```

## Summary

- **Local data** (`draw.io` folder): Stores plugins and backup files at `~/Library/Application Support/draw.io` (macOS) or `%APPDATA%\draw.io` (Windows), explicitly constructed by `getAppDataFolder()` in [`src/main/electron.js`](https://github.com/jgraph/drawio-desktop/blob/main/src/main/electron.js).
- **Session data** (`draw.io-desktop` folder): Contains cookies, cache, localStorage, and `electron-store` configuration, automatically managed by Electron in the `userData` path.
- **Documents folder**: Used for native file dialogs, resolved via `getDocumentsFolder()` at lines 3738-3745.

## Frequently Asked Questions

### Can I change where draw.io Desktop stores its data?

No, the storage locations are hardcoded relative to Electron's standard directories. The application uses `app.getPath()` APIs in [`src/main/electron.js`](https://github.com/jgraph/drawio-desktop/blob/main/src/main/electron.js) which follow OS-specific conventions. Relocating these folders requires modifying the source code and rebuilding the application.

### Is it safe to delete the draw.io-desktop userData folder?

Yes, but you will lose session data including login cookies, cached resources, and settings stored via `electron-store`. The application will recreate the folder on next launch with default configurations. Your actual diagram files stored in Documents or other custom locations remain unaffected.

### Where are draw.io plugins stored on macOS?

Plugins are stored in the `plugins` subdirectory within the local app data folder, specifically at `~/Library/Application Support/draw.io/plugins`. This path is derived from the `getAppDataFolder()` function which appends `/draw.io` to the system's Application Support directory (line 2422 in [`src/main/electron.js`](https://github.com/jgraph/drawio-desktop/blob/main/src/main/electron.js)).

### How do I back up my draw.io Desktop configuration?

Back up both the `draw.io` folder (for plugins and backups) and the `draw.io-desktop` folder (for settings and preferences) from your platform's Application Support directory. The latter contains the `electron-store` configuration files that persist your application preferences between launches.