Skip to content

Configuration Reference

VGate splits configuration into file/env-only keys and DB-backed, hot-reloadable keys.

Manager (vgate-manager/config.yml)

File / env only

These cannot be changed at runtime — edit the file (or env) and restart.

KeyEnvDescriptionDefault
server.portSERVER_PORTHTTP listen port for the manager8081
db.dialectDB_DIALECTsqlite or postgressqlite
db.dsnDB_DSNDSN / connection stringSQLite file vgate_manager.db
jwt.secretJWT_SECRETHMAC secret for signing JWTs(required in prod)
admin.bootstrap.usernameBootstrap admin usernameadmin
admin.bootstrap.passwordBootstrap admin password (Docker Compose defaults to change-me; set explicitly)(unset)

DB-backed (hot-reloadable via PUT /api/v1/admin/system-config)

Changed through the API; no restart needed. Merged over the file config on startup.

GroupKeys (examples)
JWTjwt.access_ttl_secs, jwt.refresh_ttl_secs
Logginglog.level, log.format
CORScors.allowed_origins
Timeoutsserver.read_timeout_secs, server.write_timeout_secs
Quota / passwordquota.reset_day, password.min_length, password.require_complexity
Registrationuser.register_enabled, user.register_require_invite, user.register_require_email_verify, user.register_email_suffix_whitelist
Trial accountsuser.trial_enabled, user.trial_quota_bytes, user.trial_duration_days
Invites / siteinvite.default_user_quota, site.name, site.base_url, sub.base_urls
Emailemail.provider, email.enabled, email.from, email.from_name, email.smtp_* / email.resend_*
Captchacaptcha.turnstile_enabled, captcha.turnstile_site_key, captcha.turnstile_secret_key
Telegramtelegram.enabled, telegram.bot_*, telegram.alert_*
Paymentsalipay.*, wechat.*, stripe.*, paypal.* (client id/secret, notify/webhook urls, currency, sandbox), apple.* (issuer/key/bundle id, private key, environment, notify_url, product_map) — configured in System Config → Payment
Traffic remindersreminder.enabled, reminder.pct_threshold, reminder.days_threshold, reminder.cooldown_days
Miscpayment.product_name_template

Server (vgate-server/config.yml)

The node's local config holds only manager-connection and sync settings. All serve-side settings (port, transport, security, flows) come from the manager.

KeyDescriptionExample
admin_apiManager base URLhttp://localhost:8081
node_idNode id assigned in admin consolenode-abc123
node_tokenNode token assigned in admin console****
sync_intervalSeconds between syncs30
log_levelLog verbosityinfo

Frontends (public/env.jsdist/env.js)

Not bundled — edited after build.

VariableMeaning
window.__ENV__.API_BASE_URLEmpty '' → relative /api/v1; or full manager URL.

Per-node serve settings (set in admin console, delivered by manager)

SettingValues
Listen portAny free port on the node host
Transporttcp, ws, xhttp
SecurityTLS / Reality (applied via transport/security.Wrap for tcp)
VLESS flowxtls-rprx-vision (empty = no flow; TCP-only); VLESS v2 AEAD is enabled separately via vless.decryption

viper env mapping The manager maps SERVER_PORT-style environment variables, so you can override file keys with

env vars in containers.

Common defaults (seeded on first start, overridable via system-config): quota.reset_day = 1, password.min_length = 8, invite.default_user_quota = 5, user.trial_enabled = false, user.trial_quota_bytes = 1073741824 (1 GiB), user.trial_duration_days = 7.

Licensed under AGPL-3.0.