How to Set Up Xray-core VPN on MikroTik hAP ax³ Router

Hi everyone,

I’m looking for advice from anyone who has experience running Xray-core VPN on a MikroTik hAP ax³ router.

I’ve spent a fair amount of time testing the VPN options built into RouterOS, specifically WireGuard and L2TP/IPsec. While both are stable and function correctly, I consistently observe a significant performance impact, with internet speeds reduced by approximately 20–40% once the VPN tunnel is active.

To isolate the cause, I tested:

  • Multiple VPN providers (both free and paid)
  • Different encryption and configuration profiles
  • A self-hosted VPN setup

Across all scenarios, the speed degradation remained consistent, which suggests the performance impact is primarily related to the VPN protocol itself and the way different protocols are handled by RouterOS, rather than the VPN provider.

In comparison, when I run Xray-core VPN, the connection remains stable and the speed reduction is limited to around 5–7%, which I consider reasonable and acceptable for encrypted traffic. This makes Xray-core a much better fit for my use case.

After reviewing the MikroTik and Xray-core documentation, it appears that running Xray-core inside a Docker container on the hAP ax³ may be possible. However, I haven’t found clear, real-world examples or step-by-step guidance specific to this router model.

Before attempting a custom container-based deployment, I wanted to ask:

  • Has anyone successfully run Xray-core on a MikroTik hAP ax³?
  • Are there any known limitations, performance concerns, or best practices?
  • Is there a simpler or more recommended approach than using Docker?

Any shared experience, documentation, or configuration guidance would be greatly appreciated.

Thank you in advance

Topic locked.
There is an active discussion here (by the same author BTW):