Can’t connect to host “ssl://localhost:993” on Cyberpanel
When working with CyberPanel, you may encounter the error when you try to access snappymail : Server Message “Can’t connect to host ‘ssl://localhost:993′”. This error typically occurs due to a misconfiguration in your server’s network settings. Specifically, the issue often lies in one of two critic

When working with CyberPanel, you may encounter the error when you try to access snappymail : Server Message “Can’t connect to host ‘ssl://localhost:993′”. This error typically occurs due to a misconfiguration in your server’s network settings.
Specifically, the issue often lies in one of two critical files: /etc/hosts or /etc/resolv.conf. Below, we’ll walk you through the steps to resolve this error by checking and correcting the configurations in these files.
Step 1: Check and Configure the /etc/hosts File
The /etc/hosts file maps hostnames to IP addresses on your local machine. If this file is misconfigured, your server may fail to resolve localhost correctly, leading to the error.
- Access Your Server via SSH
Use an SSH client (e.g., PuTTY or Terminal) to log in to your server. - Open the
/etc/hostsFile
Use a text editor likenanoorvimto open the file:sudo nano /etc/hosts - Verify the Configuration
Ensure the file contains the following line:**127.0.0.1 localhost**or yourserver.domain.comIf this line is missing or incorrect, add or modify it as shown above. - Save and Exit
Save the changes and exit the editor. Innano, you can do this by pressingCTRL + X, thenY, andEnter. - Final Output should be something similar to attached image.

Step 2: Check and Configure the /etc/resolv.conf File
The /etc/resolv.conf file contains DNS resolver information. If this file is misconfigured, your server may fail to resolve domain names, including localhost.
- Open the
/etc/resolv.confFile
Use a text editor to open the file: nano/etc/resolv.conf - Add a Public DNS Server
To ensure proper DNS resolution, add a public DNS server like Google’s:nameserver 8.8.8.8 , nameserver 8.8.4.4or Cloudflarenameserver 1.1.1.1If the file already contains othernameserverentries, you can replace them . - Save and Exit
Save the changes and exit the editor. - Final Output should be something similar to attached image.

Step 3: Verify the Fix
After making the above changes, restart dovecot and check if the error is resolved. If the configurations were correct, the error “Can’t connect to host ‘ssl://localhost:993′” should no longer occur.

Access Snappymail.

By following these steps, you should be able to resolve the “Can’t connect to host ‘ssl://localhost:993′” error in CyberPanel.
That’s all. Happy Hosting.
Was this article helpful?