I already solved it, I simply added a new domain.conf file with the following content to the VPS-A running cloudron:
server {
server_name cccc.com;
location / {
proxy_pass VPS-B_IP:5678;
proxy_set_header Host $host;
proxy_redirect http:// https://;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/cccc.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/cccc.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = cccc.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name cccc.com;
listen 80;
return 404; # managed by Certbot
}