simplexmq icon indicating copy to clipboard operation
simplexmq copied to clipboard

SMP server fails to get HTTPS credentials, XFTP fine

Open ruckel opened this issue 1 year ago • 5 comments

The script I'm running results in the XFTP server getting up and running, but the SMP server fails with the error: no HTTPS credentials: /etc/opt/simplex/web.crt, /etc/opt/simplex/web.key

OS: NixOS

$ openssl version
OpenSSL 3.0.14 4 Jun 2024 (Library: OpenSSL 3.0.14 4 Jun 2024)
smpdomain=smp.xyz.xy
xftpdomain=xftp.xyz.xy

smprun() {
sudo certbot certonly --standalone -d $smpdomain --key-type rsa --rsa-key-size 4096
docker run \
-e "ADDR=${smpdomain}" \
-p 5223:5223 \
-v $HOME/simplex/smp/config:/etc/opt/simplex:z \
-v $HOME/simplex/smp/logs:/var/opt/simplex:z \
simplexchat/smp-server:latest
}

xftprun(){
sudo certbot certonly --standalone -d $xftpdomain --key-type rsa --rsa-key-size 4096
docker run \
-e "ADDR=${xftpdomain}" \
-e "QUOTA=20gb" \
-p 444:444 \
-v $HOME/simplex/xftp/config:/etc/opt/simplex-xftp:z \
-v $HOME/simplex/xftp/logs:/var/opt/simplex-xftp:z \
-v $HOME/simplex/xftp/files:/srv/xftp:z \
simplexchat/xftp-server:latest
}

smprun & 
xftprun

Any pointers?

ruckel avatar Oct 21 '24 00:10 ruckel

Getting this same issue but with the SMP server

Mo0nbase avatar Oct 30 '24 04:10 Mo0nbase

The same issue too, Do you have solved?

witome avatar Dec 01 '24 00:12 witome

Same issue

Lesnoy40rt77 avatar Dec 26 '24 17:12 Lesnoy40rt77

I encountered the same problem today.

It seems /etc/opt/simplex/web.crt, /etc/opt/simplex/web.key are only used for the built in web service to show the server info page with tls. See explanation in #1399. Since I'm using Nginx reverse proxy, I don't need the https connection in this docker.

The solution I found is quite simple. So I commented these 3 lines in ~/simplex/smp/config/smp-server.ini:

#https: 443 #cert: /etc/opt/simplex/web.crt #key: /etc/opt/simplex/web.key

And uncommented 1 line: http: 8000

Then I restarted the container.

If you really want to use https and LetsEncrypt. I guess you need to generate the cert and key file by certbot and then rename them to web.cert and web.key.

quatrejuin avatar Jan 02 '25 00:01 quatrejuin

Please, can you share a working Nginx template for SMP and/or XFTP self-hosted server?

satonotdead avatar Feb 14 '25 20:02 satonotdead