Skip to content
Back

[Bug] Renewing SSL certificate is not automatic anymore

  • 1
  • Self Hosted
  • General
iStornZ
27 Jan, 2025, 22:49

Hello all, It will be the second time I need to renew my SSL certificate manually. I don't understand why It's not done automatically. Here is how I proceed to renew it:

  • Connect over SSH
  • Run the command docker compose exec appwrite ssl
  • Restart my server docker compose down && docker compose up -d

Here is the logs of the command docker compose logs appwrite-worker-certificates

TypeScript
appwrite-worker-certificates  | [Worker] Worker 0 is ready!
appwrite-worker-certificates  | Worker certificates  started
appwrite-worker-certificates  | [Job] Received Job (67980bccddbdb6.60828320).
appwrite-worker-certificates  | Cannot renew domain (my.app.com) on attempt no. 3 certificate: Renew isn't required.
appwrite-worker-certificates  | [Job] (67980bccddbdb6.60828320) failed to run.
appwrite-worker-certificates  | [Job] (67980bccddbdb6.60828320) Renew isn't required.
appwrite-worker-certificates  | Using deprecated logging configuration. Please update your configuration to use DSN format.Unable to parse DSN: scheme is required
appwrite-worker-certificates  | [Error] Type: Exception
appwrite-worker-certificates  | [Error] Message: Renew isn't required.
appwrite-worker-certificates  | [Error] File: /usr/src/code/src/Appwrite/Platform/Workers/Certificates.php
appwrite-worker-certificates  | [Error] Line: 152

So my question is why the renew is not done automatically and I need to wait to the expiration date to renew it? Thanks :appwritepeepo:

TL;DR
Renewing SSL certificate is not automatic anymore. The SSL certificate was renewed manually. Logs show the maintenance task not detecting the certificate expiration. Specified app properties and versions seem correct. The user doesn't have a custom domain registered. No specific solution provided in the thread.
iStornZ
29 Jan, 2025, 06:20

Hello, any news about it? Thanks ๐Ÿ™

iStornZ
31 Jan, 2025, 14:46

Bump :appwriteupvote:

D5
31 Jan, 2025, 15:08

Renew should be done automatically as far as I know

iStornZ
31 Jan, 2025, 15:08

Thanks for your answer, but it's not working anymore and I don't know why, do you have any clues?

D5
31 Jan, 2025, 15:10

Do you have cloudflare in front or something similar?

D5
31 Jan, 2025, 15:12

I think that error is thrown because the certificate is valid

Akari(เท†ห™แต•ห™เท†)โ™ก
31 Jan, 2025, 15:14

I think ssl still valid on the error log or there is wrong config in DNS

iStornZ
31 Jan, 2025, 15:19

No, nothing like that

iStornZ
31 Jan, 2025, 15:20

Yes, when I manually run the command ssl it will detect that the SSL certificate is still valid (normal).

But this is the second time my server got an SSL invalid and I need manually to trigger the ssl command to update it

D5
31 Jan, 2025, 15:28

And that's the error you get?

D5
31 Jan, 2025, 15:28

If it happens again, send the logs before triggering the renew command

iStornZ
31 Jan, 2025, 15:50

Yeah exactly!

iStornZ
27 Apr, 2025, 09:51

@D5

Okay so 3 months later, my SSL certificate is about to expire again, as you can see, it expire today in a few hours :/ (janvier -> january, avril -> april) So it seems the SSL regeneration was not working at all I will need to trigger it manually.

Do you have some clues to debug this before I did it manually? Thanks in advance!

Here is the logs of docker compose logs appwrite-worker-certificates

TypeScript
appwrite-worker-certificates  | [Worker] Worker 0 is ready!
appwrite-worker-certificates  | Worker certificates  started
appwrite-worker-certificates  | [Worker] Worker 0 is ready!
appwrite-worker-certificates  | Worker certificates  started
D5
27 Apr, 2025, 09:59

Interesting. This certificate is behind cloudflare or something similar?

D5
27 Apr, 2025, 10:00

Also, is the domain env variable set to this domain? Or it's from a function, etc?

iStornZ
27 Apr, 2025, 10:06

Always upgraded like recommended (1.2.X->1.3.X->...)

iStornZ
27 Apr, 2025, 10:13

I also have theses props like mentionned here: https://appwrite.io/docs/advanced/self-hosting/tls-certificates

TypeScript
_APP_ENV=production
_APP_SYSTEM_SECURITY_EMAIL_ADDRESS=email@gmail.com
iStornZ
27 Apr, 2025, 11:18

Pinging @Steven too as he helped me on a SSL subject too (https://discord.com/channels/564160730845151244/1130897145147445340)

Thanks for the help guys ๐Ÿ˜‡๐Ÿ‘

iStornZ
27 Apr, 2025, 11:48

New details about the issue @D5

Here is the log of the command : docker compose logs appwrite-task-maintenance

TypeScript
appwrite-task-maintenance  | Found 1 projects 0.012397050857544 seconds
appwrite-task-maintenance  | [2025-04-24 09:42:00.387] No certificates for renewal.
appwrite-task-maintenance  | [2025-04-25 09:42:00.390] Notifying workers with maintenance tasks every 86400 seconds
appwrite-task-maintenance  | Found 1 projects 0.015981912612915 seconds
appwrite-task-maintenance  | [2025-04-25 09:42:00.406] No certificates for renewal.
appwrite-task-maintenance  | [2025-04-26 09:42:00.411] Notifying workers with maintenance tasks every 86400 seconds
appwrite-task-maintenance  | Found 1 projects 0.018476963043213 seconds
appwrite-task-maintenance  | [2025-04-26 09:42:00.430] No certificates for renewal.
appwrite-task-maintenance  | [2025-04-27 09:42:00.434] Notifying workers with maintenance tasks every 86400 seconds
appwrite-task-maintenance  | Found 1 projects 0.015896081924438 seconds
appwrite-task-maintenance  | [2025-04-27 09:42:00.450] No certificates for renewal.

So Appwrite think there is no necessicity to renew the SSL certificate?? It seems there is a problem checking but not trigerring the maintenance task

iStornZ
27 Apr, 2025, 13:47

EDIT:

So I executed manually docker compose exec appwrite ssl because I'm running out of time and don"t want my server to be KO ๐Ÿ˜†

Here is the result of the command: Scheduling a job to issue a TLS certificate for domain: api.radion-app.com so it seems to be correct, with correct domain name.

Doing docker compose logs appwrite-worker-certificates Return me :

TypeScript
appwrite-worker-certificates  | [Worker] Worker 0 is ready!
appwrite-worker-certificates  | Worker certificates  started
appwrite-worker-certificates  | [Worker] Worker 0 is ready!
appwrite-worker-certificates  | Worker certificates  started
appwrite-worker-certificates  | [Job] Received Job (680e3429d595a8.40285442).
appwrite-worker-certificates  | [Job] (680e3429d595a8.40285442) successfully run.

And the certificate is now valid until July.

So my guess is there are an issue (a bug?) inside the appwrite-task-maintenance which do not detect the certificate which is near to expire. What do you think guys @Steven @D5 ?

Thanks ๐Ÿ™‚

D5
27 Apr, 2025, 13:48

Hmm maybe, maybe it's a database issue too ๐Ÿค”

iStornZ
27 Apr, 2025, 13:48

Maybe but what is the relation between the certificate and the database?

iStornZ
27 Apr, 2025, 13:59

I created an issue on Github here: https://github.com/appwrite/appwrite/issues/9694

iStornZ
27 Apr, 2025, 14:00

[Bug] Renewing SSL certificate is not automatic anymore

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more