docs: add telegram oauth guide

This commit is contained in:
kastov
2025-05-09 18:30:07 +03:00
parent 2c3b453d9b
commit e6168f8dcf
2 changed files with 55 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
---
sidebar_position: 3
title: Telegram OAuth
---
<div style={{ display: 'flex', justifyContent: 'center' }}>
<img src="/features/tg-login/tg-login-preview.webp" alt="Telegram OAuth" width="800" style={{ borderRadius: '8px' }} />
</div>
---
Telegram OAuth is a feature that allows you to authenticate to Remnawave dashboard using Telegram.
### .env configuration
```bash title="Editing .env file"
cd ~/opt/remnawave && nano .env
```
```bash title=".env configuration"
# Your Telegram bot token, you can get it from @BotFather
# If it already defined in .env, you can skip this step
TELEGRAM_BOT_TOKEN="1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZ"
# Enable Telegram OAuth
TELEGRAM_OAUTH_ENABLED=true
# List of admin IDs (numbers, not strings), separated by commas
TELEGRAM_OAUTH_ADMIN_IDS=[1234567890, 1234567891]
```
`TELEGRAM_OAUTH_ADMIN_IDS` - manages the list of admins who can access the Remnawave dashboard.
### How to get Telegram bot token
1. Go to [@BotFather](https://t.me/BotFather)
2. Create a new bot and get the token
3. Set the token in the `.env` file
### Setting up the bot
:::danger
It is necessary to set the domain under which you log in to the Remnawave dashboard.
:::
1. Go to [@BotFather](https://t.me/BotFather)
2. Send command `/mybots` and select previous created bot
3. Select option `Bot settings` → `Domain`
4. Select option `Set domain`
Now you need to send a message containing domain under which you log in to the Remnawave dashboard.
```bash
https://panel.domain.com
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB