Managing Certificates

Without importing a root certificate you get issues like this:

~/filestash # curl https://127.0.0.1:8334/healthz
curl: (60) SSL certificate OpenSSL verify result: self-signed certificate (18)
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the webpage mentioned above.

Once we are done with the import you will get:

~/filestash # curl https://127.0.0.1:8334/healthz
{"status": "pass"}

Note: on windows, use curl.exe instead of curl

Linux

To import the certificate:

~/filestash # sudo cp dist/data/state/certs/cert.pem /usr/local/share/ca-certificates/filestash.crt
~/filestash # sudo update-ca-certificates
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
Processing triggers for ca-certificates-java (20260311)…
done.
Updating Mono key store
Mono Certificate Store Sync - version 6.12.0.199
Populate Mono certificate store from a concatenated list of certificates.
Copyright 2002, 2003 Motus Technologies. Copyright 2004-2008 Novell. BSD licensed.

Importing into legacy system store:
I already trust 121, your new list has 122
Certificate added: O=Filestash
1 new root certificates were added to your trust store.
Import process completed.

Importing into BTLS system store:
I already trust 121, your new list has 122
Certificate added: O=Filestash
1 new root certificates were added to your trust store.
Import process completed.
Done
done.

Windows

From an Administrator command prompt, import the certificate into the machine root store with certutil:

C:\Users\filestash> certutil -addstore -f Root .\cert.pem
Root "Trusted Root Certification Authorities"
Signature matches Public Key
Certificate "O=Filestash" added to store.
CertUtil: -addstore command completed successfully.