Installation
In this guide, we will learn how to setup on your local machine. All the data are stoed in local SQLite database. You do not need to setup any external database, wich makes it easier to get started.
Prerequisites
- Node.js (opens in a new tab) (v18 or higher)
- pnpm (opens in a new tab) (v6.14.1 or higher)
- mongoDB (opens in a new tab) (database)
If you want a free MongoDB database, you can use MongoDB Atlas (opens in a new tab).
CLI
Use the following commands to setup BotMate on your machine:
pnpm create botmate
This command will prompt you to specify a folder name (default is "botmate") to initialize a new BotMate project. Subsequently, you will be asked to select your preferred messaging platform. The created folder contains several files and directories; understanding their structure will enhance your ability to work with BotMate, including plugin development.
Next, change your working directory to the project's folder and run pnpm install to install the required dependencies to start BotMate.
Next, create a .env
file in the root directory of the project and add the following environment variables:
You can use openssl rand -hex 16
to generate a secret.
DATABASE_URL=mongodb://localhost:27017/botmate
SECRET=
Now the dependencies are installed, run pnpm dev to start a development server on port 8233. You will be presented with a setup screen, which asks you to select a message platform. Select your bot's messaging platform and enter the require input fields and click submit.
After the setup you should be presented with the dashboard interface.
Repository
You can also clone the BotMate repository and setup the project manually. This method is recommended for developers who want to contribute to the project.
Clone the Repository
git clone https://github.com/botmate/botmate
cd botmate
After cloning the repository, create a .env
file in the root directory of the project and add the following environment variables:
You can use openssl rand -hex 16
to generate a secret.
DATABASE_URL=mongodb://localhost:27017/botmate
SECRET=
Then, install the dependencies and run the development server.
Run development server
pnpm install
pnpm run dev
This will start the BotMate development server on port 8233. Visit (http://localhost:8233 (opens in a new tab)) to access the dashboard.
Docker (Coming soon)
Docker support is coming soon. Stay tuned for updates.