Repository navigation
Dev mode
Syncloud is open source. A device keeps running, with all its apps and data, whether or not there is a subscription.
What the subscription provides is everything around the device:
- the name,
[name].syncloud.itor your own domain managed by Syncloud - automatic updates of that name when your IP address changes
- the HTTPS certificate and its renewal
- the relay, for networks where the device cannot be reached directly
- the mail relay
- mail support
When a subscription ends the name is removed, so the device can no longer be opened by its address, the certificate is not renewed, and both relays stop. Nothing on the device is deleted.
Dev mode is doing those things yourself. It is for people who know what they are doing: it is manual, it has to be repeated, it is not covered by support, and these instructions can change without warning. Questions go to the forum.
- A domain name you own, with DNS records you can edit.
example.comis used below. - A public IP address and a port mapping for 443 on your router, see External Access. Without the relay there is no other way in.
- SSH access to the device.
- A tool that can get a wildcard certificate with a DNS challenge at your DNS provider, such as certbot or acme.sh, on any computer.
Take a backup first.
Create two records at your DNS provider, both with your public IP address:
example.com A [public IP]
*.example.com A [public IP]
The device prints the address it sees for itself:
snap run platform.cli ipv4 public
Add AAAA records the same way if you use IPv6. Whenever your provider changes your address, these records have to be changed by hand.
Switch off Syncloud Relay in Settings - Access and Syncloud mail relay in Settings - Email. Neither works without a subscription.
snap run platform.cli config set platform.redirect_enabled false
snap run platform.cli config set platform.custom_domain example.com
snap run --hook=post-refresh platform
snap restart platform
Check what the device now thinks its name is:
snap run platform.cli config get platform.custom_domain
The device answers on https://example.com from this point, with a certificate it has signed itself, so browsers warn until step 5 is done.
Each app keeps its own copy of the address and has to be told it changed:
for app in $(snap list | awk 'NR>1 {print $1}'); do
snap run $app.access-change
done
Apps that have nothing to update print an error saying the command is not found. That is expected.
The device cannot get a certificate for your domain by itself in dev mode. It tries, fails, and signs one itself.
Get a certificate with your tool for these two names, in this order, so that example.com is the certificate's common name:
example.com
*.example.com
Copy it to the device as:
/var/snap/platform/current/syncloud.crt
/var/snap/platform/current/syncloud.key
syncloud.crt has to contain the full chain. Then:
systemctl restart snap.platform.nginx-public
for app in $(snap list | awk 'NR>1 {print $1}'); do
snap run $app.certificate-change
done
The device checks this certificate regularly and replaces it with a self-signed one, without asking, when either is true:
- its common name is not exactly
example.com - it has 30 days or less left
A Let's Encrypt certificate lasts 90 days, so this step has to be repeated at least every 60 days.
- Access from outside on a network without a public IP address.
- Mail delivery through the relay. Mail sent straight from a home address is usually treated as spam.
- A name that follows your IP address.
- A certificate that renews itself.
- Mail support.
Subscribe again within the time your account keeps its name, then:
snap run platform.cli config set platform.redirect_enabled true
snap run --hook=post-refresh platform
snap restart platform
and repeat step 4. The device gets its own certificate again within a few minutes.
If the name is already gone, subscribe and reactivate the device from Settings - Activation. That sets the device up again with a single user.