Invalid License Host Error After FileCloud Server Upgrade
How to resolve the "Invalid License Host" error by updating the allowed-host configuration in FileCloud Server.
Original Question or Issue:
After upgrading FileCloud Server, the existing license file is rejected, and the administrator is prompted to upload a valid license file.
When attempting to apply the existing or newly downloaded license file, FileCloud displays the "Invalid License Host" error, preventing successful license activation.
Environment:
- Product - FileCloud Server
- Version - 263.2
- Platform - Windows, Linux
Steps to Reproduce:
- Upgrade FileCloud Server.
- Access the FileCloud Admin Portal using the configured server URL.
- Attempt to upload or apply the existing license file.
- FileCloud rejects the license file and displays the "Invalid License Host" error.
Note: The issue occurs when the hostname used to access FileCloud is not included in the server's allowed-host configuration. An upgrade alone does not necessarily reproduce the error.
Error or Log Message:
The FileCloud Admin Portal displays the following message:
Admin Attention Required
Invalid License File
Please select and apply a valid license file.
Defect or Enhancement Number:
Cause:
The hostname used to access the FileCloud Server is missing from the TONIDOCLOUD_ALLOWED_HOSTS configuration in the cloudconfig.php file.
This may cause FileCloud to reject license activation even when the license file itself is valid.
Resolution or Workaround:
- Log in to the FileCloud Server with administrative access.
- Navigate to the FileCloud configuration file:Windows:
C:\xampp\htdocs\config\cloudconfig.phpLinux:/var/www/html/config/cloudconfig.php - Create a backup of the existing
cloudconfig.phpfile before making changes. - Open the configuration file and locate the following setting:
TONIDOCLOUD_ALLOWED_HOSTS - Update the setting to include the hostname used to access your FileCloud Server. For example:
define("TONIDOCLOUD_ALLOWED_HOSTS", "localhost, 127.0.0.1, filecloud.example.com");Replace
filecloud.example.comwith your actual FileCloud hostname. Preserve any other required hostnames already configured. - If FileCloud is accessed through a custom port, include the hostname with its port number. For example:
define("TONIDOCLOUD_ALLOWED_HOSTS", "localhost, 127.0.0.1, filecloud.example.com, filecloud.example.com:8443"); - Save the configuration file.
- Return to the FileCloud Admin Portal and upload the
license.xmlfile again. - Verify that the license is accepted and that FileCloud operates normally.
Notes:
- Ensure the hostname in
TONIDOCLOUD_ALLOWED_HOSTSmatches the hostname used to access FileCloud. - If the setting already exists, update the existing definition rather than adding a duplicate.
- When using a custom port, include the appropriate
hostname:portentry. - A newly downloaded license file may not resolve this particular issue if the required hostname is still missing from the configuration.
- If the issue persists, verify that the hostname is also authorized by the actual FileCloud license and that the Server URL is correct.
- For high-availability deployments, review the configuration on each applicable FileCloud web node.