Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds instructions for enabling cloud sync #7

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions contrib/sync/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Enabling cloud sync with cryptodaemon

Warning: files are only encrypted on the local device and at rest on the
reMarkable Cloud. If you wish to use cloud sync with cryptodaemon, then ennsure
this suits your use case and threat model.

## Setup

* Ensure `xochitl.service` and `sync.service` are masked.
* Copy `sync-crypto.service` to `/etc/systemd/system`.
* e.g. `scp contrib/sync/sync-crypto.service [email protected]:/etc/systemd/system/`
* Add `Wants=sync-crypto.service` to `/etc/systemd/system/cryptodaemon.service`
* `systemctl daemon-reload`
* `systemctl enable sync-crypto --now`
26 changes: 26 additions & 0 deletions contrib/sync/sync-crypto.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Same as the upstream sync.service unit, except we change the After, BindsTo
# and PartOf directives

[Unit]
Description=reMarkable Document Sync
After=dbus.socket
StartLimitIntervalSec=60
StartLimitBurst=4
After=cryptodaemon.service
BindsTo=cryptodaemon.service
PartOf=cryptodaemon.service

[Service]
# Do NOT make this dbus, until we review the crash handling, as disassociating
# from this busname will result in systemd killing sync for Type=dbus (by design)
# Type=dbus
Type=simple
BusName=no.remarkable.sync
ExecStart=/usr/bin/sync --service
Restart=on-failure
# No matter the signal, we want it to restart (all of these kill sync, but are
# considered a "successful" termination (without restart) by systemd otherwise).
RestartForceExitStatus=SIGHUP SIGINT SIGTERM SIGPIPE

[Install]
WantedBy=multi-user.target