cPanel error. Horde is unavailable while the system is being upgraded. HTTP error 503

Make sure hostname is good:

/usr/local/cpanel/scripts/check_valid_server_hostname

Did you run /scripts/upcp –force? If not do it.

/scripts/upcp --force

If you run it already, run it again as I got this fixed after the second run.

If still not working:

cd /var/cpanel/.application-locks
rm -fv UpdateHostname\:USERNAME
/usr/local/cpanel/bin/update_horde_config --user=USERNAME

where USERNAME is cPanel username.… Read the rest

cPanel, How to fix “cat: /dev/fd/63: No such file or directory” error

This appears when you run simple cd command via cPanel –>  Terminal, for example:

cd public_html
cat: /dev/fd/63: No such file or directory

The fix is pretty simple, just suppress output of cd command

Update .bashrc with the following alias:

alias cd='cd &>/dev/null'

source .bashrc
Read the rest

Cpanel whmapi1 tool notes

Check bandwidth for a user:

whmapi1 showbw searchtype=user search=USERNAME year 2018 month 8

Change account's master domain:

whmapi1 modifyacct user=USERNAME domain=NEWDOMAINNAME

Change username:

whmapi1 modifyacct user=USERNAME newuser=NEWUSERNAME

Change package:

whmapi1 changepackage user=USERNAME pkg=NEWPKG

Show account's info:

whmapi1 accountsummary user USERNAME

Enable shell access:

whmapi1 modifyacct user=USERNAME HASSHELL=1
read -p "Username: " u; whmapi1 modifyacct user=$u HASSHELL=1

Update hostname:

whmapi1 sethostname hostname=HOSTNAME

Generate self signed SSL certificate:

whmapi1 generatessl domains=example.com
Read the rest

How to calculate IMAP/POP3 dovecot bandwidth

How to calculate IMAP dovecot bandwidth:

less /var/log/maillog |grep Aug |grep DOMAIN.COM |grep -Po 'out\=.+?,' |cut -d '=' -f2 |tr -d ,|awk '{s+=$1} END {print "total: ", s, " bytes transferred over IMAP"}'

total:  83107245783  bytes transferred over IMAP

echo "83107245783/1024/1024" |bc
79257M
~80G


How to calculate POP3 dovecot bandwidth:

less /var/log/maillog |grep DOMAIN.COM
Read the rest

How to enable cPanel CalDAV

Enable DAV daemon over WHM –> Service Manager

Remove if needed from disable features WHM –> Feature Manager

Allowing ports 2077, 2078, 2079, and 2080 in your firewall

If CSF update csf.conf TCP_IN with the ports range 2077:2080:

/etc/csf/csf.conf

TCP_IN = "20,21,22,25,26,80,110,143,443,465,587,993,995,2082,2083,2086,2087,2095,2096,2077:2080"

Restart csf

csf -r

cPanel's documentation:

https://documentation.cpanel.net/display/CKB/How+to+Set+Up+Calendars+and+ContactsRead the rest