# Bootstrap error during Discourse install: ENOENT - /etc/runit/1.d/letsencrypt

**URL:** <https://meta.discourse.org/t/bootstrap-error-during-discourse-install-enoent-etc-runit-1-d-letsencrypt/376416>\
**Category:** Self-hosting\
**Created:** [July 29, 2025, 1:28pm UTC](https://meta.discourse.org/t/bootstrap-error-during-discourse-install-enoent-etc-runit-1-d-letsencrypt/376416 "2025-07-29T13:28:10Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [August 5, 2025, 9:56am UTC](https://meta.discourse.org/t/bootstrap-error-during-discourse-install-enoent-etc-runit-1-d-letsencrypt/376416/12 "2025-08-05T09:56:36Z")

</div>

I also hit this.

I removed this (by commenting it out):

```plaintext
  after_ssl:
# - replace:
# filename: "/etc/runit/1.d/letsencrypt"
# from: /--keylength/
# to: "-d example.com --keylength"
# - replace:
# filename: "/etc/nginx/conf.d/discourse.conf"
# from: /return 301 https.+/
# to: |
# return 301 https://$host$request_uri;

```

and added this in the run section at the bottom as per @pfaffman

```plaintext
- exec: sed -i "s|-d \${DISCOURSE_HOSTNAME}|-d \${DISCOURSE_HOSTNAME} -d www.\${DISCOURSE_HOSTNAME}|g" /usr/local/bin/letsencrypt

```

This appears to have been enough for me:

- the site rebuilt and apparently appears to have valid certs
- the redirection from apex to www is working

Thanks @pfaffman!

---

_[View the full topic](https://meta.discourse.org/t/bootstrap-error-during-discourse-install-enoent-etc-runit-1-d-letsencrypt/376416)._
