ApisCP welcome email: Wrong FTP endpoint in email is given

When creating a new site, there is a field in FTP called prefix. I did this twice, with the same result both times: Entered ‘ftp.’ as the prefix and when the welcome email came, the " FTP login" section had the incorrect FTP prefix, using what appears to be the default fqdn for the ApsiCP panel fqdn.

Here are some helpful considerations when filing a bug:

  • What version of apnscp are you running?
    revision: 17d0d8708a5d9cab131138c3987f382694d7d879
    timestamp: 1729884780
    ver_maj: 3
    ver_min: 2
    ver_patch: 0
    ver_pre: 17d0d8708
    dirty: false
    debug: false

  • Which version of RHEL or CentOS are you using?
    AlmaLinux release 8.10 (Cerulean Leopard)

  • Can you reproduce this bug reliably? Provide steps. If not, provide steps to the best of your recollection.
    Yes

  • Enable debug mode (cpcmd config_set apnscp.debug true). Restart backend by hand,
    cd /usr/local/apnscp/bin ; ./bin/apnscpd -f restart
    Not needed.

Bugs will be fixed by the next release. Feature requests should go on GitHub or within the Discord channel. There’s a special channel for feature requests.

This decision is based upon immediate availability of the hostname. Once an account is created, DNS typically isn’t wired up, so to facilitate a seamless transition (and prevent unnecessary tickets), the direct server name is preferred.

You may override this view, resources/views/emails/opcenter/account-created.blade.php.

Replace SERVER_NAME with $svc->getServiceValue('ftp', 'ftpserver') - although bear in mind SSL typically isn’t available yet pending DNS changeover, so if the FTP client is connecting securely with SSL, that’s another point of confusion during onboarding.

Note: Help > Setup Instructions will provide the most portable client configuration based upon the availability of SSL and DNS resolution.

Noted and will look into the …blade.php

Regarding DNS, the email is providing the ApisCP ‘ftp.hostname.com’ so that SSL cert and DNS entry should have already been created. no (assuming I created that ahead of time… and I did.)? Normally, I understand the hostname is ideal to use here, but I use cloudflare for CDN, WAF, etc for the panel hostname, and then create the ‘ftp.’ prefix to access FTP. I would assume that SSH is the same here so I will need to create an ‘ssh.’ prefix thus ‘ssh.hostname.com’ as cloudflare will not pass port 22 either, so same problem.

I looked at Help → Setup and the FDQN of the panel is also listed under the panel fqdn and not the prefix that was entered during site setup. I didn’t follow your response if that is also expected or should that show was the entered during set up?

This occurs because the preceding values either do not resolve to the hosting IP or a SSL certificate is not yet configured. It examines the presence of wildcard SSL which is only possible if the panel manages DNS directly for you. ApisCP can communicate directly with Cloudflare and the secret is encrypted using Keyring.

Hostname precedence is:

In order for the first 2 hostnames to qualify, both DNS must resolve to the hosting IP and a SSL certificate must be present. SSL may be bootstrapped at account creation with [letsencrypt] => auto_bootstrap:

cpcmd scope:set cp.config letsencrypt auto_bootstrap True

Lastly, there’s an open feature request for better coordination with proxied IPs for DNS providers. Right now, the panel does not provide lookthroughs to see if the proxied IP would reach the server.