Installation via Docker Compose
This guide describes how to install and configure TG Support Bot on a virtual private server (VPS) using Docker Compose.
Prerequisites
Before you begin, make sure the following requirements are met:
- You have a VPS and a registered domain.
- Docker and Docker Compose are installed on the server.
- You have SSH access to the server.
Installation and configuration steps
1. Register a VPS
Register a VPS running Ubuntu with Docker Compose preinstalled. The recommended amount of RAM is at least 1 GB.
For hosting I recommend, for example, Beget.
2. Configure DNS
- Register a domain name.
- Point the domain's DNS records to your server's IP address.
TIP
DNS records usually take 15–20 minutes to update.
3. Prepare the environment on the server
Cloning the repository
Connect to the server over SSH and go to the /home directory:
cd /home/Create a directory for the project and switch to it:
mkdir yourdomain.com && cd yourdomain.comClone the repository. The dot at the end of the command places the files directly in the current directory, without creating a nested folder:
git clone https://github.com/prog-time/tg-support-bot.git .Creating the .env file
Copy the configuration template:
cp .env.example .envOpen the .env file and replace the variable values with real data:
- Domain
MAIN_DOMAIN=example.com
APP_URL=https://example.com- Database credentials
DB_CONNECTION=pgsql
DB_HOST=pgdb
DB_PORT=5432
DB_DATABASE=database_name
DB_USERNAME=username
DB_PASSWORD=passwordIntegration parameters are configured in the admin panel.
4. Start the project
Make sure the .env file specifies the MAIN_DOMAIN parameter — the domain name that will be used by the bot and all of its services.
Run the initial setup script from the project's root directory:
./start.shRunning into problems?
If something goes wrong while running start.sh, take a look at the "Common errors" section or ask a question in the Telegram community - t.me/pt_tg_support.
5. Verifying it works
- Open a browser and go to your domain.
- Make sure the page opens without errors and over the HTTPS protocol.
- Open the page https://{domain}/admin and make sure the authorization form works correctly.
Create the first administrator using the artisan command:
docker exec pet php artisan app:create-admin-userCongratulations
The bot has been installed successfully and is ready to use. Now you need to connect integrations in the "Settings" -> "Integrations" section.