missing a space between the webroot path and first -d
./letsencrypt-auto --text certonly --renew-by-default --webroot --webroot-path /home/username/public_html -d mainserver.mydomain.com
are you following guide at https://forums.cpanel.net/threads/how-to-installing-ssl-from-lets-encrypt.513621/ ?