Sync Troubleshooting
July 30, 2026 · View on GitHub
Common issues, error messages, and fixes for Mnemosyne Sync.
Connection errors
"Connection refused" or timeout
requests.exceptions.ConnectionError: Connection refused
Cause: The sync server isn't running, the port is wrong, or a firewall is blocking it.
Fix:
- Verify the server is running on the VPS:
ps aux | grep sync-serve - Check the port:
ss -tlnp | grep 8765 - Test locally on the VPS:
curl http://localhost:8765/sync/status - Check firewall:
ufw allow 8765orfirewall-cmd --add-port=8765/tcp - If behind a proxy, test the proxy:
curl https://memory.example.com/sync/status
Authentication failures
"401 Unauthorized"
HTTP 401 on /sync/pull: {"error": "Unauthorized"}
Cause: Missing or incorrect API key.
Fix:
- Verify the env var is set:
echo $MNEMOSYNE_SYNC_TOKEN - Match the key exactly to the server's:
mnemosyne sync-serve --api-key "*** - Check for trailing whitespace:
echo $MNEMOSYNE_SYNC_TOKEN | wc -c - Ensure the Authorization header is sent: add
--api-key "***if env var is missing
JWT issues
Invalid JWT: signature verification failed
Cause: The JWT secret doesn't match, or the token is expired.
Fix:
- Use the same
--jwt-secreton both server and client - Regenerate the token if it expired
- Fall back to API key auth as a simpler alternative
TLS / HTTPS issues
"SSL certificate verify failed"
SSLCertVerificationError: certificate verify failed
Cause: The server's TLS certificate is self-signed, expired, or the domain doesn't match.
Fix:
- Production: Use a real certificate. Caddy provisions Let's Encrypt automatically. For Nginx, use certbot.
- Self-signed or private CA: Export the CA certificate and point
SSL_CERT_FILEat it. This is the supported way to trust a non-public certificate, and it applies to both the sync client and the embedding API client.
export SSL_CERT_FILE=/path/to/ca-cert.pem
# requests-based paths also honour REQUESTS_CA_BUNDLE
export REQUESTS_CA_BUNDLE=/path/to/ca-cert.pem
mnemosyne sync --db-path /path/to/surface.db --remote https://192.168.1.50:8765
- Plain HTTP on a trusted network: use an
http://remote URL rather thanhttps://. There is no flag that disables certificate verification on an HTTPS connection; if you were looking for--insecure, it does not exist.
Encryption issues
"No module named 'cryptography'" / "No module named 'nacl'"
ImportError: SyncEncryption requires 'cryptography>=41.0'
Cause: The [sync] extras weren't installed.
Fix:
pip install "mnemosyne-memory[sync]"
Encrypted payload errors on the server
Failed to apply event abc123: Expecting value: line 1 column 1 (char 0)
Cause: The server received encrypted ciphertext but has no key to decrypt it. This is expected behavior when the local client uses --encrypt but the server doesn't have a key.
Fix: Nothing to fix — the server correctly stores the opaque ciphertext. The server should not have the encryption key. Only the client that created the event can decrypt it.
"Decryption failed" on pull
Cause: Encryption key mismatch between the device that pushed and the device that pulled.
Fix:
- Verify both devices use the same
MNEMOSYNE_SYNC_KEY - If using passphrases, verify the passphrase is identical
- Keys are not recoverable — if you lose the key, previously encrypted data is unreadable
Sync hangs or is slow
Initial sync takes a long time
Cause: First sync transfers all memories, not just changes.
Fix:
- Use
--mode pushfor the first sync if you have many memories - Subsequent syncs are delta-only and should be fast
- Check network latency:
ping your-vps - If you have >100K memories, increase the limit in the sync server
"Sync appears stuck"
Cause: Often a network timeout, or the server is processing a large batch.
Fix:
- Wait up to 30 seconds (default timeout)
- Check server logs on the VPS
- Restart with
--intervalinstead of one-shot to see progress per cycle - Reduce batch size by syncing fewer memories at once
Conflict resolution issues
"Duplicate memories" after sync
Cause: Two devices created the same memory independently, and both events arrived.
Fix: This is expected and handled. Mnemosyne resolves conflicts automatically:
- Version chain wins (if one event is a parent of another)
- Latest timestamp wins
- Higher importance wins
- Deterministic device_id tiebreaker
Check resolved conflicts:
mnemosyne sync-status --remote https://memory.example.com --json | jq '.remote_status.pull.conflicts'
Overriding conflict resolution
If the automatic resolution picks the wrong version, you can manually fix:
# Find the conflicting memory
mnemosyne recall "disputed topic" --json
# Update it with the correct content
mnemosyne update <memory_id> "Correct content" 0.9
Server issues
"Address already in use"
OSError: [Errno 98] Address already in use
Cause: Another process is already using port 8765.
Fix:
# Find the process
ss -tlnp | grep 8765
# Kill it
kill -9 <pid>
# Or use a different port
mnemosyne sync-serve --port 8766
Server doesn't start
Cause: Missing Mnemosyne install, wrong Python version, or permission issue.
Fix:
- Verify Mnemosyne is installed:
mnemosyne --help - Check Python version:
python3 --version(needs 3.9+) - Check the data directory exists and is writable:
ls -la ~/.hermes/mnemosyne/data/ - Start with verbose logging for debugging:
python3 -c "
import logging
logging.basicConfig(level=logging.DEBUG)
from mnemosyne.core.sync_server import run_sync_server
run_sync_server(port=8765)
"
Export/import issues
"Import failed: Unknown schema version"
Cause: The export file was created with --include-sync-events and the import doesn't support v1.2 schema.
Fix: Upgrade to Mnemosyne v3.7.0 or later:
pip install --upgrade mnemosyne-memory
Re-import produces data but no new memories
Cause: Events were already present (event_hash deduplication).
Fix: This is correct behavior. The import is idempotent. Duplicate events are silently skipped.
Still stuck?
- Check the Sync Protocol Reference for full CLI reference
- Read the Security Model for encryption internals
- Open an issue: github.com/AxDSan/mnemosyne/issues
- Ask in Discord: the
#mnemosynechannel