☀️ 🌙

Management & Troubleshooting

Manage your server and solve common problems.

Essential Management Commands

Check Service Status

sudo systemctl status xray
sudo systemctl status nginx

Restart Services

sudo systemctl restart xray
sudo systemctl restart nginx

View Live Logs

sudo journalctl -u xray -f --no-pager

Update X-ray Core

bash /usr/local/share/xray/install-release.sh

Frequently Asked Questions

Q: My client can't connect. What should I check?

  1. Check Firewall: Make sure port 80 (TCP) is allowed in your VPS provider's firewall (e.g., Hetzner Cloud Console). This is the most common issue.
  2. Check IP and UUID: Double-check that the IP address and UUID in your client app exactly match your server's details.
  3. Check Logs: Use `sudo journalctl -u xray -f` while trying to connect. If you see an error, it will tell you what's wrong.

Q: How do I add a second user?

Edit the X-ray config file (`/usr/local/etc/xray/config.json`) and add another client object to the `clients` array. Generate a new, unique UUID for the second user.

"clients": [
    {
        "id": "FIRST_USER_UUID"
    },
    {
        "id": "SECOND_USER_UUID"
    }
],

Performance & Tuning

1. Benchmark Your Speed

First, test your server's raw internet speed by running a command-line speed test on the server itself.

# Install the speedtest CLI
sudo apt install speedtest-cli -y
# Run the test
speedtest-cli

Then, use a service like Speedtest.net on your computer or phone, once without the VPN and once with it, to see the performance difference.

2. Enable BBR for Higher Throughput

Google's BBR is a modern network congestion control algorithm that can significantly improve connection speed and reduce latency. It's built into most modern Linux kernels. Run this one command to enable it:

sudo bash -c 'echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf && echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf && sysctl -p'

You may need to reboot your server for this to take full effect.