Luxor Relay is a stratum-compatible proxy that assists with managing large-scale ASIC deployments. It improves connectivity with Luxor Pool for facilities with poor access to internet.
Relay provides:
- A single connection for up to 65000 miners. This reduces the load on datacenter networking gear.
- Connection redundancy: If the pool disconnects, miners don't drop.
- Lower bandwidth: Relay compresses miner shares by up to 90%.
- Improved efficiency and reduced stale shares resulting in measurable increase in profitability.
- Curated, data-rich insight into stratum statistics. Every share gets accounted for in our custom built dashboards.
- Simple setup: Just install docker and run
docker compose up
. - Multi-tenancy: Supports multiple usernames with a single Relay deployment.
- Low memory footprint: Works on most devices.
Raspberry Pi Setup
To run Relay. we recommend downloading it onto the latest available model Raspberry Pi.
Assembling a Raspberry Pi is extremely simple. First, you want to add the heatsinks to its corresponding chips. Then you can mount the card-sized motherboard into its housing. Finally, you can add a fan for additional heat dissipation.
The final build should look something like this:
Install Raspberry Pi OS
To mount the Raspberry Pi OS into a microSD card, you can use this Raspberry Pi Imager software. This tool will allow you to install any flavour of Raspberry OS and other OS tailored to different use cases.
First, you need to select an OS. We decided to go with Raspberry Pi OS Lite
version which doesn't contain a GUI (Relay does not require one). If you prefer a user-interface you can install the Raspberry Pi OS full-version.
Then you need to select the microSD drive to mount the OS. Finally, click on 'Write' to initiate the installing process. After a few minutes, the microSD card will be ready to go.
Enable WiFi and SSH
Before you remove your microSD card from your computer, you can enable WiFi and SSH capabilities. Enabling WiFi is optional if you have your Raspberry Pi connected to your network through an Ethernet cable.
To enable both WiFi and SSH, we need to add two files to the root folder in the drive/directory on your computer named 'boot'—this is what we will mount the microSD on. You can navigate through Explorer(Windows) or Finder(MacOS) or by using your Terminal/Shell by inputting: cd /Volumes/boot
.
In case you don't want to enable either of these features you can skip the respective file.
WiFi
Using Vim or a plaintext editor like Notepad(Windows) or TextEdit(MacOS) you can create a new file named wpa_supplicant.conf
which contains the following:
country=US # Your 2-digit country code
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
network={
ssid="YOUR_NETWORK_NAME"
psk="YOUR_PASSWORD"
key_mgmt=WPA-PSK
}
Make sure that the files are saved in plaintext and to remove any .txt
extension if your program adds it by default.
SSH
Using your text editor of choice once again, you just need to create an empty flat file named ssh
. If this file exists, your Raspberry Pi will enable SSH during boot time.
The default Raspberry Pi username is pi
and password is raspberry
.
Now you can insert the microSD card back into your Pi and power it on, and SSH into the Pi using the following command:
ssh pi@raspberrypi
If you can't find your Pi through the command above, you can login into your router to get its IP address and SSH into it using this command:
ssh pi@192.168.X.X
Install and Run Relay
We are going to start by updating and upgrading the system to ensure we're installing the latest versions of available software. To do so, run the following command which can take a couple of minutes to complete.
sudo apt-get update && sudo apt-get upgrade
We need Git to pull Relay's repo and any future upgrades. We can install git with the following command:
sudo apt install git
Then we are moving on to sourcing and installing Docker. This can be achived through these two commands:
curl -sSL <https://get.docker.com> | sh
Then you want to add permissions to the current user by inputting:
sudo usermod -aG docker ${USER}
We need to add docker-compose to instantiate Luxor Relay. You build docker-compose with pip3
, so we need to install Python3 first.
sudo apt-get install libffi-dev libssl-dev
sudo apt install python3-dev
sudo apt-get install -y python3 python3-pip
Then we can proceed to install docker-compose:
sudo pip3 install docker-compose
To conclude the Docker installation, we want to enable the Docker system service to start Relay on boot. This is crucial because it will allow us to configure the Pi to start Relay on boot in case there's a power outage.
sudo systemctl enable docker
Once Docker is installed, clone Relay's repo into your local system:
git clone <https://github.com/LuxorLabs/docker-stratum-relay.git>
Then cd
into the root directory:
cd docker-stratum-relay
Finally, you can bootup the entire Luxor Relay stack with docker-compose running:
sudo docker-compose up -d
Luxor Relay comes with a full metrics suite for analyzing share data and hashrate efficiency. We use Grafana and VictoriaMetrics to achieve this. You can access the dashboard once the docker-compose stack is up by going to http://IPADDRESS:3010/d/relay/luxor-relay-metrics
in your browser.
Connect ASICs to Relay Stratum Proxy
Now you're ready to point your SHA256 ASICs to Luxor Relay, you can do that by setting the pool to the machine IP address running Relay and using port 5010
.
Comments
1 comment
This is only for SHA256?
Please sign in to leave a comment.