{% extends "admin/base_site.html" %} {% load i18n static %} {% block extrastyle %}{{ block.super }} {{ form.media }} {% endblock %} {% block bodyclass %}{{ block.super }} login{% endblock %} {% block branding %}

ArchiveBox Admin

{% endblock %}

{% block usertools %} {% endblock %} {% block nav-global %}{% endblock %} {% block content_title %}
{% if first_admin_setup %} Create your first admin account to continue setup. {% else %} Log in to add, edit, and remove links from your archive. {% endif %}



{% endblock %} {% block breadcrumbs %}{% endblock %} {% block content %} {% if form.errors and not form.non_field_errors %}

{% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}

{% endif %} {% if form.non_field_errors %} {% for error in form.non_field_errors %}

{{ error }}

{% endfor %} {% endif %}
{% if first_admin_setup %}
{% csrf_token %}
{{ form.username.errors }} {{ form.username.label_tag }} {{ form.username }}
{{ form.password1.errors }} {{ form.password1.label_tag }} {{ form.password1 }} {% if form.password1.help_text %}
{{ form.password1.help_text|safe }}
{% endif %}
{{ form.password2.errors }} {{ form.password2.label_tag }} {{ form.password2 }} {% if form.password2.help_text %}
{{ form.password2.help_text|safe }}
{% endif %}
{% else %} {% if user.is_authenticated %}

{% blocktrans trimmed %} You are authenticated as {{ username }}, but are not authorized to access this page. Would you like to login to a different account? {% endblocktrans %}

{% endif %}
{% csrf_token %}
{{ form.username.errors }} {{ form.username.label_tag }} {{ form.username }}
{{ form.password.errors }} {{ form.password.label_tag }} {{ form.password }}
{% endif %} {% if not first_admin_setup %}




To create a new admin user or reset a password, run:
# Docker Compose
docker compose exec archivebox archivebox manage createsuperuser --username <username>
docker compose exec archivebox archivebox manage changepassword <username>

# Native installs (run inside your data folder)
cd data/
archivebox manage createsuperuser --username <username>
archivebox manage changepassword <username>


{% endif %}
{% endblock %}