{% extends "base.html" %} {% block title %}Certificate · NEXXVU{% endblock %} {% block content %}

Settings › Security

Certificate {{ fresh_tag("settings:certificate") }}{{ fresh_tag("settings:certificate-read") }}

The HTTPS certificate browsers see for this Portal's public name. Caddy, in front of the Portal, gets it from Let's Encrypt and renews it by itself; NEXXVU watches it and can force a renewal.

All settings
{% include "_settings_navigation.html" %}

Certificate

{% if notice %}
{{ notice }}
{% endif %} {% if error %}{% endif %} {% if not admin %}

Only Portal administrators manage the certificate.

{% else %}{% set c = cert %}{% set f = c.front %}{% set k = c.certificate or {} %}

{{ {'success': 'Valid', 'warning': 'Renewal late', 'critical': 'Attention', 'neutral': 'Checking' if f else 'Not set up'}[c.tone] }} {{ c.summary }}

{% if f %}
Public name
{{ f.hostname }}{% if f.approval_site %} and approve.{{ f.hostname }}{% endif %}
Issued by
{{ c.authority }}{% if k.issuer_cn %} ({{ k.issuer_cn }}){% endif %}
{% if k.valid %}
Valid
{{ k.not_before|replace('T',' ')|replace('Z',' UTC') }} → {{ k.not_after|replace('T',' ')|replace('Z',' UTC') }} ({{ k.lifetime_days }} days)
Days left
{{ k.days|round|int }}
Names
{{ k.names|join(', ') }}
{% endif %}
Checked
{{ (c.checked or 'not yet')|replace('T',' ')|replace('Z',' UTC') }} (every 15 minutes, by the Portal's server)
{% endif %} {% if c.pending %}

The Portal's server is checking or renewing the certificate; this page follows by itself.

{% else %}
{% endif %}
{% if f %}

Automatic renewal

On {% if f.mode == 'acme' %}Caddy renews the certificate with Let's Encrypt when about a third of its lifetime is left ({{ c.renew_at_days or 30 }} days before it ends), and tries again by itself if Let's Encrypt cannot be reached.{% else %}Caddy's internal authority renews the certificate by itself.{% endif %}

Automatic renewal always stays on: without it the Portal would become unreachable when the certificate ends. NEXXVU warns here and in the header when a renewal is late ({{ ((c.renew_at_days or 30) * 2 / 3)|round|int }} days left) and when it is critical ({{ [7, ((c.renew_at_days or 30) / 3)|round|int]|min }} days left). Renewal needs the public name's DNS to point to this server and TCP 80 and 443 to reach it.

{% if f.mode == 'acme' %}

Renew now

Gets a new certificate from Let's Encrypt at once, for example after a key may have been exposed or when automatic renewal is late. Caddy restarts once, about 5 seconds after you confirm (the Portal is unreachable for a few seconds); if no new certificate arrives within about two and a half minutes, the previous one is put back, so the Portal stays reachable.

Let's Encrypt limits renewals, so NEXXVU allows one every 24 hours and three a week.

{% if c.pending %}

Available again when the running check or renewal has finished.

{% else %}
{% endif %}
{% endif %} {% set h = (c.control or {}).history or [] %}

Renewals requested here

{% if h %}
{% for r in h %}{% endfor %}
When (UTC)ByResult
{{ (r.requested_utc or '')|replace('T',' ')|replace('Z','') }}{{ r.actor }}{{ 'Renewed' if r.ok else 'Not renewed' }} {{ r.message }}
{% else %}

None yet. Automatic renewals by Caddy are not listed here; the dates above show the current certificate.

{% endif %}
{% else %}

Set up the public name

On the Portal server, as root, once DNS points the name to it and TCP 80 and 443 reach it:

sudo sudo /opt/nexxvu-portal/installer/PORTAL-FRONT.sh --enablelt;releasesudo /opt/nexxvu-portal/installer/PORTAL-FRONT.sh --enablegt;/installer/PORTAL-FRONT.sh --enable --hostname <portal>.<domain> --tls acme

Caddy then gets the certificate from Let's Encrypt and renews it by itself; this page shows it afterwards.

{% endif %}{% endif %}
{% endblock %} {% block scripts %}{% endblock %}