Jump to content
XPEnology Community

Tutorial: Let's Encrypt certificates on DSM 6.1.X (change API from v01 to v02)


jensmander

Recommended Posts

Since Let's Encrypt changed their API from v01 to v02 it isn't possible to request certificates when using DSM 6.1.X.

 

Workaround: exchange the syno-letsencrypt module with a version from a DSM 6.2.X release.

 

Preparations:

 

 

  1. After you have downloaded the file mentioned open a SSH connection to your NAS
  2. Backup your current syno-letsencrypt module by
     
    sudo cp /usr/syno/sbin/syno-letsencrypt usr/syno/sbin/syno-letsencrypt.bak

     
  3. Copy the new syno-letsencrypt from your shared folder (for example: volume1/Downloads) to the sbin folder:
     
    sudo cp /volume1/Downloads/syno-letsencrypt /usr/syno/sbin/

     
  4. Modify the file to execute it:
     
    sudo chmod 755 /usr/syno/sbin/syno-letsencrypt
  5. Open the letsencrypt.default with vi and modify it:
     
    sudo vi /usr/syno/etc.defaults/letsencrypt/letsencrypt.default
  6. Search for the string "https://acme-v01.api.letsencrypt.org/directory"
     
  7. Press "i" and change the 01 to 02 in this string (should be "https://acme-v02.api.letsencrypt.org/directory")
     
  8. To save and exit, press ESC, type :wq (ENTER)
     
  9. Reboot your NAS and Let's Encrypt should work again
  • Like 2
  • Thanks 1
Link to comment
Share on other sites

  • jensmander changed the title to Tutorial: Let's Encrypt certificates on DSM 6.1.X (change API from v01 to v02)
  • 3 months later...
On 12/22/2020 at 8:04 AM, jensmander said:

Since Let's Encrypt changed their API from v01 to v02 it isn't possible to request certificates when using DSM 6.1.X.

 

Workaround: exchange the syno-letsencrypt module with a version from a DSM 6.2.X release.

 

Preparations:

 

 

  1. After you have downloaded the file mentioned open a SSH connection to your NAS
  2. Backup your current syno-letsencrypt module by
     
    
    sudo cp /usr/syno/sbin/syno-letsencrypt usr/syno/sbin/syno-letsencrypt.bak

     
  3. Copy the new syno-letsencrypt from your shared folder (for example: volume1/Downloads) to the sbin folder:
     
    
    sudo cp /volume1/Downloads/syno-letsencrypt /usr/syno/sbin/

     
  4. Modify the file to execute it:
     
    
    sudo chmod 755 /usr/syno/sbin/syno-letsencrypt
  5. Open the letsencrypt.default with vi and modify it:
     
    
    sudo vi /usr/syno/etc.defaults/letsencrypt/letsencrypt.default
  6. Search for the string "https://acme-v01.api.letsencrypt.org/directory"
     
  7. Press "i" and change the 01 to 02 in this string (should be "https://acme-v02.api.letsencrypt.org/directory")
     
  8. To save and exit, press ESC, type :wq (ENTER)
     
  9. Reboot your NAS and Let's Encrypt should work again

 

Followed steps 1 to 9 from op, but still get "The operation failed. Please log in to DSM again and retry".

 

I am not fluent in SSH at all, so I have no clue what is supposed to return after entering each line from step 1 to 9 to the SSH console.

But I suspect something went wrong at Step 3 for me.

 

I extracted the linked "syno-letsencrypt.zip" with winRAR, uploaded the file to my xpenology's shared folder called "Work".

The saved location displayed in Properties is "/volume1/Work/" and the extracted file became an empty folder once uploaded to my "Work" shared folder.

I typed in the commend line as instructed in Step 3 with "Downloads" replaced by "Work" which is my shared folder. "sudo cp /volume1/Work/syno-letsencrypt /usr/syno/sbin/"

Then the console return with the line: Password: which i entered my DSM password

Then the a line returned: cp: omitting directory '/volume1/Work/syno-letsencrypt'

 

I carried on with step 4 to 9, and as mentioned gets "The operation failed. Please log in to DSM again and retry".

 

I am not sure if the file inside syno-letsencrypt.zip actually get copied to my shared folder as it turned to an empty folder without any file size.

Then I also not sure if the file did copied to /usr/syno/sbin with the omitting directory prompt.

 

Can someone please help? thanks so much

Link to comment
Share on other sites

  • 1 year later...
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...