{% extends "base.html" %} {% block title %}License{% endblock %} {% block page_title %}License{% endblock %} {% block content %}
{# ── Status card ─────────────────────────────────────────────────────────── #}
License Status
{# Tier badge #} {% if status.tier == 'enterprise' %} Enterprise {% elif status.tier == 'business' %} Business {% else %} Community {% endif %} {% if status.valid %}

License is active

{% if status.customer %}

{{ status.customer }}

{% endif %} {% if status.email %}

{{ status.email }}

{% endif %} {% if status.issued_at %}

Issued: {{ status.issued_at }}

{% endif %} {% if status.expires_at %}

Expires: {{ status.expires_at }} {% if days_left is not none %} {% if days_left < 30 %} {{ days_left }}d left {% else %} {{ days_left }}d left {% endif %} {% endif %}

{% endif %} {% else %}

No active license

{% if status.get('reason') == 'expired' %} Your license expired on {{ status.expires_at }}. Contact your vendor to renew. {% elif status.get('reason') == 'no_key' %} No license key is configured. Add LICENSE_KEY=TDESK-... to your .env file and restart. {% elif status.get('reason') == 'no_public_key' %} The application's public key has not been configured yet. Contact your system administrator. {% else %} The license key is invalid or has been tampered with. Contact your vendor for a replacement key. {% endif %}

{% endif %}
{# ── Feature checklist ───────────────────────────────────────────────────── #}
Feature Access
{% set rows = [ ('Core ticketing, comments, attachments', True, True, True), ('Knowledge base', True, True, True), ('User management, bulk actions, CSV export', True, True, True), ('AI Chatbot (Groq)', False, True, True), ('SLA tracking & breach notifications', False, True, True), ('Weekly IT digest email', False, True, True), ('Ticket watchers', False, True, True), ('Time tracking', False, True, True), ('Satisfaction surveys', False, True, True), ('Email ingestion (IMAP)', False, False, True), ] %} {% for label, com, biz, ent in rows %} {% for flag, tier_name in [(com, 'community'), (biz, 'business'), (ent, 'enterprise')] %} {% endfor %} {% endfor %}
Feature Community Business Enterprise
{{ label | safe }} {% set is_current = (status.tier == tier_name) %} {% if flag %} {% else %} {% endif %}
{# ── Setup instructions ──────────────────────────────────────────────────── #}
How to Apply a License Key
  1. Obtain a license key from your vendor (format: TDESK-...).
  2. Open the .env file in your TechDesk installation directory.
  3. Add or update the line: LICENSE_KEY=TDESK-your-key-here
  4. Restart the TechDesk service: sudo systemctl restart gunicorn
  5. Return to this page to confirm the license is active.
{% endblock %}