# SSL\_connect returned=1 errno=0 peeraddr=162.243.189.2:443 state=error: certificate verify failed (Hostname mismatch)

**URL:** https://meta.discourse.org/t/ssl-connect-returned-1-errno-0-peeraddr-162-243-189-2-443-state-error-certificate-verify-failed-hostname-mismatch/269824
**Category:** Self-hosting
**Tags:** s3
**Created:** [June 27, 2023, 9:30pm UTC](https://meta.discourse.org/t/ssl-connect-returned-1-errno-0-peeraddr-162-243-189-2-443-state-error-certificate-verify-failed-hostname-mismatch/269824 "2023-06-27T21:30:25Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![DavidO](https://avatars.discourse-cdn.com/v4/letter/d/f475e1/32.png) [@DavidO](https://meta.discourse.org/u/DavidO)
#### Post date: [June 27, 2023, 9:30pm UTC](https://meta.discourse.org/t/ssl-connect-returned-1-errno-0-peeraddr-162-243-189-2-443-state-error-certificate-verify-failed-hostname-mismatch/269824/1 "2023-06-27T21:30:25Z")

</div>

I’ve started running out of space in my Digital Ocean Droplet so I wanted to move the uploaded files over to a Digital Ocean Space.

This is what I have setup…

- s3 access key id - Copied from DO CP \> API \> Applications & API

- s3 secret access key - Copied from DO CP \> API \> Applications & API

- s3 region - Not sure it matters for DO Spaces, but I left it as default - US East (N. Virginia)

- s3 upload bucket - I’m not clear if I’m supposed to create a folder in the Space or not. I tried both…

- s3 endpoint - This is where I think I’m off. I tried the https:// versions of…

I saw this…

> [@Looking for doc to connect discourse with digital ocean spaces](https://meta.discourse.org/t/looking-for-doc-to-connect-discourse-with-digital-ocean-spaces/172917/4):
>
> It says: Does that not communicate that you should add those settings to the env section of your app.yml? No, they will not show up in the admin interface. Settings set with ENV variables are hidden from the admin interface.

…and this…

> [@Configure an S3 compatible object storage provider for uploads](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916#digital-ocean-spaces-3):
>
> information_source This topic covers how to configure some common S3 compatible Object Storage providers (S3 clones). See [Set up file and image uploads to S3](https://meta.discourse.org/t/setting-up-file-and-image-uploads-to-s3/7229) for more details about Amazon AWS S3 configuration, which is officially supported and used internally by Discourse for our hosting services. Provider Service Name Works with Discourse? [Amazon AWS](#aws-s3-2) S3 Yes [Digital Ocean](#digital-ocean-spaces-3) Spaces Yes [Linode](#linode-object-storage-4) Object Storage Yes [Google Cloud](#google-cloud-platform-storage-5) Storage Yes [Scaleway](#scaleway-object-storage-6) Object Storage Yes [Vultr](#vultr-object-storage-7) Obj…

But my settings do show up in the admin interface, so I think this may not we outdated and it’s just a matter of getting my setting mix correct.

I saw this…

> [@Ghost hostname after hostname change](https://meta.discourse.org/t/ghost-hostname-after-hostname-change/241353/3):
>
> Thank you Jay for the link. I hadn’t found that topic yet. slight_smile Based on your inputs and that linked topic, I have: Disabled Cloudflare and confirmed via [DNSChecker.org](http://DNSChecker.org) my A records resolve to my DO droplet IP Doublechecked my app.yml (it was fine) Entered app container and ran discourse remap from old to new domain name and it made changes. To confirm, I ran it second time and it exited with no changes Used recursive grep looking inside and outside the app container for the old dom…

…but the admin area does not allow me to leave “s3 upload bucket” empty, so I wasn’t sure if that was related. That also seemed to be only if you’re using AWS S3 also. I tried creating a folder in my DO Space and using that folder name. I tried using a different name of a folder that wasn’t there, in case it needs to create its own. None of that worked.

I saw this…

[https://meta.discourse.org/t/secure-uploads/meta/140017](https://meta.discourse.org/t/secure-uploads/meta/140017)

…but I’m far from an expert, so I shied away from that.

At this point I’m just out of ideas to try and I’m not sure if I’m close and just need the right setting configuration or if I’m wholly missing something and not even close.

Any help would be much appreciated. Thank you.

---

_[View the full topic](https://meta.discourse.org/t/ssl-connect-returned-1-errno-0-peeraddr-162-243-189-2-443-state-error-certificate-verify-failed-hostname-mismatch/269824)._
