===============
Troubleshooting
===============


.. _troubleshooting-autoadmin-account:

Missing automatic admin account after installation
==================================================

This is caused when the ``common_initial_setup`` command is interrupted as
the admin user is created outside of the database migrations.

To create an admin super user account manually use the command:

.. code-block:: console

    MAYAN_MEDIA_ROOT=|MAYAN_MEDIA_ROOT| |MAYAN_BIN| createsuperuser

If you followed the deploying instructions from the documentation your
``MAYAN_MEDIA_ROOT`` will be ``|MAYAN_MEDIA_ROOT|``.

If using a Docker image, execute the command inside the container. First
find you container name with:

.. code-block:: console

    docker ps

Then execute the command inside the container:

.. code-block:: console

    docker exec -ti <your docker container name> |MAYAN_BIN| createsuperuser

Another way to do this is to execute a shell inside the container to get a
command prompt:

.. code-block:: console

    docker exec -ti <your docker container name> /bin/bash

And then execute the command:

.. code-block:: console

    |MAYAN_BIN| createsuperuser
