{"result":{"depiction_url":null,"edges":{"observes":{"objects":[{"created":"2026-09-09T13:47:42Z","object_id":{"id":2009,"is_a":["text","documentation","reference","notification"],"name":"doc_notification_ssl_options","title":"observe_ssl_options\/2","uri":"https:\/\/zotonic.com\/id\/2009"},"seq":1}],"predicate":{"id":2550,"is_a":["meta","predicate"],"name":"observes","title":{"_type":"trans","tr":{"en":"Observes"}},"uri":"https:\/\/zotonic.com\/id\/observes"}},"references":{"objects":[{"created":"2020-05-30T05:47:43Z","object_id":{"id":1482,"is_a":["text","documentation","reference"],"name":"doc_developerguide_configuration_port_ssl_configuration","title":"Port configurations","uri":"https:\/\/zotonic.com\/id\/1482"},"seq":1000000}],"predicate":{"id":332,"is_a":["meta","predicate"],"name":"references","title":{"_type":"trans","tr":{"en":"References"}},"uri":"https:\/\/zotonic.com\/id\/references"}},"relation":{"objects":[{"created":"2020-05-30T05:47:43Z","object_id":{"id":1753,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_ssl_ca","title":"mod_ssl_ca","uri":"https:\/\/zotonic.com\/id\/1753"},"seq":1000000},{"created":"2020-05-30T05:47:43Z","object_id":{"id":1482,"is_a":["text","documentation","reference"],"name":"doc_developerguide_configuration_port_ssl_configuration","title":"Port configurations","uri":"https:\/\/zotonic.com\/id\/1482"},"seq":1000000}],"predicate":{"id":303,"is_a":["meta","predicate"],"name":"relation","title":{"_type":"trans","tr":{"nl":"Relatie","en":"Relation"}},"uri":"http:\/\/purl.org\/dc\/terms\/relation"}},"subject":{"objects":[{"created":"2026-09-09T13:47:42Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-09-09T13:47:42Z","object_id":{"id":2566,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_operator","title":"Operator","uri":"https:\/\/zotonic.com\/id\/2566"},"seq":2},{"created":"2026-09-09T13:47:42Z","object_id":{"id":2635,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_module","title":"Module","uri":"https:\/\/zotonic.com\/id\/2635"},"seq":3},{"created":"2026-09-09T13:47:42Z","object_id":{"id":2636,"is_a":["categorization","keyword","keyword_task"],"name":"zotonic_topic_configure","title":"Configure","uri":"https:\/\/zotonic.com\/id\/2636"},"seq":4},{"created":"2026-09-09T13:47:42Z","object_id":{"id":2682,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_tls_and_certificates","title":"TLS and certificates","uri":"https:\/\/zotonic.com\/id\/2682"},"seq":5}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":1754,"is_a":["text","documentation","reference","module"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1754"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_module_mod_ssl_letsencrypt","page_url":{"en":"https:\/\/zotonic.com\/docs\/1754\/mod_ssl_letsencrypt","x-default":"https:\/\/zotonic.com\/docs\/1754\/mod_ssl_letsencrypt"},"preview_url":null,"resource":{"version":4014,"pivot_location_lat":null,"title":"mod_ssl_letsencrypt","is_authoritative":true,"body":"<p>Request certificates from Let’s Encrypt.<\/p>\n<p>Let’s Encrypt &lt;<a href=\"https:\/\/www.letsencrypt.com\/\">https:\/\/www.letsencrypt.com\/<\/a>&gt; provides free SSL certificates.<\/p>\n<p>Zotonic can request these certificates automatically, easing deployment of https secured web sites.<\/p>\n<h2>Hostname &amp; port requirements<\/h2>\n<p>There are some criteria that must for each site requesting a certificate.<\/p>\n<ol><li>Primary hostname(s) resolve using DNS<\/li><li>Resolved DNS address is not a LAN address<\/li><li>Site is reachable on the resolved address<\/li><li>Listening for the hostname on that address<\/li><\/ol>\n<p>Zotonic <em>must<\/em> listen on http port 80 and ssl port 443 for connections. If you use any other ports then requesting a\ncertificate will fail.<\/p>\n<p>See <a href=\"\/id\/doc_developerguide_configuration_port_ssl_configuration#ref-port-ssl-configuration\">Port configurations<\/a> for\nmore information about the configuring the correct port numbers and optional proxy settings.<\/p>\n<h2>Requesting a certificate<\/h2>\n<p>In the admin, go to System &gt; Modules and ensure that <code>mod_ssl_letsencrypt<\/code> is enabled.<\/p>\n<p>After mod_ssl_letsencrypt is enabled, go to System &gt; SSL Certificates.<\/p>\n<p>In the <em>Let’s Encrypt<\/em> panel you can request a certificate. Check the alternative names you want to include in the\ncertificates. (E.g. <em>example.com<\/em> and *<a href=\"http:\/\/www.example.com*)\">www.example.com*)<\/a>.<\/p>\n<p>The certificate request will run on the background and the status will be shown in the panel.<\/p>\n<p>After a certificate was received, make sure that Let’s Encrypt is the first module on the SSL Certificates list by\ndisabling all modules above Lets’s Encrypt.<\/p>\n<p>Now go to your site using https, you should be see your site protected by a Let’s Encrypt certificate.<\/p>\n<h2>Certificate and key files<\/h2>\n<p>The certificate and key files are placed into the site sub-directory of the security directory. The subdirectory will\nbe: <code>sitename\/letsencrypt\/<\/code><\/p>\n<p>Where <em>sitename<\/em> must be replaced with the name of your site.<\/p>\n<p>The security directory can be found by inspecting the output of:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">bin\/zotonic config\n<\/code><\/pre>\n<p>The Zotonic <em>security<\/em> directory can be in one of the following directories:<\/p>\n<ul><li>The environment variable <code>ZOTONIC_SECURITY_DIR<\/code><\/li><li>The <code>~\/.zotonic\/security<\/code> directory<\/li><li>The <code>\/etc\/zotonic\/security<\/code> directory (only on Linux)<\/li><li>The OS specific directory for application data files<\/li><\/ul>\n<p>The OS specific directories are:<\/p>\n<ul><li>On Unix: <code>~\/.config\/zotonic\/security\/<\/code><\/li><li>On macOS: <code>~\/Library\/Application Support\/zotonic\/security\/<\/code><\/li><\/ul>\n<p>The default is the OS specific directory.<\/p>\n<p>If there is a directory <code>priv\/security\/letsencrypt<\/code> inside your site’s OTP application folder then that directory will\nbe used.<\/p>\n<h2>Accepted Events<\/h2>\n<p>This module handles the following notifier callbacks:<\/p>\n<ul><li><code>observe_ssl_options<\/code>: Return the certificates of this site using <code>z_depcache:memo<\/code>.<\/li><li><code>observe_tick_24h<\/code>: Period tick, used to check for cert upgrade using <code>gen_server:cast<\/code>.<\/li><\/ul>\n<p>Delegate callbacks:<\/p>\n<ul><li><code>event\/2<\/code> with <code>submit<\/code> messages: <code>request_cert<\/code>.<\/li><\/ul>","slug":"mod_ssl_letsencrypt","doc_module_config":[],"is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"075dc74471e5d89c7eaeeeffd5ed9a4c68936af59457ccbf856b7f3fec8cb980","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":320,"is_a":["meta","category"],"name":"module","title":"Modules","uri":"https:\/\/test.zotonic.com\/id\/320"},"doc_source_path":"apps\/zotonic_mod_ssl_letsencrypt\/src\/mod_ssl_letsencrypt.erl","publication_start":"2023-06-24T08:17:46Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_mod_ssl_letsencrypt\/src\/mod_ssl_letsencrypt.erl","pivot_location_lng":null,"doc_source_kind":"module","name":"doc_module_mod_ssl_letsencrypt","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2020-05-30T05:47:33Z","uri":null,"doc_status":"current","is_dependent":false,"erlang_app":"zotonic_mod_ssl_letsencrypt","publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"652b4eddf9263041a2798f290b6c867343988a3f\n","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"modified":"2026-10-06T13:25:05Z","title_slug":"mod_ssl_letsencrypt"},"uri":"https:\/\/zotonic.com\/id\/1754","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1754"}},"status":"ok"}