mindreframer

mindreframer

Hex.pm Certificate expired Jul. 31 2025

I hope somebody is aware of it.

Marked As Solved

wojtekmach

wojtekmach

Hex Core Team

Hey everyone, certs have been renewed.

Also Liked

ericmj

ericmj

Elixir Core Team

We have posted an incident report that explains why the incident happened and what we are working on to prevent it in the future: 2025 07 30 hex outage | Hex.

arcanemachine

arcanemachine

You inspired me to cobble something together (it’s in Bash, sorry).

It’s a script that checks the certificate expiration date for a bunch of domains, then uses notify-send to send a notification for each domain that has a certificate that expires in 3 days or less. Then I made it run in a cronjob once per hour.

/home/user/scripts/network/cert-checker.sh

#!/bin/bash

# List of domains to check
DOMAINS="elixirforum.com erlangforums.com hex.pm hexdocs.pm"

# # Log file (optional, for debugging)
# LOG_FILE="/tmp/cert_check.log"

for domain in $DOMAINS; do
  exp_date=$(echo | openssl s_client -connect $domain:443 -servername $domain 2>/dev/null | openssl x509 -noout -enddate | cut -d= -f2)
  
  # Check if we got a valid date
  if [ -n "$exp_date" ]; then
    exp_time=$(date -d "$exp_date" +%s) && 
    current_time=$(date +%s) && 
    diff_seconds=$((exp_time - current_time)) && 
    diff_days=$((diff_seconds / 86400)) && 
    diff_hours=$(((diff_seconds % 86400) / 3600)) && 
    if [ $diff_days -le 3 ] && [ $diff_days -ge 0 ]; then 
      notify-send "Certificate Alert" "$domain expires in $diff_days days and $diff_hours hours"
      # # Optional: log to file
      # echo "$(date): $domain expires in $diff_days days and $diff_hours hours" >> $LOG_FILE
    fi
  fi
done

Make it executable with chmod +x /path/to/script, then add it to a cronjob to check the certs once per hour:

0 * * * * DISPLAY=:0 /home/user/scripts/network/cert-checker.sh

Seems to be working so far.

I put this together with a lot of help from the new Qwen3-Coder model.

sodapopcan

sodapopcan

That was the sentiment of my comment. I know I can set up a cron, I know when it can be done (without asking AI), but I just didn’t… partially because in a weird way I enjoy doing it manually (I only have one freelance client as I work work a full time job, if I had more I would have nipped this in the bud long ago). So I was delighting at the idea that maybe (and it probably isn’t even the case) that an owner of hex is doing the same :slight_smile:

sanswork

sanswork

I’m following this for updates so I don’t have to just keep refreshing :slight_smile:

sodapopcan

sodapopcan

Wait, is someone manually updating hex.pm’s letsencrypt certificate based off of the email reminders that recently stopped? I was doing this with a client and they emailed me today about this very issue because I kept telling myself every three months “Oh right, I gotta set up a cron for this, ugh… I’ll do it this afternoon…” :sweat_smile:

Where Next?

Popular in Questions Top

9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set? Thanks.
New
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
mathew4509
I have a list say x = ["23gh", "56kh", "97mh"] I would like to pass each element to Val in each iteration. Say, in iteration 1 -------...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
hpopp
To simplify some tasks at work, I wrote and published this package yesterday. It’s a simple macro that enables Access behaviour on struct...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New

Other popular topics Top

lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
Tee
can someone please explain to me how Enum.reduce works with maps
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
mgjohns61585
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New

We're in Beta

About us Mission Statement