Skip to content

Commit

Permalink
doc: notes on updating certificates and restarting. (#2067)
Browse files Browse the repository at this point in the history
The first paragraph is lifted from #1122

Closes #1122.
  • Loading branch information
2e0byo authored Mar 18, 2023
1 parent 427cf58 commit 03d7057
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/TLS-Certificates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -488,3 +488,32 @@ fit your system .. this works for Ubuntu):
Verify return code: 0 (ok)
---
^C
Updating Certificates
=====================

After updating Crossbar.io TLS server certificates and/or keys, you must restart
Crossbar.io for the new certificates/keys to take effect. The certificates/keys
are cached when loading the first time, and hence without restarting
Crossbar.io, the old certificates/keys would still be used despite the new ones
already being stored on disk.

Updating LetsEncrypt with certbot
---------------------------------

Once you have configured LetsEncrypt, you can periodically run `certbot
<https://certbot.eff.org/>`_ to update your certificates. You may wish to
restart Crossbar.io if a new certificate is generated. Certbot has a
`--deploy-hook` which is run once for every generated certificate, with the
domains in `$RENEWED_DOMAINS`. Thus you can create something like

.. code:: bash
#!/bin/bash
if [[ "$RENEWED_DOMAINS" =~ "wamp.my.domain" ]]; then
systemctl restart crossbar # or however your router is run
echo "restarted server" > /tmp/log
fi
And then pass it to certbot, e.g. by running `systemctl edit certbot` and adding
`--deploy-hook=/path/to/restart.sh`.

0 comments on commit 03d7057

Please sign in to comment.