-
Notifications
You must be signed in to change notification settings - Fork 137
Expand file tree
/
Copy path.env.sample
More file actions
105 lines (87 loc) · 4.62 KB
/
Copy path.env.sample
File metadata and controls
105 lines (87 loc) · 4.62 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
### APP ###
APP_PORT=3000
METRICS_PORT=3001
### API ###
# Possible values: max (start instances on all cores), number (start instances on number of cores), -1 (start instances on all cores - 1)
# !!! Do not set this value more than physical cores count in your machine !!!
# Review documentation: https://docs.rw/docs/install/environment-variables#scaling-api
API_INSTANCES=1
### DATABASE ###
# FORMAT: postgresql://{user}:{password}@{host}:{port}/{database}
DATABASE_URL="postgresql://postgres:postgres@remnawave-db:5432/postgres"
### REDIS ###
REDIS_SOCKET=/var/run/valkey/valkey.sock
# Alternative to REDIS_SOCKET
#REDIS_HOST=
#REDIS_PORT=
### Secrets ###
APP_SECRET=change_me
### TELEGRAM NOTIFICATIONS ###
IS_TELEGRAM_NOTIFICATIONS_ENABLED=false
TELEGRAM_BOT_TOKEN=change_me
# is optional, only if you want to use proxy
# FORMAT: protocol://user:password@host:port, example: socks5://proxy:1080
# TELEGRAM_BOT_PROXY=change_me
### TELEGRAM CHAT IDs in format: "chat_id:thread_id"
# thread_id is optional, only if you want to use topics
# example: "-100123:80" - -100123 is chat_id, 80 is thread_id
# example: "-100123" - -100123 is chat_id, thread_id is not used
TELEGRAM_NOTIFY_USERS=change_me
TELEGRAM_NOTIFY_NODES=change_me
TELEGRAM_NOTIFY_CRM=change_me
TELEGRAM_NOTIFY_SERVICE=change_me
TELEGRAM_NOTIFY_TBLOCKER=change_me
### PANEL DOMAIN ###
PANEL_DOMAIN=panel.domain.com
### FRONT_END ###
# Used by CORS, you can leave it as * or place your domain there
FRONT_END_DOMAIN=*
### SUBSCRIPTION PUBLIC DOMAIN ###
### DOMAIN, WITHOUT HTTP/HTTPS, DO NOT ADD / AT THE END ###
### Used in "profile-web-page-url" response header and in UI/API ###
### Review documentation: https://docs.rw/docs/install/environment-variables#domains
SUB_PUBLIC_DOMAIN=panel.domain.com/api/sub
### If CUSTOM_SUB_PREFIX is set in @remnawave/subscription-page, append the same path to SUB_PUBLIC_DOMAIN. Example: SUB_PUBLIC_DOMAIN=sub-page.example.com/sub
### PROMETHEUS ###
### Metrics are available at http://127.0.0.1:METRICS_PORT/metrics
METRICS_USER=admin
METRICS_PASS=admin
# Webhook configuration
# Enable webhook notifications (true/false, defaults to false if not set or empty)
WEBHOOK_ENABLED=false
# Webhook URL to send notifications to (can specify multiple URLs separated by commas if needed)
# Only http:// or https:// are allowed.
WEBHOOK_URL=https://your-webhook-url.com/endpoint
### This secret is used to sign the webhook payload, must be exact 64 characters. Only a-z, 0-9, A-Z are allowed.
WEBHOOK_SECRET_HEADER=vsmu67Kmg6R8FjIOF1WUY8LWBHie4scdEqrfsKmyf4IAf8dY3nFS0wwYHkhh6ZvQ
### Bandwidth usage reached notifications
BANDWIDTH_USAGE_NOTIFICATIONS_ENABLED=false
# Only in ASC order (example: [60, 80]), must be valid array of integer(min: 25, max: 95) numbers. No more than 5 values.
BANDWIDTH_USAGE_NOTIFICATIONS_THRESHOLD=[60, 80]
### Not connected users notification (webhook, telegram)
NOT_CONNECTED_USERS_NOTIFICATIONS_ENABLED=false
# Only in ASC order (example: [6, 12, 24]), must be valid array of integer(min: 1, max: 168) numbers. No more than 3 values.
# Each value represents HOURS passed after user creation (user.createdAt)
NOT_CONNECTED_USERS_NOTIFICATIONS_AFTER_HOURS=[6, 24, 48]
### Expiration notifications (webhook, telegram)
EXPIRATION_NOTIFICATIONS_ENABLED=false
# Only in ASC order (example: [-72, -48, -24, 24]), must be valid array of non-zero integer numbers.
# Each value represents HOURS relative to user expiration (user.expireAt):
# negative = BEFORE expiration (user expires in N hours), positive = AFTER expiration (user expired N hours ago).
# Range: from -168 to 168 (0 is not allowed). No more than 5 values per side (max 5 negative and 5 positive).
EXPIRATION_NOTIFICATIONS=[-72, -48, -24, 24]
### Export to Redis Streams ###
# Publishes panel events to Redis Streams for external consumers (e.g. ClickHouse via a worker or Vector):
# "ioraw:export:user_usage" — per-node user traffic deltas (fields: v, nodeId, ts, records "userId:totalBytes;...")
# "ioraw:export:subscription_requests" — subscription fetches (fields: v, userId, requestAt, srrResponseType, srrRuleName?, requestIp?, userAgent?)
# "ioraw:export:node_connections" — per-node connection snapshots (fields: v, nodeUuid, ts, users JSON array; retention 1h)
# Message zod schemas: libs/contract/models/export-stream (published in @remnawave/backend-contract).
EXPORT_TO_STREAM_ENABLED=false
# Approximate max number of messages kept in the stream (MAXLEN ~). Oldest messages are trimmed when consumers lag behind.
EXPORT_TO_STREAM_MAXLEN=3000
### Database ###
### For Postgres Docker container ###
# NOT USED BY THE APP ITSELF
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=postgres