---
title: Install XRay packages
description: 
---

## Clean up old repositories

If you used our v2Ray instructions previously, you will have to clean up the repository we added at that time:

```
rm /etc/opkg/customfeeds.conf
opkg update
opkg remove v2ray-core
```

## Update repositories

Update the OpenWRT repositories using the ```opkg update``` command.

You'll see something like this:

```
root@OpenWrt:~# opkg update

Downloading https://downloads.openwrt.org/releases/21.02.1/targets/mvebu/cortexa9/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading https://downloads.openwrt.org/releases/21.02.1/targets/mvebu/cortexa9/packages/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/21.02.1/packages/arm_cortex-a9_vfpv3-d16/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading https://downloads.openwrt.org/releases/21.02.1/packages/arm_cortex-a9_vfpv3-d16/base/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/21.02.1/packages/arm_cortex-a9_vfpv3-d16/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_luci
Downloading https://downloads.openwrt.org/releases/21.02.1/packages/arm_cortex-a9_vfpv3-d16/luci/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/21.02.1/packages/arm_cortex-a9_vfpv3-d16/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_packages
Downloading https://downloads.openwrt.org/releases/21.02.1/packages/arm_cortex-a9_vfpv3-d16/packages/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/21.02.1/packages/arm_cortex-a9_vfpv3-d16/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading https://downloads.openwrt.org/releases/21.02.1/packages/arm_cortex-a9_vfpv3-d16/routing/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/21.02.1/packages/arm_cortex-a9_vfpv3-d16/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_telephony
Downloading https://downloads.openwrt.org/releases/21.02.1/packages/arm_cortex-a9_vfpv3-d16/telephony/Packages.sig
Signature check passed.

root@OpenWrt:~# 
```

## Upgrade dnsmasq

Before installing Xray we need to replace **dnsmasq** with **dnsmasq-full**:

```
opkg remove dnsmasq
opkg install dnsmasq-full
```

(If you've followed our instructions before, you may have already done this.)

## Install XRay core packages

Install the xray-core packages using the ```opkg install xray-core xray-geodata``` commmand.

```
root@OpenWrt:~# opkg install xray-core xray-geodata

Installing xray-core (1.5.3-1) to root...
Downloading https://downloads.openwrt.org/releases/21.02.1/packages/arm_cortex-a9_vfpv3-d16/packages/xray-core_1.5.3-1_arm_cortex-a9_vfpv3-d16.ipk
Configuring xray-core.

Installing xray-geodata (1.5.3-1) to root...
Downloading https://downloads.openwrt.org/releases/21.02.1/packages/arm_cortex-a9_vfpv3-d16/packages/xray-geodata_1.5.3-1_all.ipk
Configuring xray-geodata.

root@OpenWrt:~# 
```

## OpenWRT 21.03: Lucy package

(Need 22.03? Scroll down.)

Download the package using ```https://blockthis.xyz/storage/v2ray/luci-app-xray_1.15.0-1_all.ipk```, then install it using ```opkg install luci-app-xray_1.15.0-1_all.ipk```

```
root@OpenWrt:~# wget https://blockthis.xyz/storage/v2ray/luci-app-xray_1.15.0-1_all.ipk

Downloading 'https://blockthis.xyz/storage/v2ray/luci-app-xray_1.15.0-1_all.ipk'
Connecting to 43.154.208.212:443
Writing to 'luci-app-xray_1.5.2-1_all.ipk'
luci-app-xray_1.15.0- 100% |*******************************| 16628   0:00:00 ETA
Download completed (16628 bytes)

root@OpenWrt:~# opkg install luci-app-xray_1.15.0-1_all.ipk

Installing luci-app-xray (1.15.0-1) to root...
...
```

You may notice an error there at the end. This particular error can safely be ignored. (Other errors may indicate a real issue.)

## OpenWRT 22.03: Lucy package

Download the package using ```https://blockthis.xyz/storage/v2ray/luci-app-xray_1.16.1-1_all.ipk```, then install it using ```opkg install luci-app-xray_1.16.1-1_all.ipk```

```
root@OpenWrt:~# wget https://blockthis.xyz/storage/v2ray/luci-app-xray_1.16.1-1_all.ipk

Downloading 'https://blockthis.xyz/storage/v2ray/luci-app-xray_1.16.1-1_all.ipk'
Connecting to 43.154.208.212:443
Writing to 'luci-app-xray_1.16.1-1_all.ipk'
luci-app-xray_1.16.1- 100% |*******************************| 16628   0:00:00 ETA
Download completed (16628 bytes)

root@OpenWrt:~# opkg install luci-app-xray_1.16.1-1_all.ipk

Installing luci-app-xray (1.16.1-1) to root...
...
```