Sync Fail SSL Error

Operating system

Linux

Joplin version

3.1.24

Desktop version info

Joplin 3.1.24 (prod, linux)

Client ID: b2acea41e4ed40f29bf5e60bfff80db5
Sync Version: 3
Profile Version: 47
Keychain Supported: Yes

Revision: d581264

Backup: 1.4.2
Better Code Blocks: 1.1.0
BibTeX: 0.5.0
Freehand Drawing: 2.12.0
Math Mode: 0.7.1
Quick Links: 1.3.2

Sync target

Joplin Server

What issue do you have?

Hello everyone,
I am trying to host a Joplin server and expose it over the web using Caddy. I can connect to the Web UI just fine and syncing works from my Android client app.
However, when I try to configure sync on the desktop app, I get the following error:

Error. Please check that URL, username, password, etc. are correct and that the sync target is accessible. The reported error was:
request to https://[customdomain]/api/items/root:/testing.txt:/content failed, reason: write EPROTO 32349705470848:error:10000458:SSL routines:OPENSSL_internal:TLSV1_ALERT_UNRECOGNIZED_NAME:../../third_party/boringssl/src/ssl/tls_record.cc:592:SSL alert number 112 (Code EPROTO)

In the server logs, I can't find anything that would indicate any error. Could anyone give me some direction in this on what to do next?