How to Set Up the cPanel DAV Daemon

The cPanel DAV Daemon enables a set of extensions that allow users to manage website data remotely. For example, CalDAV is an extension that grants multiple devices access to manage calendar data on a remote server simultaneously. With CalDAV, you can create, share, edit, and remove calendar events using your server to host them. The following guide contains the steps on how to set up cPanel DAV Daemon to add CalDAV services.

Enable cPanel DAV Daemon

In order to use CalDAV, the cPanel DAV Daemon needs to be enabled from WHM. Follow the steps below to enable the cPanel DAV Daemon.

  1. Log into WHM as root.

  2. Navigate to Service Manager. To do this, simply type “service manager” into the search field and click on the result found.

  3. Click the checkbox for Enable and Monitor for cPanel DAV Daemon.

Now that you have enabled the service, you will need to open the ports in the firewall to allow the cPanel DAV Daemon to listen for connections.

Open Ports in Firewall

The cPanel DAV Daemon uses the firewall ports 2079 and 2080 to manage connections. Generally, these ports are not “open” to making connections by default. Opening ports in the firewall for connections is simple and similar whether you are using APF or CSF. The instructions in this section will describe how to determine which firewall is running. Depending on whether you are running APF or CSF, you can follow the respective instructions to learn how to open the ports needed for the cPanel DAV Daemon.

Which Firewall Am I Using?

If you are using the default configuration of a VPS or Dedicated Server, then you most likely are running APF. To confirm this, run the following command as root:

/bin/systemctl status apf.service

The output below confirms that APF is active:

 root@hostname ~ $  /bin/systemctl status apf.service  apf.service - SYSV: Advanced Policy Firewall Loaded: loaded (/etc/rc.d/init.d/apf; bad; vendor preset: disabled) Active: active (exited) since Wed 2017-10-04 17:51:10 EDT; 2min 37s ago Docs: man:systemd-sysv-generator(8) Process: 20628 ExecStart=/etc/rc.d/init.d/apf start (code=exited, status=0/SUCCESS) 

The output below indicates that APF is not active:

 root@hostname ~ $  /bin/systemctl status apf.service Unit apf.service could not be found. 

In this case, run the following command as root:

/bin/systemctl status csf.service

The following output confirms that CSF is running:

 root@hostname ~ $  /bin/systemctl status apf.service  csf.service - ConfigServer Firewall & Security - csf Loaded: loaded (/usr/lib/systemd/system/csf.service; enabled; vendor preset: disabled) Active: active (exited) since Wed 2017-09-20 13:58:36 EDT; 2 weeks 0 days ago Main PID: 829 (code=exited, status=0/SUCCESS) CGroup: /system.slice/csf.service 

Opening Ports Using APF

  1. SSH (as root) into your server.

  2. Run the following command:

    nano /etc/apf/conf.apf
  3. Locate the following code:

    # Common ingress (inbound) TCP ports IG_TCP_CPORTS="20,21,25,53,80,110,113,143,443,465,993,995,2049,2077,2078,2082,2083,2086,2087,2089,2095,2096,3306,5222,9090,12001"
  4. Edit the second line to include the ports 2079 and 2080 like so:

    # Common ingress (inbound) TCP ports IG_TCP_CPORTS="20,21,25,53,80,110,113,143,443,465,993,995,2049,2077,2078,2079,2080,2082,2083,2086,2087,2089,2095,2096,3306,5222,9090,12001"
  5. Restart APF by running the command:

    apf -r

Opening Ports Using CSF

  1. SSH (as root) into your server.

  2. Run the following command:

    nano /etc/csf/csf.conf
  3. Locate the following code:

    # Allow incoming TCP ports TCP_IN = "20,21,25,53,80,110,143,443,465,587,993,995,2077,2078,2082,2083,2086,2087,2095,2096"
  4. Edit the second line to include the ports 2079 and 2080 like so:

    # Allow incoming TCP ports TCP_IN = "20,21,25,53,80,110,143,443,465,587,993,995,2077,2078,2079,2080,2082,2083,2086,2087,2095,2096"
  5. Restart CSF by running the command:

    csf -r

Testing

Once you have enabled the cPanel DAV Daemon and opened the ports in the firewall, you can use telnet to test the connection to port 2079 by running the following command:

telnet server.hostname 2079

You should receive the following output:

 root@localhost ~ $  telnet server.hostname 2079 telnet server.hostname 2079 Connected to server.hostname. Escape character is '^]'. 

Then, run the following command to test port 2080:

telnet server.hostname 2080

You should receive the following output:

 root@localhost ~ $  telnet server.hostname 2080 telnet server.hostname 2080 Connected to server.hostname. Escape character is '^]'. 

Now that you have opened the ports and enabled the cPanel DAV Daemon, CalDAV is available. You can now sync calendar data for your domain using this protocol. To learn more about how to use CalDAV, be sure to check out our guide for “Adding a CalDAV Account in iOS 11”.

Was this article helpful? Let us know!