#2050·v2rayA

Docker image: v2raya_core cannot find LoyalsoldierSite.dat without XRAY_LOCATION_ASSET

Author: Whys8182Created Sep 23, 2026Updated Sep 23, 2026
Labelsbug

Description

When using the latest Docker image with the bundled v2raya_core, v2rayA reports that geoip.dat, geosite.dat, or v2raya_core may not be installed correctly.

I found that the actual issue is that v2raya_core cannot locate LoyalsoldierSite.dat unless XRAY_LOCATION_ASSET is explicitly set.

Environment

  • v2rayA Docker image: mzz2017/v2raya:latest
  • v2raya_core: 2.5.7 (based on xray-core 26.7.28)
  • Host: Synology DSM 7.x
  • Architecture: x86_64
  • Docker network mode: host

Official Docker command

I initially followed the official Docker installation method:

bash
docker run -d --restart=always --privileged --network=host --name v2raya \
  -e V2RAYA_LOG_FILE=/tmp/v2raya.log \
  -v /lib/modules:/lib/modules:ro \
  -v /etc/resolv.conf:/etc/resolv.conf \
  -v /etc/v2raya:/etc/v2raya \
  ghcr.io/v2raya/v2raya

What I found

The geo files are present inside the container:

/usr/share/v2raya/
├── LoyalsoldierSite.dat
├── geoip.dat
└── geosite.dat

The bundled core is also present and executable:

/usr/bin/v2raya_core
V2RAYA_CORE 2.5.7 (based on xray-core 26.7.28)

However, running the core directly with the generated configuration fails:

bash
/usr/bin/v2raya_core run --config=/etc/v2raya/config.json

with:

Failed to start: main: failed to load config files:
[/etc/v2raya/config.json]
> infra/conf: failed to build routing configuration
> infra/conf: invalid field rule
> common/geodata: illegal domain rule: ext:LoyalsoldierSite.dat:gfw
> common/geodata: failed to open LoyalsoldierSite.dat
> stat /usr/bin/LoyalsoldierSite.dat: no such file or directory

This is unexpected because the file actually exists at:

/usr/share/v2raya/LoyalsoldierSite.dat

Workaround

If I explicitly set:

bash
XRAY_LOCATION_ASSET=/usr/share/v2raya

then the same command successfully loads the configuration:

bash
XRAY_LOCATION_ASSET=/usr/share/v2raya \
/usr/bin/v2raya_core run --config=/etc/v2raya/config.json

The previous LoyalsoldierSite.dat error disappears and the core proceeds to start normally.

The same workaround in Docker Compose is:

yaml
environment:
  - V2RAYA_V2RAY_BIN=/usr/bin/v2raya_core
  - XRAY_LOCATION_ASSET=/usr/share/v2raya
  - V2RAYA_LOG_FILE=/tmp/v2raya.log

After adding XRAY_LOCATION_ASSET=/usr/share/v2raya and recreating the container, the v2rayA web UI no longer shows the warning about geoip.dat, geosite.dat, or v2raya_core.

Expected behavior

The official Docker image should either:

  1. Automatically configure the bundled v2raya_core to use the directory containing its bundled .dat_