forked from xtrime-ru/TelegramApiServer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.env.example
81 lines (70 loc) · 2.57 KB
/
.env.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# ENV file version
# Check for outdated .env files
VERSION=1
# IP that server listens for requests.
# To recieve requests from the Internet change to 0.0.0.0 and add rule to your firewall (THIS WILL MAKE API UNSECURE!)
SERVER_ADDRESS=127.0.0.1
SERVER_PORT=9503
# If you use nginx, then provide here name of client header. for example x-real-ip or x-forwarded-for
REAL_IP_HEADER=
MEMORY_LIMIT=256M
TIMEZONE=UTC
# REQUEST WILL BE GROUPED INTO BULKS AND EXECUTED AS SINGLE BULK
# VALUE IN SECOND
# DECREASE TO REDUCE LATENCY, INCREASE TO REDUCE LOAD ON SERVER.
# SET to 0 to DISABLE
REQUESTS_BULK_INTERVAL=0.0
# List of allowed clients. Separate with comma.
# Leave blanc, to allow requests from all IP (THIS WILL MAKE API UNSECURE!)
IP_WHITELIST=127.0.0.1
# Allow requests from any IP with given user and password
# Example: {"myusername": "mySuperStrongPassword", "otherName": "otherPassword"}
PASSWORDS={}
# TELEGRAM CLIENT
TELEGRAM_API_ID=
TELEGRAM_API_HASH=
# FATAL_ERROR = 0; ERROR = 1; WARNING = 2; const NOTICE = 3; VERBOSE = 4; ULTRA_VERBOSE = 5;
LOGGER_LEVEL=2
# TELEGRAM SOCKS5 PROXY (optional)
TELEGRAM_PROXY_ADDRESS=
TELEGRAM_PROXY_PORT=
TELEGRAM_PROXY_USERNAME=
TELEGRAM_PROXY_PASSWORD=
# DB
# memory
# Keep all data in memory/session file.
# This is default behavior
# mysql
# Keep part of data in mysql database.
# Reduce memory consumption and session size. Beta function.
# MariaDb + InnoDb Preffered.
# Tables and DB will be created if not exists.
# Change this type to convert session:
DB_TYPE=memory
# MYSQL Settings. Required, when DB_TYPE=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_USER=root
DB_PASSWORD=
DB_DATABASE=MadelineProto
DB_MAX_CONNECTIONS=10
DB_IDLE_TIMEOUT=60
# Recent data will be stored in memory this amount of time:
DB_CACHE_TTL="+5 minutes"
# Options: serialize, igbinary
DB_SERIALIZER=serialize
# Enable to add cache info about users to database. Disable if you only read data from channels.
DB_ENABLE_MIN_DATABASE=0
# Enable file metadata cache
DB_ENABLE_FILE_REFERENCE_DATABASE=0
PROMETHEUS_ENABLE=0
PROMETHEUS_BIND_TO=0.0.0.0:12345
ERROR_NOTIFICATION_BOT_TOKEN=
#User id or Chat id or username of the target channel to send error messages. Comma separated
#Example: 123456,@sometestchannel
ERROR_NOTIFICATION_PEERS=
#Prepend backtrace with custom text to distinct messages from different instances in your bot
#Use html formatting style: https://core.telegram.org/bots/api#formatting-options
ERROR_NOTIFICATION_PREFIX="TelegramApiServer fatal error"
# Program will continue to work after fatal error (not recommended)
RESUME_ON_ERROR=0