Deploy AstrBot from Source Code
WARNING
You are deploying this project directly from source code. This tutorial requires you to have some technical background.
This tutorial assumes Python is already installed on your device with version >=3.10
Download/Clone Repository
If you have git installed on your computer, you can download the source code with the following command:
git clone https://github.com/AstrBotDevs/AstrBot.git
cd AstrBotIf you don't have git installed, please download and install it first.
Alternatively, download the source code directly from GitHub and extract it:

Install Dependencies and Run
【🥳Recommended】Use uv to Manage Dependencies
If
uvis not installed, please refer to Installing uv for installation.
- Execute in terminal (in the AstrBot directory)
uv sync
uv run main.pyInstall Dependencies with Python Built-in venv
In the AstrBot source code directory, run the following command in the terminal:
If on Windows and you downloaded and extracted the source code directly, please open the extracted folder and enter in the address bar:
python3 -m venv ./venvIt might be
pythoninstead ofpython3
The above steps will create and activate a virtual environment (to avoid disrupting your local Python environment).
Next, install the dependencies with the following command, which may take some time:
Execute on Mac/Linux/WSL:
source venv/bin/activate
python -m pip install -r requirements.txt -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
python main.pyExecute on Windows:
venv\Scripts\activate
python -m pip install -r requirements.txt -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
python main.py🎉 All Done!
If everything goes well, you will see logs printed by AstrBot.
If there are no errors, you will see a log message similar to 🌈 Dashboard started, accessible at with several links. Open one of the links to access the AstrBot dashboard. The link is http://localhost:6185.
TIP
If you are deploying AstrBot on a server, you need to replace localhost with your server's IP address.
The default username and password are astrbot and astrbot.
Next, you need to deploy any messaging platform to use AstrBot on that platform.


