The daemon runs two jobs automatically overnight so you don't have to think about it:
- 2:00am — harvest: reads your Claude Code sessions from today and extracts anything worth remembering into your memory file.
- 11:55pm — refresh: merges any notes you captured via the mobile endpoint during the day.
Pick your platform below. If you're setting up a Raspberry Pi to run this 24/7, jump straight to the Raspberry Pi section.
Open Terminal and run:
pip3 install 'memsync[daemon]'The quotes around memsync[daemon] are required on Mac — without them zsh (the default Mac shell) misreads the brackets.
If you get "command not found: pip3", try:
python3 -m pip install 'memsync[daemon]'memsync daemon statusYou should see something like:
Daemon is not running.
Web UI: enabled (port 5000)
Capture: enabled (port 5001)
Refresh: enabled (schedule: 55 23 * * *)
If you see "The daemon module is not installed", your Mac has multiple Python installations and pip installed into the wrong one. Find which Python runs memsync:
head -1 $(which memsync)This prints something like /opt/homebrew/opt/python@3.11/bin/python3.11. Use that Python to install:
/opt/homebrew/opt/python@3.11/bin/python3.11 -m pip install 'memsync[daemon]'Then run memsync daemon status again.
memsync daemon start --detachThis starts the daemon as a background process. It will run until you restart your Mac.
Confirm it started:
memsync daemon statusYou should now see "Daemon is running (PID xxxxx)."
If you want the daemon to start automatically every time you log in without doing anything:
memsync daemon installThis registers the daemon with macOS's launchd service manager. It will start at login and restart itself if it crashes.
After installing, you must add your API key. The launchd service doesn't inherit your terminal's environment variables, so you need to add it to the service configuration manually.
Open the service config file:
open -e ~/Library/LaunchAgents/com.memsync.daemon.plistFind this section in the file:
<key>RunAtLoad</key>
<true/>Add the following lines directly above that section:
<key>EnvironmentVariables</key>
<dict>
<key>ANTHROPIC_API_KEY</key>
<string>sk-ant-YOUR-KEY-HERE</string>
</dict>Replace sk-ant-YOUR-KEY-HERE with your actual API key. Save the file.
Then reload the service to pick up the change:
launchctl unload ~/Library/LaunchAgents/com.memsync.daemon.plist
launchctl load ~/Library/LaunchAgents/com.memsync.daemon.plistCheck it's running:
memsync daemon statusmemsync daemon scheduleYou should see the harvest and refresh jobs listed.
memsync daemon stop # if started with --detach
memsync daemon uninstall # if installed with daemon installOpen PowerShell and run:
pip install memsync[daemon]PowerShell handles the brackets fine — no quotes needed.
If you get "command not found", try:
python -m pip install memsync[daemon]The scheduled task runs in the background without access to your PowerShell profile, so the API key needs to be set at the system level.
- Press
Win + R, typesysdm.cpl, press Enter - Click the Advanced tab
- Click Environment Variables
- Under User variables (top half), click New
- Variable name:
ANTHROPIC_API_KEY - Variable value: your key starting with
sk-ant-... - Click OK on all dialogs
Close and reopen PowerShell for the change to take effect. Verify it worked:
echo $env:ANTHROPIC_API_KEYYou should see your key printed back.
memsync daemon start --detach
memsync daemon statusYou should see "Daemon is running (PID xxxxx)." Stop it for now — you'll run it via Task Scheduler instead:
memsync daemon stopTask Scheduler is Windows's built-in tool for running programs on a schedule or at login.
-
Press
Win + R, typetaskschd.msc, press Enter. Task Scheduler opens. -
In the right panel, click Create Basic Task...
-
Name:
memsync daemonDescription:Start memsync daemon at loginClick Next. -
Trigger: Select When I log on. Click Next.
-
Action: Select Start a program. Click Next.
-
Program/script: Type
memsyncAdd arguments:daemon startLeave "Start in" blank. Click Next. -
Check Open the Properties dialog at the bottom. Click Finish.
-
In the Properties dialog that opens:
- Click the General tab
- Check Run with highest privileges
- Click OK
The daemon will now start automatically every time you log into Windows.
Log out and back in (or restart). Then open PowerShell:
memsync daemon statusYou should see "Daemon is running."
memsync daemon stopTo remove the scheduled task: open Task Scheduler, find "memsync daemon" in the list, right-click → Delete.
pip3 install 'memsync[daemon]'sudo memsync daemon installThis creates a systemd unit file and enables it to start on boot.
The service won't have your API key yet. Add it via a systemd override (this survives package updates):
sudo systemctl edit memsyncAn editor opens. Add these lines exactly:
[Service]
Environment=ANTHROPIC_API_KEY=sk-ant-YOUR-KEY-HEREReplace sk-ant-YOUR-KEY-HERE with your actual key. Save and close the editor.
Restart the service to pick up the change:
sudo systemctl restart memsync
sudo systemctl status memsyncThe status output should show active (running).
The scheduled jobs run at 2am and 11:55pm local time. Make sure your system timezone is correct:
timedatectl # check current timezone
sudo timedatectl set-timezone America/New_York # set if wrongCommon timezone strings: America/Los_Angeles, America/Chicago, America/New_York, Europe/London, Europe/Berlin.
memsync daemon schedule # shows scheduled jobs
memsync daemon status # shows running statussudo memsync daemon uninstall # removes systemd serviceThe Pi is the ideal machine to run the memsync daemon — it's always on, uses minimal power (about $1/month in electricity), and handles the nightly jobs even when your laptop is closed.
What the Pi can and can't do:
The Pi runs the memory refresh job (11:55pm) perfectly — it reads session notes from your cloud sync folder. The harvest job (2am) won't find anything on the Pi because Claude Code session files live on your Mac/Windows machine locally. That's fine — just run memsync harvest manually on your main machine after important sessions, and the Pi handles everything else.
- Raspberry Pi 3B+ or newer (3B+ works, Pi 4 is faster)
- Raspberry Pi OS Lite (no desktop needed — lighter and faster)
- A way to access your cloud sync folder from the Pi (instructions below)
- Python 3.11+ — comes automatically with Raspberry Pi OS Bookworm (released 2023) and later
SSH into your Pi and run:
python3 --versionIf it shows 3.11 or higher, skip to Step 2.
If it shows anything lower, update:
sudo apt update && sudo apt install -y python3.11 python3.11-pippip3 install 'memsync[daemon]' --break-system-packagesThe --break-system-packages flag is needed on newer Raspberry Pi OS versions. It's safe to use here.
The Pi needs to be able to read and write your GLOBAL_MEMORY.md file. Choose one of these three approaches:
rclone lets the Pi talk to cloud storage directly without going through another machine.
# Install rclone
curl https://rclone.org/install.sh | sudo bash
# Set up your cloud provider (follow the prompts)
rclone configWhen it asks for a provider, choose:
- Microsoft OneDrive for OneDrive
- Google Drive for Google Drive
The setup will ask you to open a link in a browser and sign in. Do this on your regular computer, then paste the confirmation code back into the Pi terminal.
Test that it works:
rclone ls onedrive:.claude-memory/You should see your GLOBAL_MEMORY.md listed.
Now mount the folder so memsync can access it like a regular folder:
mkdir -p ~/OneDrive
rclone mount onedrive: ~/OneDrive --daemon --vfs-cache-mode fullMake it mount automatically on boot by adding to /etc/rc.local. Open the file:
sudo nano /etc/rc.localAdd this line before exit 0:
sudo -u pi rclone mount onedrive: /home/pi/OneDrive --daemon --vfs-cache-mode fullSave with Ctrl+X, then Y, then Enter.
This copies the memory folder from your main machine to the Pi every 15 minutes.
On the Pi, open the crontab editor:
crontab -eAdd this line (replace your-mac.local and the path with your actual machine name and path):
*/15 * * * * rsync -az your-mac.local:/Users/yourname/OneDrive/.claude-memory/ ~/claude-memory/Then tell memsync to use this local copy:
memsync config set sync_root ~/claude-memory
memsync config set provider customIf you're comfortable with networking, this gives real-time access. Share the OneDrive folder from your Mac over NFS and mount it on the Pi. Instructions vary by router/setup — search "macOS NFS share Raspberry Pi" for your specific setup.
export ANTHROPIC_API_KEY="sk-ant-your-key-here"Make it persist across reboots:
echo 'export ANTHROPIC_API_KEY="sk-ant-your-key-here"' >> ~/.bashrc
source ~/.bashrcmemsync initIt should detect your cloud folder. If it can't find it automatically:
memsync init --sync-root ~/OneDrive # or ~/claude-memory if using rsyncCheck everything looks right:
memsync statusEvery line should show a ✓. If anything shows ✗, see the Troubleshooting section.
sudo memsync daemon installThis registers memsync as a systemd service that starts automatically when the Pi boots.
Now add your API key to the service (systemd doesn't inherit your shell's variables):
sudo systemctl edit memsyncAn editor opens. Type these lines exactly:
[Service]
Environment=ANTHROPIC_API_KEY=sk-ant-your-key-hereReplace the key with your actual key. Save with Ctrl+X, Y, Enter.
Restart the service:
sudo systemctl restart memsync
sudo systemctl status memsyncYou should see active (running) in green. If it's red, see Troubleshooting.
The jobs run at 2am and 11:55pm. Make sure the Pi's clock is in your timezone:
timedatectlIf the timezone is wrong:
sudo timedatectl set-timezone America/Los_AngelesCommon options: America/Los_Angeles, America/New_York, America/Chicago, Europe/London
Do a quick test to make sure memsync can actually update the memory file from the Pi:
memsync refresh --notes "Pi daemon setup complete — testing end-to-end"
memsync show | head -10If show displays your memory file, the whole chain is working: Pi → rclone → OneDrive → memory file.
Check what's scheduled:
memsync daemon scheduleYou should see the harvest and refresh jobs listed.
The web UI is already running — you just need to open a browser on any device on your home network and go to:
http://raspberrypi.local:5000
If that doesn't work, find your Pi's IP address:
hostname -IThen use http://192.168.x.x:5000 (whatever IP it shows).
This lets you send a quick note to memsync from your phone with one tap.
On iPhone, create a Shortcut:
- Open the Shortcuts app → tap the + to create a new shortcut
- Tap Add Action → search for "Get Contents of URL" → tap it
- Tap the URL field and type:
http://raspberrypi.local:5001/note - Tap Show More → set Method to POST
- Set Request Body to JSON
- Add a key
textwith value set to a Shortcut Input variable - Add a "Text" action at the very beginning of the shortcut so you can type your note
Add it to your home screen. One tap → type what you want to remember → it gets added to tonight's session log.
If you want to require a password (recommended if your home network has guests):
memsync config set capture_token your-secret-word
sudo systemctl restart memsyncThen add a header to the Shortcut: X-Memsync-Token: your-secret-word
memsync daemon status # is it running? what's enabled?
memsync daemon schedule # what jobs are scheduled?On Linux and Pi, check detailed logs:
sudo journalctl -u memsync -f # live log output
sudo journalctl -u memsync --no-pager | tail -50 # last 50 linesOn Mac (launchd):
cat ~/Library/Logs/memsync/memsync-daemon.log
cat ~/Library/Logs/memsync/memsync-daemon.errmemsync is running under a different Python than where you installed the daemon extras. Find the right one:
head -1 $(which memsync)
# Returns something like: /opt/homebrew/opt/python@3.11/bin/python3.11Use that Python to install:
/opt/homebrew/opt/python@3.11/bin/python3.11 -m pip install 'memsync[daemon]'sudo journalctl -u memsync --no-pager | tail -30Most common cause: ANTHROPIC_API_KEY not set in the systemd override. Go back to Step 6 and add it.
The web UI is probably only listening on localhost. Fix it:
memsync config set web_ui_host 0.0.0.0
sudo systemctl restart memsync # Linux/PiThen try http://raspberrypi.local:5000 again.
memsync config set web_ui_port 5050
memsync config set capture_port 5051
sudo systemctl restart memsyncrclone ls onedrive:.claude-memory/If this returns an error, your rclone token has expired. Reconnect:
rclone config reconnect onedrive:This is expected — Claude Code session files (~/.claude/projects/) only exist on machines where you run Claude Code interactively. The Pi won't find any because you don't use Claude Code on the Pi.
Just run memsync harvest on your Mac or Windows machine after sessions you care about. The Pi handles the nightly refresh (notes from mobile capture) automatically.
This is expected — Windows service install isn't supported yet. Use Task Scheduler instead (see the Windows section above).
Next run: (pending — start daemon)
This is normal when running memsync daemon schedule separately — it creates a fresh instance to list jobs, which haven't started yet in that instance. The actual running daemon has them fully scheduled. Check with memsync daemon status to confirm the daemon is running.