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

# Deploy to Linux

{% hint style="info" %}
**Recommend:** We request that you fork Crowgram's GitHub repository so your deployed version will be protected.
{% endhint %}

## Prerequisites

To deploy Crowgram, it is necessary to know about the variables mentioned below. Detailed information about these variables is available in the [variables](/crowgram/variables/config-vars.md) section.

```markdown
api_id
api_hash
string
bot_token
assistant_bot
assistant_api_id
assistant_api_hash
assistant_string
owner
log_group
pm_log_location
mention_log_location
```

## Automatic Process

The easiest and our recommended process to install Crowgram is to run the following command in your Linux terminal in your desired directory.

```sh
curl -s https://raw.githubusercontent.com/iniridwanul/Crowgram/master/crowgram.sh > install.sh && bash install.sh && rm install.sh
```

It'll automatically clone the git repository, and will ask you for your variables and do the rest. Here the only dependences for running this command are `wget`, `git` and your Linux shell itself!

For again running the Crowgram, simply run the `crowgram.sh` script inside the git repository.

```sh
bash crowgram.sh
```

## Manual Process

Follow these steps to manually deploy Crowgram.

#### <mark style="color:green;">Clone the Crowgram Repository</mark>

Open your terminal and run the following command to clone the Crowgram repository:

```sh
git clone https://github.com/your_username/Crowgram.git
```

{% hint style="info" %}
In your\_username, you have to give your GitHub username.
{% endhint %}

#### <mark style="color:green;">Navigate to the Crowgram Directory</mark>

Change your current directory to the Crowgram folder:

```sh
cd Crowgram
```

#### <mark style="color:green;">Set Environment Variables</mark>

Export the environment variables using the values you gathered in the prerequisites step. You can set them in the `.env` file provided with the repository:

```sh
echo "api_id=YOUR_API_ID" >> .env
echo "api_hash=YOUR_API_HASH" >> .env
echo "string=YOUR_SESSION_STRING" >> .env
echo "bot_token=YOUR_BOT_TOKEN" >> .env
echo "assistant_bot=YOUR_ASSISTANT_BOT" >> .env
echo "assistant_api_id=ASSISTANT_API_ID" >> .env
echo "assistant_api_hash=ASSISTANT_API_HASH" >> .env
echo "assistant_string=ASSISTANT_SESSION_STRING" >> .env
echo "owner=YOUR_TELEGRAM_USER_ID" >> .env
echo "log_group=YOUR_LOG_GROUP_ID" >> .env
echo "pm_log_location=YOUR_PM_LOG_LOCATION" >> .env
echo "mention_log_location=YOUR_MENTION_LOG_LOCATION" >> .env
```

Replace `YOUR_XXX` with the respective values.

#### <mark style="color:green;">Install Dependencies and start Crowgram</mark>

Run the following command to install the required dependencies and start your own Crowgram:

```sh
bash crowgram.sh
```

Crowgram will initialize and connect to Telegram.

{% hint style="warning" %}
After deploying Crowgram, the `>sethelper` command must be given in any chat, or the Help Menu will not work.
{% endhint %}

#### <mark style="color:green;">Conclusion</mark>

You have successfully installed Crowgram on your Linux machine. Enjoy the enhanced Telegram experience provided by this userbot. If you encounter any issues or have questions, please refer to the Crowgram GitHub repository or reach out to the developer community for assistance.
