Can not init api (error code 23)

I am trying to set up nextcloud with this and failing when creating the certificates.

My domain is:

cloud.bauerp.online

I ran this command:

acme.sh --issue -d cloud.bauerp.online --server letsencrypt --keylength 4096 -w /var/www/letsencrypt --key-file /etc/letsencrypt/cloud.bauerp.online/rsa/key.pem --ca-file /etc/letsencrypt/cloud.bauerp.online/rsa/ca.pem --cert-file /etc/letsencrypt/cloud.bauerp.online/rsa/cert.pem --fullchain-file /etc/letsencrypt/cloud.bauerp.online/rsa/fullchain.pem --reloadcmd "sudo /bin/systemctl reload nginx.service"

It produced this output:

[So 11. Dez 22:28:20 CET 2022] Selected server: https://acme-v02.api.letsencrypt.org/directory
[So 11. Dez 22:28:20 CET 2022] Lets find script dir.
[So 11. Dez 22:28:20 CET 2022] _SCRIPT_='/home/letsencrypt/.acme.sh/acme.sh'
[So 11. Dez 22:28:20 CET 2022] _script='/home/letsencrypt/.acme.sh/acme.sh'
[So 11. Dez 22:28:20 CET 2022] _script_home='/home/letsencrypt/.acme.sh'
[So 11. Dez 22:28:20 CET 2022] Using config home:/home/letsencrypt/.acme.sh
https://github.com/acmesh-official/acme.sh
v3.0.5
[So 11. Dez 22:28:20 CET 2022] Using server: https://acme-v02.api.letsencrypt.org/directory
[So 11. Dez 22:28:20 CET 2022] Running cmd: issue
[So 11. Dez 22:28:20 CET 2022] _main_domain='cloud.bauerp.online'
[So 11. Dez 22:28:20 CET 2022] _alt_domains='no'
[So 11. Dez 22:28:20 CET 2022] Using config home:/home/letsencrypt/.acme.sh
[So 11. Dez 22:28:20 CET 2022] ACME_DIRECTORY='https://acme-v02.api.letsencrypt.org/directory'
[So 11. Dez 22:28:20 CET 2022] DOMAIN_PATH='/home/letsencrypt/.acme.sh/cloud.bauerp.online'
[So 11. Dez 22:28:20 CET 2022] Using ACME_DIRECTORY: https://acme-v02.api.letsencrypt.org/directory
[So 11. Dez 22:28:20 CET 2022] _init api for server: https://acme-v02.api.letsencrypt.org/directory
[So 11. Dez 22:28:20 CET 2022] GET
[So 11. Dez 22:28:20 CET 2022] url='https://acme-v02.api.letsencrypt.org/directory'
[So 11. Dez 22:28:20 CET 2022] timeout=
[So 11. Dez 22:28:21 CET 2022] _CURL='curl --silent --dump-header /home/letsencrypt/.acme.sh/http.header  -L '
[So 11. Dez 22:28:21 CET 2022] Please refer to https://curl.haxx.se/libcurl/c/libcurl-errors.html for error code: 23
[So 11. Dez 22:28:21 CET 2022] ret='23'
[So 11. Dez 22:28:21 CET 2022] Can not init api for: https://acme-v02.api.letsencrypt.org/directory.
[So 11. Dez 22:28:21 CET 2022] Sleep 10 and retry.

My web server is (include version):
nginx/1.23.2

The operating system my web server runs on is (include version):
Ubuntu 22.04

I can login to a root shell on my machine (yes or no, or I don't know):
I have root permissions

account.conf
#LOG_FILE="/home/letsencrypt/.acme.sh/acme.sh.log"
#LOG_LEVEL=1

#AUTO_UPGRADE="1"

#NO_TIMESTAMP=1

UPGRADE_HASH=''
DEFAULT_ACME_SERVER='https://acme-v02.api.letsencrypt.org/directory'

...and when you do that, you find this:

CURLE_WRITE_ERROR (23)

An error occurred when writing received data to a local file, or an error was returned to libcurl from a write callback.

So, for some reason, it's not able to write to its home directory. Perhaps a permissions issue, or maybe the disk is full.

5 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.