> For the complete documentation index, see [llms.txt](https://docs.answ3r.hu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.answ3r.hu/installion-and-setup/linux-installation.md).

# Linux Installation

### Instructions: <a href="#instructions" id="instructions"></a>

1. Login to your server through SSH/open your terminal
2. Upload the bot files into a folder of your choice.
3. Make sure you have the required Linux packages installed ([Dependencies](broken://pages/xiHGTNKbyXzdvWt9YGoM#linux-dependencies))
4. Be sure to use the cd < file path > command to change the terminal's path to your bot's directory.
5. Install all node modules, you can do this by running this command `npm install`
6. And then you can run the `node index` command to start the bot.

## PM2 (OPTIONAL)

{% hint style="info" %}
You can use PM2 to keep the bot online even when you close the terminal.
{% endhint %}

### How to use PM2:

Start the bot with PM2 by running the following commands:

```
npm i pm2 -g
npm i
pm2 start index.js --name <botname>
```

### PM2 Power Controls: <a href="#power-controls" id="power-controls"></a>

Start the bot: `pm2 start <botname>`\
Stop the bot: `pm2 stop <botname>`\
Restart the bot: `pm2 restart <botname>`\
View the bot's recent logs and live console: `pm2 logs <botname>`
