Posh-acme 3.11 renewal issues

Hi,
First of all, thank you for your great work !!!
I generated happily my new Let’s encrypt certificates by Azure automation account runbook using POSH-ACME 3.11 module.
I am now testing the renewal, but I am having issues using submit-renewal with the account.
Background:
I generated a new test ssl cert for poshtesttovault2.thamescloud-dev.net , 2 days ago by and I was trying to renew the specific ssl by :

But I am having issues.

My domain is: poshtesttovault2.thamescloud-dev.net

I ran this command:

Set-PAServer LE_STAGE
Set-PAAccount -ID 11852757(the account I have on the generation output at the time of the creation)
Set-PAOrder -MainDomain poshtesttovault2.thamescloud-dev.net
Submit-Renewal -MainDomain poshtesttovault2.thamescloud-dev.net -Force

It produced this output:

Failed
No ACME account configured. Run Set-PAAccount or New-PAAccount first. (No ACME account configured. Run Set-PAAccount or New-PAAccount first.)
Logging in to Azure…

Specified account id (11852757) not found. Nothing to update.

My web server is (include version): Azure Webapp

The operating system my web server runs on is (include version): Azure Cloud

My hosting provider, if applicable, is: Azure

I can login to a root shell on my machine (yes or no, or I don’t know): no machine

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no

The version of my client is: Posh-ACME 3.11

1 Like

@rmbolger Do you think you could give @ele some help with this thread? Thanks!

1 Like

I think the issue may be specific to Azure Automation. If memory serves, the config in %LOCALAPPDATA% isn’t saved between instances. So you’re effectively starting from scratch each time and your existing account info doesn’t exist unless you specifically backed it up somewhere or used an alternate config location by setting the POSHACME_HOME environment variable. Let me see if I can confirm that though.

3 Likes

Unfortunately, I’m not terribly familiar with how Azure Automation works and I can’t find any concrete docs that indicate the local config is wiped between invocations of a workflow. But it makes sense if the code can’t find the previous account details.

I did find a couple articles that might be helpful though. The first one is more about using Azure DevOps than Automation, but talks about storing the config in Blob storage.

The second one is specific to Azure Automation, but appears to use a strategy of just creating everything from scratch each time.

2 Likes

Hi rmbolger,
Thank you for your help!
So, I would be more than happy to store the config location to poshacme_home environment variable if it solves the issue, I need to investigate further this path for Azure Automation.

3 Likes

Yeah, basically you can set POSHACME_HOME to some other filesystem location before the module is imported and it will create the local config files there instead of the default location in AppData\Local. But I’m not sure where to suggest saving it on Azure Automation. It sounds like there may not actually be a persistent filesystem location at all between invocations. Something like Blob storage may be your only choice.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.