Skip to content

Install

go-compile edited this page Sep 7, 2023 · 7 revisions

How To Install Localrelay

Supported platforms

  • Windows amd64, 32bit: zip (with exe) or msi
  • Linux amd64, 32bit, arm64: tar.gz, deb, termux.deb, rpm, zst
  • Mac/Darwin amd64, arm64: tar.gz
  • Android (use linux's arm64 tar.gz)
  • FreeBSD, NetBSD, OpenBSD, Solaris (check releases)

Install On Windows

It is highly recommended to INSTALL THE MSI INSTALLER instead of downloading the zip containing the exe. If you do not know how to securely setup Window's service permissions please use the msi. Otherwise you are solely responsible for the security of your installation.

Installation & Updating

  1. Download localrelay.msi
  2. Execute the installer.
  3. Open a new terminal and run localrelay start or localrelay restart

Install Using Choco (Windows)

choco install localrelay

Install On Linux

You can either use your built in packaging system or use the following universal install guide.

Universal Linux Guide

# Create tmp dir
mkdir ./tmp
# Download amd64 bit localrelay
wget -O ./tmp/localrelay.tar.gz https://github.com/go-compile/localrelay/releases/latest/download/localrelay_Linux_x86_64.tar.gz

# Extract archive
tar -xvf ./tmp/localrelay.tar.gz -C ./tmp/

# Give the binary executable permissions
chmod +x ./tmp/localrelay

# Change the owner user and group to root
sudo chown root:root ./tmp/localrelay

sudo mv ./tmp/localrelay /usr/bin/

# Clean up
rm -rf ./tmp

# Install as service
sudo localrelay install
sudo localrelay start

Universal Arm64 Linux Guide

# Create tmp dir
mkdir ./tmp
# Download arm64 bit localrelay
wget -O ./tmp/localrelay.tar.gz https://github.com/go-compile/localrelay/releases/latest/download/localrelay_Linux_arm64.tar.gz

# Extract archive
tar -xvf ./tmp/localrelay.tar.gz -C ./tmp/

# Give the binary executable permissions
chmod +x ./tmp/localrelay

# Change the owner user and group to root
sudo chown root:root ./tmp/localrelay

sudo mv ./tmp/localrelay /usr/bin/

# Clean up
rm -rf ./tmp

# Install as service
sudo localrelay install
sudo localrelay start

Install On Android

  1. Install Termux on your Android device.
  2. Execute the following:
mkdir ./tmp
# Download arm64 bit localrelay
wget -O ./tmp/localrelay.tar.gz https://github.com/go-compile/localrelay/releases/latest/download/localrelay_Linux_arm64.tar.gz

# Extract archive
tar -xvf ./tmp/localrelay.tar.gz -C ./tmp/

mv ./tmp/localrelay ./
rm -rf ./tmp

# Give the binary executable permissions
chmod +x ./localrelay

# Create a location for your localrelay configs
# Store all your relays in this folder.
mkdir ./lr-config

# verify execution
./localrelay version

Android Start At Boot

  1. Install Termux:boot on your Android device.
  2. Open Termux and use either nano or vim to create:
~/.termux/boot/localrelay.sh
  1. Write the following content to the above file:
./localrelay run ~/lr-config/*.toml
  1. Make the shell script executable:
chmod +x ~/.termux/boot/localrelay.sh

Docker Compose

View on Dockerhub. Supported arches: amd64,arm64,arm/v7. Compressed image size: <3mb. Super small light weight, low CPU, RAM and disk usage container perfect for low power devices.

docker-compose.yaml

version: "3"
services:
  localrelay:
    container_name: localrelay
    image: gocompile/localrelay:latest
    hosts: 
      - 8080:8080
      - 80:80
    restart: unless-stopped
    volumes:
      - ./localrelay:/etc/localrelay:ro

OR

version: "3"
services:
  localrelay:
    container_name: localrelay
    image: gocompile/localrelay:latest
    network_mode: "host"
    restart: unless-stopped
    volumes:
      - ./localrelay:/etc/localrelay:ro
docker-compose up -d

Place your relay configs in ./localrelay/. The configs will be loaded when the relay starts.