> For the complete documentation index, see [llms.txt](https://elpero.gitbook.io/elpero-documentations/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://elpero.gitbook.io/elpero-documentations/setup/linux.md).

# Linux

## 1. Download the `.rar` file

Provide a link to download the `.rar` file containing everything needed for the Discord bot.

Extract the contents of the `.rar` file into a folder on your Linux system. You can use the following command to extract it:

```bash
unrar x botlicense.rar
```

If `unrar` is not installed, you can install it with:

```bash
sudo apt install unrar
```

## 2. Modify the `.env` configuration file

Inside the extracted folder, you will find a file called `.env`.

```bash
nano .env
```

Input the required details such as your bot token, client ID, etc.

Example configuration:

```properties
TOKEN=
LICENSE_ID=your_license_id_here
DB_HOST=127.0.0.1
DB_PORT=3306
DB_USER=root
DB_PASSWORD=
DB_NAME=license_db
LOG_CREATION_LICENSE=11111111111111111111
LOG_EDIT_LICENSE=11111111111111111111
LOG_DELETE_LICENSE=11111111111111111111
LOG_ERROR_SCRIPT=11111111111111111111
LOG_SCRIPT=11111111111111111111
ADMINS=11111111111111111111,222222222222222222
```

{% hint style="warning" %}
For the license\_id, you need to request the license in the [Discord server.](https://discord.gg/ehQGrZMgrr)
{% endhint %}

## 3. Import the database from `query.sql`

Use a MySQL-compatible tool like `mysql` or `phpMyAdmin` to create and import the database.

You can create a new database and import `query.sql` using these commands:

```bash
mysql -u username -p
CREATE DATABASE license_db;
USE license_db;
SOURCE /path/to/query.sql;
```

## 4. Install dependencies from `requirements.txt`

Open the terminal in the folder where you extracted the files.

Run the following command to install all necessary libraries:

```bash
npm install
```

This will install all the libraries listed in the `requirements.txt` file.

## 5. Run the bot

Once the libraries are installed, you can start the bot with the following command:

```bash
node main.js
```
