Skip to content

Instantly share code, notes, and snippets.

@pierdom
Last active August 17, 2022 03:16
Show Gist options
  • Select an option

  • Save pierdom/7ed7fdbb24cf839d19800137fc6784c5 to your computer and use it in GitHub Desktop.

Select an option

Save pierdom/7ed7fdbb24cf839d19800137fc6784c5 to your computer and use it in GitHub Desktop.

Revisions

  1. pierdom revised this gist Feb 13, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion synology_syncthing_certificate.md
    Original file line number Diff line number Diff line change
    @@ -29,4 +29,4 @@ We also need to change the owner and permissions for the new files:
    # chmod 600 https_key.pem
    ```

    That's it. Now restart Syncthing and its web guy (reachable at port `8384`) will have the right certificate
    That's it. Now restart Syncthing and its web gui (reachable at port `8384`) will have the right certificate
  2. pierdom revised this gist Jun 13, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion synology_syncthing_certificate.md
    Original file line number Diff line number Diff line change
    @@ -29,4 +29,4 @@ We also need to change the owner and permissions for the new files:
    # chmod 600 https_key.pem
    ```

    That's it. Now restart Syncthing and its web guy (reachable at `nas_ip:8384`) will have the right certificate
    That's it. Now restart Syncthing and its web guy (reachable at port `8384`) will have the right certificate
  3. pierdom renamed this gist Jun 13, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion howto.md → synology_syncthing_certificate.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    This how-to has been tested using a Synology DS214play nas with DSM 6.0 and Syncthing
    This how-to has been tested using a Synology DS214play nas with DSM 6.X and Syncthing v1.1.4.

    Default Synology certificate and private key (e.g., released by Let's Encrypt) at this path:
    `/usr/syno/etc/certificate/system/default/{cert.pem|privkey.pem}`.
  4. pierdom created this gist Jun 13, 2019.
    32 changes: 32 additions & 0 deletions howto.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    This how-to has been tested using a Synology DS214play nas with DSM 6.0 and Syncthing

    Default Synology certificate and private key (e.g., released by Let's Encrypt) at this path:
    `/usr/syno/etc/certificate/system/default/{cert.pem|privkey.pem}`.

    After installing Syncthing using synocommunity.com repository, its self-signed certificate will be at this path:
    `/volume1/@appstore/syncthing/var/`. This directory contains the priv-pub key to identify the device (`cert.pem` and `key.pem`) and the certificate and private key for the web interface (`https_cert.pem` and `https_key.pem`). We need to replace these last two with the Synology's ones.

    Backup Syncthing certificate:
    ```bash
    $ sudo su
    # cd /volume1/\@appstore/syncthing/var/
    # mv https_cert.pem https_cert.pem.bk
    # mv https_key.pem https_key.pem.bk
    ```

    Now let's copy Synology's certificate here:
    ```bash
    # cp /usr/syno/etc/certificate/system/default/cert.pem /volume1/\@appstore/syncthing/var/https_cert.pem
    # cp /usr/syno/etc/certificate/system/default/key.pem /volume1/\@appstore/syncthing/var/https_key.pem
    ```

    We also need to change the owner and permissions for the new files:
    ```bash
    # cd /volume1/\@appstore/syncthing/var/
    # chown sc-syncthing:syncthing https_cert.pem
    # chown sc-syncthing:syncthing https_key.pem
    # chmod 640 https_cert.pem
    # chmod 600 https_key.pem
    ```

    That's it. Now restart Syncthing and its web guy (reachable at `nas_ip:8384`) will have the right certificate