{% extends "base.html" %} {% block title %}Settings{% endblock %} {% block content %}

General Settings

{{ settings_form.hidden_tag() }}
{{ settings_form.tunnel_name(class="input input-bordered w-full", **{'id': 'tunnel_name'}) }} {% for error in settings_form.tunnel_name.errors %} {% endfor %}
{{ settings_form.cf_zone_id(class="input input-bordered w-full", **{'id': 'cf_zone_id'}) }}
{{ settings_form.tunnel_dns_scan_zone_names(class="input input-bordered w-full", **{'id': 'tunnel_dns_scan_zone_names'}) }}
{{ settings_form.grace_period_seconds(class="input input-bordered w-full", **{'id': 'grace_period_seconds', 'type': 'number'}) }} {% for error in settings_form.grace_period_seconds.errors %} {% endfor %}
{{ settings_form.submit_settings(class="btn btn-primary") }}

Update Cloudflare Credentials

{{ cf_credentials_form.hidden_tag() }}
{{ cf_credentials_form.cf_account_id(class="input input-bordered w-full", **{'id': 'cf_account_id', 'placeholder': 'Enter new 32-character Account ID'}) }} {% for error in cf_credentials_form.cf_account_id.errors %} {% endfor %}
{{ cf_credentials_form.cf_api_token(class="input input-bordered w-full", **{'id': 'cf_api_token', 'placeholder': 'Enter new 40-character API Token'}) }} {% for error in cf_credentials_form.cf_api_token.errors %} {% endfor %}
{{ cf_credentials_form.submit_cloudflare_credentials(class="btn btn-primary") }}

All Cloudflare Tunnels on Account

{% if CF_ACCOUNT_ID_CONFIGURED %}

Displaying tunnels for Account ID: {{ ACCOUNT_ID_FOR_DISPLAY | e }}.
This list shows all tunnels on the account, not just the one managed by DockFlare. Click '+' to view associated DNS records.

{% if all_account_tunnels is defined and all_account_tunnels %}
{% for tunnel in all_account_tunnels %} {% endfor %}
+/- Tunnel Name Tunnel ID Status Created At Actions
{{ tunnel.name | e }} {{ tunnel.id | e }} {% set status_color = 'badge-success' if tunnel.status | lower == 'healthy' else ('badge-warning' if tunnel.status | lower == 'degraded' else ('badge-error' if tunnel.status | lower == 'down' else 'badge-ghost')) %} {{ tunnel.status | capitalize | e }} {% if tunnel.created_at %}{{ tunnel.created_at.split('T')[0] | e }}{% else %}N/A{% endif %}
{% elif all_account_tunnels is defined %}

No Cloudflare Tunnels found for Account ID: {{ ACCOUNT_ID_FOR_DISPLAY | e }}.

This could also mean an error occurred. Ensure your API Token has 'Account:Cloudflare Tunnel:Read' permission.

{% else %}

Could not retrieve tunnel information.

{% endif %} {% else %} {% endif %}

Backup & Restore

Create Backup

Download a full DockFlare backup archive (`.zip`) containing your encrypted configuration, agent keys, and state file. Store it safely with the `dockflare.key` included in the archive.

Download Backup Archive

Restore from Backup

Security

Change Password

{{ change_password_form.hidden_tag() }}
{{ change_password_form.current_password(class="input input-bordered w-full", **{'id': 'current_password'}) }}
{{ change_password_form.new_password(class="input input-bordered w-full", **{'id': 'new_password'}) }}
{{ change_password_form.confirm_new_password(class="input input-bordered w-full", **{'id': 'confirm_new_password'}) }}

Disable Password Login

{{ security_settings_form.hidden_tag() }}
{{ security_settings_form.submit_security_settings(class="btn btn-warning") }}

Master API Key

Keep this key secret; rotate it if exposed.

OAuth Authentication

Configure OAuth providers to allow users to log in with third-party services like Google, GitHub, or Microsoft.

OAuth Settings

{{ security_settings_form.oauth_session_timeout(class="input input-bordered input-sm", **{'id': 'oauth_session_timeout'}) }}

OAuth Providers

No OAuth providers configured. Click "Add Provider" to get started.

Authorized Users

Only users with email addresses listed here will be allowed to authenticate via OAuth.

No authorized users configured. Click "Add User" to authorize email addresses.

Password Reset

Tunnel & Agent Status

{% if agent_state.last_action_status or tunnel_state.get('error') %} {% set alert_message = agent_state.last_action_status or tunnel_state.status_message %} {% set is_error = 'Error:' in alert_message or tunnel_state.get('error') %} {% set alert_type = 'alert-error' if is_error else 'alert-info' %} {% endif %}

Tunnel Details

Desired Name: {{ tunnel_state.name }}

Tunnel ID: {{ tunnel_state.id if tunnel_state.id else 'N/A' }}

{% if not external_cloudflared %}

Tunnel Token: {{ display_token }}

{% endif %}

Agent Control

{% if external_cloudflared %}
External Mode: Active
{% else %}
Agent Status: {% set indicator_color = 'bg-gray-400' %} {% if agent_state.container_status == 'running' %} {% set indicator_color = 'badge-success' %} {% elif agent_state.container_status in ['exited', 'dead', 'not_found'] %} {% set indicator_color = 'badge-error' %} {% else %} {% set indicator_color = 'badge-warning' %} {% endif %} {{ agent_state.container_status | replace('_',' ') }}
{% if agent_state.container_status=='running' %}
{% else %}
{% endif %}
{% endif %}
{% endblock %} {% block scripts %} {{ super() }} {% endblock %}