Restore the WebApp Connection to Kopano Core

If Kopano WebApp shows “Cannot connect to Kopano Core,” first confirm that kopano-server is running and that WebApp’s DEFAULT_SERVER points to the Core socket or HTTP endpoint that actually exists. On a same-host installation, default: normally selects the local socket; on a split-server or reverse-proxy setup, use the configured network endpoint instead. Check the service and logs before editing configuration, because a stopped Core service and a wrong endpoint require different fixes.

Linux terminal showing kopano-server active and running in systemd status output
Check that the Kopano Server process is running before changing WebApp settings.
Linux service log displaying a missing Kopano server socket and failed connection
Repeated socket errors in the server log point to a Core endpoint or socket problem.
PHP config editor showing DEFAULT_SERVER set to default for the local Kopano socket
The WebApp administrator manual documents default: as the normal setting for the default local Core socket.
Linux terminal showing SELinux enforcing mode and an AVC denial for the web server socket connection
An SELinux AVC denial can identify a blocked connection from the web server process to the Kopano socket.

1. Confirm Kopano Core is available

Run these checks on the host that runs Kopano Core. Depending on the Linux distribution and package generation, the service manager may expose a systemd unit or a legacy init script:

sudo systemctl status kopano-server
sudo journalctl -u kopano-server -n 100 --no-pager

If the unit name is not found, check the installed package’s service name and use the distribution’s service tooling; do not assume a missing unit means the server package is absent. The Kopano Core administrator manual identifies kopano-server as the process that accepts client connections. If it is stopped, inspect the log for the actual startup error, such as a database connection failure, invalid configuration, or unavailable storage. Correct that underlying error and start the service through your normal service manager. Avoid repeatedly restarting it before reading the first failure message.

If the service is active, look for connection attempts and errors around the time WebApp fails. If no request reaches the Core logs, the problem is more likely between the WebApp host and Core: a wrong target, blocked network path, socket permissions, or mandatory access control.

2. Match WebApp’s endpoint to the deployment

WebApp uses PHP-MAPI, which is part of Kopano Core, to communicate with the server. The WebApp administrator manual says DEFAULT_SERVER defines the default Core socket location and documents default: as the usual same-host setting. It also gives HTTP and HTTPS examples for setups that reach Core over the network.

sudo grep -n 'DEFAULT_SERVER' /etc/kopano/webapp/config.php

Common locations can differ by package and installation method. If that path does not exist, locate the active WebApp config.php and confirm which file your web server serves. Do not edit an unused copy.

  • WebApp and Core on one host: keep DEFAULT_SERVER at default: unless your Core configuration intentionally uses a different socket path.
  • Core on another host: set the documented HTTP(S) endpoint for that host and its configured port/path, for example the appropriate http://host:236/kopano or https://host:237/kopano form. The values are examples, not guaranteed defaults for every deployment.
  • Reverse proxy or TLS termination: verify the proxy destination, scheme, port, and path together. A proxy that serves the WebApp page does not automatically prove that its backend route to Core works.

Back up the active config before changing it, edit only the endpoint value, preserve valid PHP syntax, and use a trusted encrypted connection when traffic crosses a network. Reload or restart only the relevant web service if your package setup requires it, then test one login.

3. Check the socket or network path

For a local socket, compare the path in the active Core configuration with the socket WebApp is trying to use. Check that the socket exists and that the web server account can traverse its parent directories and connect to it. The account is commonly www-data, apache, or wwwrun, depending on distribution. Avoid broad permissions such as making the socket world-writable; correct ownership, group membership, or the intended service policy instead.

For a remote Core endpoint, test name resolution and reachability from the WebApp host—not from your laptop. Confirm that the configured port is listening on the Core host and permitted by firewalls between the two hosts. A TCP check such as nc -vz core.example.net 236 can help establish whether a route is open, but it does not prove that the Kopano SOAP endpoint, TLS certificate, or authentication is correct. Use the real host and port from your configuration.

4. Investigate SELinux or AppArmor only when evidence points there

Kopano’s Core installation guidance specifically notes that SELinux can block the web server from connecting to Kopano. On an SELinux system, check the current mode and recent audit denials:

getenforce
sudo ausearch -m AVC -ts recent

If the denial names the web server process and the Kopano socket or endpoint, use the distribution’s supported policy or labeling guidance to permit the required access. Do not disable SELinux as a permanent fix, and do not copy a policy module from another server without reviewing the permissions it grants. If the system uses AppArmor, inspect the relevant web server profile and system logs for a matching denial instead; do not apply SELinux commands to an AppArmor-only host.

Verify the repair

After the narrowest correction, reload the WebApp page and sign in. Confirm that mailbox folders load, then check the Core and web server logs for a new successful connection and no repeated socket, timeout, or access-denied errors. If the service is active, the endpoint matches the actual topology, and no local policy denial appears, capture the exact timestamp and relevant log lines before escalating: a reverse proxy, TLS trust, package mismatch, or Core-side authentication issue may need separate diagnosis. Documentation examples can vary by package release, so confirm paths, service names, and endpoint ports against the manuals and configuration shipped with your installed versions.

Documentation: Kopano WebApp Admin Manual: Config.php; Kopano WebApp Admin Manual: Configuration; Kopano Core Administrator Manual: Installing; Kopano Core Administrator Manual: Managing KC services.

Leave a Comment

How to