Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

hilmarp's avatar

SSL renew job not working

I set up Let's Encrypt on my server with Forge and created a scheduled job to renew the certificate (with the code I got when I set up SSL).

So the job should run monthly and looks like this: curl -X POST https://forge.laravel.com/api/servers/xxxx/sites/xxxx/ssl/renew?api_token=xxxxxxxxxxxxxxxx.

But when I check the log in the job it says: "502 Bad Gateway", so it's not working.

The certificate ran out for my site so I connected to the server with SSH and ran the same command and it worked fine, renewed the certificate.

Any idea why the scheduled job is not able to run it?

0 likes
5 replies
ejdelmonico's avatar

Did you use Forge's Let's Encrypt option? If so, forge runs the job on its own to renew the cert.

hilmarp's avatar

Yes, I let Forge set up Let's Encrypt. But it did ask me to put this command in a monthly scheduled job.

d3xt3r's avatar

"502 Bad Gateway"

May it was a coincidence, that either of the servers were down, when your script was ran.

hilmarp's avatar

Well it also happened last time when the certificate ran out, every 90 days. Maybe I'm just really unlucky...

sandervanhooft's avatar

No, I'm experiencing the same. Any clue anyone? Did I overlook to manually configure the scheduled command? If so, what should it be?

Please or to participate in this conversation.