> For the complete documentation index, see [llms.txt](https://vitrina-blogerov.gitbook.io/bloggers-showcase/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vitrina-blogerov.gitbook.io/bloggers-showcase/product-docs/product-docs-en/change-administrator.md).

# Change administrator

## Utilities. Changing the administrator

The administrator is changed using a script `reset_admin.py`, which is included in every language version of the application.

The utility is needed if the administrator password is lost, a new administrator needs to be created, or the owner's access needs to be replaced.

{% hint style="info" %}
This is a utility for the web admin panel. It does not change the bot's Telegram administrators and does not affect the list of Telegram IDs.
{% endhint %}

### Command

The command is run inside the backend container of the required language version.

{% tabs %}
{% tab title="RU" %}

```bash
cd /opt/bloggers_platform/apps/ru
sudo docker compose -p bloggers_ru -f docker-compose.yml -f docker-compose.edge.yml exec -T backend python reset_admin.py new_admin new_password
```

{% endtab %}

{% tab title="EN" %}

```bash
cd /opt/bloggers_platform/apps/en
sudo docker compose -p bloggers_en -f docker-compose.yml -f docker-compose.edge.yml exec -T backend python reset_admin.py new_admin new_password
```

{% endtab %}

{% tab title="ZH" %}

```bash
cd /opt/bloggers_platform/apps/zh
sudo docker compose -p bloggers_zh -f docker-compose.yml -f docker-compose.edge.yml exec -T backend python reset_admin.py new_admin new_password
```

{% endtab %}

{% tab title="AR" %}

```bash
cd /opt/bloggers_platform/apps/ar
sudo docker compose -p bloggers_ar -f docker-compose.yml -f docker-compose.edge.yml exec -T backend python reset_admin.py new_admin new_password
```

{% endtab %}
{% endtabs %}

In the commands `new_admin` and `new_password` need to be replaced with the new username and password.

{% hint style="warning" %}
Use a strong password. Access to the web admin panel allows you to change cards, storefront settings, the Telegram token, AI settings, and other important parameters.
{% endhint %}

### What the utility does

The utility looks for an administrator with the specified login in the database of the selected language version.

{% tabs %}
{% tab title="Admin found" %}
If such an administrator already exists, the utility changes their password.
{% endtab %}

{% tab title="Admin not found" %}
If there is no such administrator, the utility creates a new administrator with the specified login and password.
{% endtab %}
{% endtabs %}

The password is stored not in plain text, but as a protected hash.

### What is important to know

Administrators are stored separately in each language version. If you need to change access in several versions at once, the command must be run separately for each version.

Old sessions in the browser may remain active until the token expires. After changing the password, it is better to log out of the admin panel and log in again.

<details>

<summary>Why the command is run inside the backend container</summary>

The script uses the application environment and connects to the database of the selected language version just like the backend. Therefore, the command is run via `docker compose exec backend`.

</details>

### What data is affected

The utility changes only the administrator table of the selected language version.

It does not change:

* blogger cards;
* categories and tags;
* showcase settings;
* Telegram bot token;
* Telegram bot users;
* uploaded files;
* other language versions.

### When to use

The utility is used if the administrator password is lost, the access owner needs to be replaced, or a new administrator needs to be created quickly after installation.

After running the command, log in at the admin panel address of the required version:

```
https://example.com/bloggers/ru/admin
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://vitrina-blogerov.gitbook.io/bloggers-showcase/product-docs/product-docs-en/change-administrator.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
