Skip to content

Installation

Sudo Dios edited this page Oct 25, 2024 · 2 revisions

Install using prebuilt binaries

  1. Download the appropriate binary file from the releases page.
  2. Unzip the archive.
  3. Make changes to the configuration.
  4. Run the binary.
  5. Or setup as service :
    • Copy setup_systemd.sh on linux or setup_sc_win.bat on windows system in extracted folder.
    • Run the script file to setup as service

Deb packages (for easier use in Debian based Linuxes)

  1. Download the deb package file from the releases page.

  2. Install it.

  3. Enable systemd service:

    $ sudo systemctl enable librespeed-rs.service
  4. Edit configs file:

    $ sudo nano /var/lib/librespeed-rs/configs.toml
  5. User systemd to easy manage librespeed service:

    $ sudo service librespeed-rs start
    $ sudo service librespeed-rs stop
    $ sudo service librespeed-rs status
    # and more ...

Build with docker

  1. Install docker and docker-compose.

  2. Clone the repository:

    $ git clone https://github.com/librespeed/speedtest-rust.git
    $ cd speedtest-rust
  3. Copy the default config and assets:

    $ cp docker-compose.override.sample.yml docker-compose.override.yml
    $ sudo mkdir /var/lib/librespeed
    $ sudo cp configs.toml /etc/librespeed.toml
    $ sudo cp -r assets /var/lib/librespeed/assets
  4. Edit the config files:

    $ sudo chmod o-rwx /etc/librespeed.toml docker-compose.override.yml # Hide secrets
    $ $EDITOR docker-compose.override.yml # Docker settings
    $ sudo $EDITOR /etc/librespeed.toml # Librespeed settings
    $ sudo $EDITOR /var/lib/librespeed/assets/servers_list.js # To set server name and remote servers
    $ sudo $EDITOR /var/lib/librespeed/assets/index.html # To change html styles, etc
  5. Start the container:

    $ docker compose up -d
    $ docker compose logs -f # To check status
  6. Navigate to http://localhost:8080/

Compile from source

You need Rust 1.74+ to compile project.
So make sure that rust is properly installed on your system

  1. Clone the repository:

    $ git clone https://github.com/librespeed/speedtest-rust.git
    
  2. Build:

    # cd to cloned directory
    $ cargo build --release
    
  3. Prepare files:

    # Make a new directory
    # Copy target/release/librespeed-rs to created directory
    # Copy configs.toml to created directory
    # If you want the server to load the speedtest web front in the route `/`,
      then you must specify the path of the client folder in the configs.toml file.