How to Install Selenoid on Void Linux

Selenoid is an open-source Selenium Hub replacement developed by Aerokube. It allows running browser tests in Docker containers easily. In this tutorial, we will go through the steps to install Selenoid on Void Linux.

Pre-requisites

Step 1: Installing Selenoid

  1. Login to the system using sudo access and open a terminal.

  2. Run the following command to create a directory to store Selenoid configuration:

    sudo mkdir /etc/selenoid
    
  3. Next, run the following command to download the latest release of Selenoid:

    sudo curl -s https://aerokube.com/selenoid/latest/release-download.sh | bash
    
  4. After the download is complete, extract the file using the following command:

    sudo tar -xvf selenoid_linux_amd64_latest.tar.gz -C /usr/local/bin/
    
  5. Make Selenoid executable by running the following command:

    sudo chmod +x /usr/local/bin/selenoid /usr/local/bin/cm
    
  6. After completing the above-given commands, we need to create a configuration file for Selenoid by running:

    sudo nano /etc/selenoid/browsers.json
    
  7. Add the following JSON Configuration to the file:

    {
    "firefox": {
          "default": "latest",
          "versions": {
                      "86.0": {
                                  "image": "selenoid/firefox:86.0"
                               }
          }
      },
    "chrome": {
          "default": "latest",
          "versions": {
                      "88.0": {
                                  "image": "selenoid/chrome:88.0"
                               }
          }
      }
    }
    

    Note: This configuration includes the support for the latest Chrome and Firefox versions as examples. However, you can add/remove versions for any browser by updating the configuration.

  8. Save the changes and exit the editor.

Step 2: Starting Selenoid

  1. Run the following command to start Selenoid:

    sudo selenoid start --vnc
    

    Note: --vnc flag enables VNC support for Selenoid, which allows connecting to the Docker container via a remote desktop viewer.

  2. After successful start of Selenoid, open your favorite web browser and go to http://localhost:4444/status to verify that Selenoid is running.

  3. If everything is okay, you can now use Selenoid for running browser tests in Docker containers.

Step 3: Stopping Selenoid

  1. To stop Selenoid, run the following command:

    sudo selenoid stop
    

    Note: This command will stop all the running Docker containers created by Selenoid.

  2. After stopping Selenoid, you can remove the Selenoid binaries by running the following command:

    sudo rm -rf /usr/local/bin/selenoid /usr/local/bin/cm
    

Conclusion

In this tutorial, we have successfully installed Selenoid on Void Linux. Selenoid is now ready to be used for running browser tests in Docker containers.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!