Environment and paths#
The four folders#
Ohm keeps its data in four folders, each of which can be moved:
| Folder | Holds | Default |
|---|---|---|
| data | settings.json, encrypted credentials, the models folder |
%APPDATA%\Ohm · ~/Library/Application Support/Ohm |
| profile | Chromium's own state: cookies, cache, local storage, sites you are signed in to | the data folder |
| scripts | .ohm files, projects, annotations, the trash |
<Documents>/Ohm |
| models | downloaded GGUF and ONNX files | <data>/models |
Each is decided by the first of these that says anything:
command-line flag → environment variable → config file → default
| Folder | Flag | Variable |
|---|---|---|
| data | --data-dir |
OHM_DATA_DIR (or the older OHM_USER_DATA) |
| profile | --profile-dir |
OHM_PROFILE_DIR |
| scripts | --scripts-dir |
OHM_SCRIPTS_DIR |
| models | --models-dir |
OHM_MODELS_DIR |
A flag takes its value as the next argument or after = or :, and a relative path is
resolved against the working directory:
Ohm.exe --data-dir "D:\Ohm\data" --profile-dir=D:\Ohm\profile --scripts-dir ./notes
A throwaway instance that touches nothing of yours is therefore one line:
Ohm.exe --data-dir /tmp/ohm/data --profile-dir /tmp/ohm/profile --scripts-dir /tmp/ohm/scripts
The config file#
For a permanent change there is a config file, editable by hand or from Settings → Folders:
| Platform | Path |
|---|---|
| Windows | %APPDATA%\Ohm\config.json |
| macOS | ~/Library/Application Support/Ohm/config.json |
| Linux | $XDG_CONFIG_HOME/ohm/config.json (else ~/.config/ohm/config.json) |
{
"version": 1,
"dataDir": "D:\\Ohm\\data",
"profileDir": "D:\\Ohm\\profile",
"scriptsDir": "D:\\Ohm\\scripts",
"modelsDir": "E:\\models"
}
It deliberately does not live in the data folder — it is what says where the data folder is — so it stays put in the system's standard config location whatever else moves. Keys it does not recognise are left alone when Ohm writes to it, and a file it cannot parse is ignored with a warning rather than stopping the app.
Two things worth knowing:
- Changes apply at the next start. Chromium holds its profile open for the life of the process, and settings are already loaded, so Ohm never switches folders mid-run. Settings → Folders shows what is running now and what is queued, with a Restart now button.
- Nothing is moved for you. Pointing at a new folder starts from whatever is in it — an empty one gets a fresh setup, and the scripts folder is seeded with the examples. Copy the old contents across yourself if you want them.
Other environment variables#
All optional, read once at startup in apps/desktop/src/main.ts.
| Variable | Default | Effect |
|---|---|---|
OHM_UI_URL |
ohm-app://ui/index.html |
Load the renderer from a dev server instead of the packaged files. npm run dev sets this. |
OHM_DEVTOOLS |
unset | With OHM_UI_URL, opens DevTools for the UI on start. |
Electron's own flags still work, which is what makes the app testable from the outside:
Ohm.exe --remote-debugging-port=9333
Paths#
| What | Windows | macOS |
|---|---|---|
| Scripts and projects | %USERPROFILE%\Documents\Ohm |
~/Documents/Ohm |
| Settings, credentials, models | %APPDATA%\Ohm |
~/Library/Application Support/Ohm |
| Browser profile (cookies, cache) | %APPDATA%\Ohm |
~/Library/Application Support/Ohm |
| Folder config | %APPDATA%\Ohm\config.json |
~/Library/Application Support/Ohm/config.json |
| Installed program (per user) | %LOCALAPPDATA%\Programs\Ohm |
/Applications/Ohm.app |
Uninstalling removes the program and, if you say yes, the default settings folder. The scripts folder is never touched by an uninstall, and neither is a data or profile folder you moved elsewhere — delete those yourself if you want them gone.
Custom URL schemes#
Three privileged schemes are registered before the app is ready. They are internal, but they show up in DevTools and in the CSP, so they are worth knowing:
| Scheme | Serves | Root |
|---|---|---|
ohm-app:// |
the renderer (HTML, JS, wasm) | apps/ui/dist (or ui/dist in a packaged build) |
ohm-models:// |
local model weights | the models folder |
ohm-file:// |
a project's documents, read-only | the scripts folder |
Each handler resolves the request against its root and refuses anything that escapes it.