Server Configuration

Server Installation

This is the server (node) setup instruction.

Onclick Install

Terminal
bash <(curl -Ls https://raw.githubusercontent.com/XMPlusDev/XMRay/script/install.sh)

Node configuration (/etc/XMPlus/config.aml)

ApiHost: "https://api.tld.com" This is the api host address and not frontend address

ApiKey: "123" Your server API Key from pael settings

NodeID: 1 The server(node) id from the panel

Log:
  Level: none                                       # Log level: none, error, warning, info, debug 
  AccessPath:                                       #/etc/XMRay/access.Log
  ErrorPath:                                        #/etc/XMRay/error.log
  DNSLog: false                                     # true or false Whether to enable DNS query log
  MaskAddress: half                                 # half, full, quater
DnsConfigPath:                                      #/etc/XMRay/dns.json - #https://xtls.github.io/config/dns.html
RouteConfigPath:                                    #/etc/XMRay/route.json - #https://xtls.github.io/config/routing.html
OutboundConfigPath:                                 #/etc/XMRay/outbound.json - #https://xtls.github.io/config/outbound.html
ConnectionConfig:
  Handshake: 8 
  ConnIdle: 120 
  UplinkOnly: 0 
  DownlinkOnly: 0 
  BufferSize: 64
ReverbConfig:
  - Enable: false                                   # Enable websocket to trigger real-time subscription and node updates from panel
    Host: "api.xyz.com:443"                         # Reverb REVERB_HOST:REVERB_PORT  in .env for api /home/XMPlusPanel/.env 
    AppKey:                                         # REVERB_APP_KEY in .env for api /home/XMPlusPanel/.env
    AppSecret:                                      # REVERB_APP_SECRET in .env for api /home/XMPlusPanel/.env
    UseTLS: true                                    # Set to true if tls enabled for api
Nodes:
  -
    ApiConfig:
      ApiHost: "https://api.xyz.com"
      ApiKey: "123"
      NodeID: 1
      Timeout: 30 
    ControllerConfig:
      EnableDNS: true                               # Use custom DNS config, Please ensure that you set the dns.json well
      DNSStrategy: AsIs                             # AsIs, UseIP, UseIPv4, UseIPv6
      CertConfig:
        Email: [email protected]                      # Required when Cert Mode is not none
        CertFile: /etc/XMRay/node1.crt              # Required when Cert Mode is file
        KeyFile: /etc/XMRay/node1.key               # Required when Cert Mode is file
        Provider: cloudflare                        # Required when Cert Mode is dns
        CertEnv:                                    # Required when Cert Mode is dns
          CLOUDFLARE_EMAIL:                         # Required when Cert Mode is dns
          CLOUDFLARE_API_KEY:                       # Required when Cert Mode is dns
      EnableFallback: false                         # Only support for Trojan and Vlesshttps://xtls.github.io/config/features/fallback.html
      FallBackConfigs:                              # Support multiple fallbacks
        - SNI:                                      # TLS SNI(Server Name Indication), Empty for any
          Alpn:                                     # Alpn, Empty for any
          Path:                                     # HTTP PATH, Empty for any
          Dest: 80                                  # Required, Destination of fallback.
          ProxyProtocolVer: 0                       # Send PROXY protocol version, 0 for disable
      RedisConfig:
        Enable: false                               # Enable the global ip limit of a user
        Network: tcp                                # Redis protocol, tcp or unix
        Addr: 127.0.0.1:6379                        # Redis server address, or unix socket path
        Username:                                   # Redis username
        Password:                                   # Redis password
        DB: 0                                       # Redis DB
        Timeout: 10                                 # Timeout for redis request

Fallback Config

Refere to xray examples on how to create a fallback with nginx server. Ignore this if you do not know what this is about.

Redis Config

You must use same redis server for all servers (nodes) for global ip limit to work correctly and allow redis port traffic through your firewall.

Global IP Limit (This configuration must be enabled for IP Limiting to work)


RedisConfig:
    Enable: true               # Enable the global ip limit
    Network: tcp               # tcp/unix Leave unchanged (optional)
    Addr: X.X.X.X:6379         # Your api server host or ip and redis port
    Username:                  # Leave empty(optional)
    Password:                  # Redis password is same as in your env file
    DB: 0                      # Leave unchanged (optional)
    Timeout: 10                # Timeout for redis request

This configuration is use to trigger data refetch from panel api when node or subscription changes are made in real-time instead of waiting for the next backend polling.


ReverbConfig:
  - Enable: false              # Enable websocket to trigger real-time subscription and node updates from panel
    Host: "api.xyz.com:443"    # Reverb REVERB_HOST:REVERB_PORT  in .env for api /home/XMPlusPanel/.env 
    AppKey:                    # REVERB_APP_KEY in .env for api /home/XMPlusPanel/.env
    AppSecret:                 # REVERB_APP_SECRET in .env for api /home/XMPlusPanel/.env
    UseTLS: true               # Set to true if tls enabled for api

Copyright © 2026 XMPlus