# LiteSpeed Web Server will not start – “License key operation failure”

PURPOSE

Provide a step-by-step fix when cPanel/WHM reports that httpd is down and
LiteSpeed fails with a licence error such as:

[ERROR] [LICENSE] License key operation failure: ERR LC: Invalid license.key
file

--------------------------------------------------------------------------------


AFFECTED PLATFORMS

 * CentOS 7 / AlmaLinux 8 / Rocky 8 (cPanel/WHM)

 * LiteSpeed Web Server 5.x or 6.x running as lshttpd

--------------------------------------------------------------------------------


SYMPTOMS

Indicator

Where you see it

Service down alert – “The service ‘httpd’ appears to be down.”

WHM → Home → Server Status → Service Status

systemctl status lshttpd shows failed (exit-code)

SSH terminal

journalctl -u lshttpd or /usr/local/apache/logs/error_log contains the licence
error above

Logs

--------------------------------------------------------------------------------


CAUSE

LiteSpeed aborts during start-up when it cannot validate the local license.key
file. Common reasons include:

 * Licence expired or payment overdue

 * Wrong licence key copied to the server

 * File corrupted, renamed to license.key.bad by LiteSpeed

 * Leased licence bound to a different IP address

 * Server upgraded past the RAM limit of an entry-level key

--------------------------------------------------------------------------------


RESOLUTION

 1. Confirm the error
    
    /usr/local/lsws/bin/lshttpd -V | grep -i license
    
    You will see Invalid license.key file or similar.

 2. Renew, reissue or upgrade the licence
    Do this in the LiteSpeed Client Area or your cPanel licence provider’s
    portal. Once done, continue below.

 3. Refresh the local key
    
    cd /usr/local/lsws mv conf/license.key.bad conf/license.key 2>/dev/null ||
    true bin/lshttpd -r # fetches a fresh key from LiteSpeed
    
    If -r fails, download the new license.key from the portal and scp it into
    /usr/local/lsws/conf/.

 4. Start the web server
    
    systemctl restart lshttpd

 5. Verify
    
    systemctl status lshttpd --no-pager ss -ltnp | grep ':80\|:443' # ports now
    held by lshttpd tail -n 20 /usr/local/apache/logs/error_log
    
    The service state should be active (running) and no further licence errors
    should appear.

--------------------------------------------------------------------------------


PREVENT A REPEAT

Action

Command / location

Check that LiteSpeed auto-restart is enabled

grep AutoRestart /usr/local/lsws/conf/httpd_config.xml (value must be 1)

Monitor expiry

WHM → LiteSpeed Web Server → Licence Management

Rotate logs weekly

Add a logrotate stanza for /usr/local/apache/logs/*.log

Calendar reminder before licence expiry

Any calendar system – schedule it at least seven days in advance