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

yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
New
dokuzbir
Hello, I am trying to convert my lists to string without losing brackets.For start i have 3 map. They look like these buyer = %{ id: ...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
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
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
Exadra37
Sometimes I want to check if the input into a function is not a blank string. My first approach: defmodule Example do def do_stuff(s...
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
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

Other popular topics Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
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
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
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
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
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

We're in Beta

About us Mission Statement