You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also, how do I set up a Telegram bot, where can I get webhooks, etc.? Is there a bot with commands like in Marzban? Can I change/add to some buttons in the bot, and if so, how and where?
The marzban sub templates not work on pasarguard you use our template
PasarGuard/subscription-template
Also, how do I set up a Telegram bot, where can I get webhooks, etc.? Is there a bot with commands like in Marzban? Can I change/add to some buttons in the bot, and if so, how and where?
Шаблоны подпрограмм Marzban не работают на Pasarguard. Вы используете наш шаблон.
PasarGuard/subscription-template
Также, как настроить бота для Telegram, где взять вебхуки и т.д.? Есть ли бот с командами, как в Marzban? Можно ли изменить/добавить некоторые кнопки в боте, и если да, то как и где?
вы можете использовать свой домен панели для адреса вебхука
Hello,
I am using the Pasarguard panel, and after connecting my Telegram bot and restarting the panel, the following errors appear in the logs:
timescaledb-1 |
timescaledb-1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
timescaledb-1 |
timescaledb-1 | 2025-10-24 20:39:47.948 UTC [1] LOG: starting PostgreSQL 17.6 on x86_64-pc-linux-musl, compiled by gcc (Alpine 14.2.0) 14.2.0, 64-bit
timescaledb-1 | 2025-10-24 20:39:47.948 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
timescaledb-1 | 2025-10-24 20:39:47.948 UTC [1] LOG: listening on IPv6 address "::", port 5432
timescaledb-1 | 2025-10-24 20:39:47.959 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
timescaledb-1 | 2025-10-24 20:39:47.971 UTC [27] LOG: database system was shut down at 2025-10-24 20:39:47 UTC
timescaledb-1 | 2025-10-24 20:39:47.981 UTC [1] LOG: database system is ready to accept connections
timescaledb-1 | 2025-10-24 20:39:47.982 UTC [30] LOG: TimescaleDB background worker launcher connected to shared catalogs
pgadmin | postfix/postlog: starting the Postfix mail system
pgadmin | /venv/lib/python3.12/site-packages/passlib/pwd.py:16: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
pgadmin | import pkg_resources
pasarguard-1 | INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
pasarguard-1 | INFO [alembic.runtime.migration] Will assume transactional DDL.
pgadmin | /venv/lib/python3.12/site-packages/passlib/pwd.py:16: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
pgadmin | import pkg_resources
pgadmin | [2025-10-24 20:40:15 +0000] [1] [INFO] Starting gunicorn 23.0.0
pgadmin | [2025-10-24 20:40:15 +0000] [1] [INFO] Listening at: http://[::]:8010 (1)
pgadmin | [2025-10-24 20:40:15 +0000] [1] [INFO] Using worker: gthread
pgadmin | [2025-10-24 20:40:15 +0000] [88] [INFO] Booting worker with pid: 88
pasarguard-1 | INFO: 2025-10-24 20:40:16,246 - Started server process [8]
pasarguard-1 | INFO: 2025-10-24 20:40:16,247 - Waiting for application startup.
pasarguard-1 | INFO: 2025-10-24 20:40:16,455 - Telegram-bot - Telegram bot starting
pasarguard-1 | INFO: 2025-10-24 20:40:16,484 - Telegram-bot - https://my.domain.org:8443/webhook/api/tghook
pasarguard-1 | ERROR: 2025-10-24 20:40:17,539 - Telegram-bot - Bad Request: bad webhook: Failed to resolve host: Temporary failure in name resolution
pasarguard-1 | ERROR: 2025-10-24 20:40:18,080 - Notification - Telegram message failed: 400 - {"ok":false,"error_code":400,"description":"Bad Request: chat not found"}
@app.route(WEBHOOK_PATH, methods=["POST"])
def webhook():
secret = request.headers.get("X-Telegram-Bot-Api-Secret-Token")
if WEBHOOK_SECRET and secret != WEBHOOK_SECRET:
abort(403) # Access denied if secret does not match
try:
update = telegram.Update.de_json(request.get_json(force=True), bot)
if update is not None and update.message is not None:
chat_id = update.message.chat.id
bot.send_message(chat_id=chat_id, text="Bot works via webhook!")
else:
logging.info("Received update without message – skipping")
return "OK"
except Exception as e:
logging.exception("Error processing webhook")
abort(500)
if name == "main":
context = ('/var/lib/pasarguard/certs/fullchain.pem', '/var/lib/pasarguard/certs/priv.key')
app.run(host="0.0.0.0", port=8443, ssl_context=context)
Activity
ImMohammad20000 commentedon Oct 24, 2025
The marzban sub templates not work on pasarguard you use our template
PasarGuard/subscription-template
you can use your panel domain for webhook address
Cid0r0v1ch commentedon Oct 24, 2025
Hello,
I am using the Pasarguard panel, and after connecting my Telegram bot and restarting the panel, the following errors appear in the logs:
timescaledb-1 |
timescaledb-1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
timescaledb-1 |
timescaledb-1 | 2025-10-24 20:39:47.948 UTC [1] LOG: starting PostgreSQL 17.6 on x86_64-pc-linux-musl, compiled by gcc (Alpine 14.2.0) 14.2.0, 64-bit
timescaledb-1 | 2025-10-24 20:39:47.948 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
timescaledb-1 | 2025-10-24 20:39:47.948 UTC [1] LOG: listening on IPv6 address "::", port 5432
timescaledb-1 | 2025-10-24 20:39:47.959 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
timescaledb-1 | 2025-10-24 20:39:47.971 UTC [27] LOG: database system was shut down at 2025-10-24 20:39:47 UTC
timescaledb-1 | 2025-10-24 20:39:47.981 UTC [1] LOG: database system is ready to accept connections
timescaledb-1 | 2025-10-24 20:39:47.982 UTC [30] LOG: TimescaleDB background worker launcher connected to shared catalogs
pgadmin | postfix/postlog: starting the Postfix mail system
pgadmin | /venv/lib/python3.12/site-packages/passlib/pwd.py:16: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
pgadmin | import pkg_resources
pasarguard-1 | INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
pasarguard-1 | INFO [alembic.runtime.migration] Will assume transactional DDL.
pgadmin | /venv/lib/python3.12/site-packages/passlib/pwd.py:16: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
pgadmin | import pkg_resources
pgadmin | [2025-10-24 20:40:15 +0000] [1] [INFO] Starting gunicorn 23.0.0
pgadmin | [2025-10-24 20:40:15 +0000] [1] [INFO] Listening at: http://[::]:8010 (1)
pgadmin | [2025-10-24 20:40:15 +0000] [1] [INFO] Using worker: gthread
pgadmin | [2025-10-24 20:40:15 +0000] [88] [INFO] Booting worker with pid: 88
pasarguard-1 | INFO: 2025-10-24 20:40:16,246 - Started server process [8]
pasarguard-1 | INFO: 2025-10-24 20:40:16,247 - Waiting for application startup.
pasarguard-1 | INFO: 2025-10-24 20:40:16,455 - Telegram-bot - Telegram bot starting
pasarguard-1 | INFO: 2025-10-24 20:40:16,484 - Telegram-bot - https://my.domain.org:8443/webhook/api/tghook
pasarguard-1 | ERROR: 2025-10-24 20:40:17,539 - Telegram-bot - Bad Request: bad webhook: Failed to resolve host: Temporary failure in name resolution
pasarguard-1 | ERROR: 2025-10-24 20:40:18,080 - Notification - Telegram message failed: 400 - {"ok":false,"error_code":400,"description":"Bad Request: chat not found"}
I would also appreciate any recommendations for fixing the “Chat not found” error in Telegram messages. In addition, it is worth paying attention to warnings related to the use of the outdated pkg_resources library, which is scheduled to be removed in the near future at https://setuptools.pypa.io/en/latest/pkg_resources.html. You may need to update dependencies or use alternative libraries.
Below is my Python script:
from flask import Flask, request, abort
import telegram
import logging
TOKEN = "Your_Telegram_Bot_Token"
WEBHOOK_PATH = "/webhook"
WEBHOOK_SECRET = "Your_Webhook_Secret"
app = Flask(name)
bot = telegram.Bot(token=TOKEN)
@app.route(WEBHOOK_PATH, methods=["POST"])
def webhook():
secret = request.headers.get("X-Telegram-Bot-Api-Secret-Token")
if WEBHOOK_SECRET and secret != WEBHOOK_SECRET:
abort(403) # Access denied if secret does not match
try:
update = telegram.Update.de_json(request.get_json(force=True), bot)
if update is not None and update.message is not None:
chat_id = update.message.chat.id
bot.send_message(chat_id=chat_id, text="Bot works via webhook!")
else:
logging.info("Received update without message – skipping")
return "OK"
except Exception as e:
logging.exception("Error processing webhook")
abort(500)
if name == "main":
context = ('/var/lib/pasarguard/certs/fullchain.pem', '/var/lib/pasarguard/certs/priv.key')
app.run(host="0.0.0.0", port=8443, ssl_context=context)
Thank you very much!
ci(upstream): read every ledger entry and heading as the text a revie…
docs(upstream): hold every dev-only upstream commit and decide upstre…
re-decide: keep the eight node port-queue rows of 2026-11-08 owed unt…