How to Install Selenoid on Elementary OS

Selenoid is an open-source, lightweight Selenium Hub alternative that allows you to run browser tests faster and more efficiently. In this tutorial, we will guide you through the process of installing Selenoid on Elementary OS.

Prerequisites

Before we begin the installation process, ensure that you have the following prerequisites:

Installing Docker

Before installing Selenoid, make sure that Docker is installed on your system. You can follow these steps to install Docker on Elementary OS:

  1. Open the terminal by pressing CTRL+ALT+T.

  2. Update the package index and install the required dependencies for Docker with the following commands:

    sudo apt update
    sudo apt install apt-transport-https ca-certificates curl software-properties-common
    
  3. Add the Docker GPG key with:

    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    
  4. Add the Docker repository to your APT sources:

    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
    
  5. Update the package index and install Docker with:

    sudo apt update
    sudo apt install docker-ce
    
  6. Verify that Docker is installed and running by running the following command:

    sudo systemctl status docker
    
  7. You should see output similar to the following:

    ● docker.service - Docker Application Container Engine
    Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
    Active: active (running) since [..]
    

Installing Selenoid

Next, we will cover the steps required to install Selenoid on Elementary OS.

  1. Open the terminal and run the following command to download the Selenoid binary file:

    curl -s https://aerokube.com/cm/bash | bash \
    && ./cm selenoid download latest -dest /usr/bin/ \
    && ./cm selenoid-ui download latest -dest /usr/bin/
    
  2. Once the download is complete, run the following command to start the Selenoid server:

    sudo docker run -d                                            \
      -p 4444:4444                                                \
      -v /var/run/docker.sock:/var/run/docker.sock                \
      -v $HOME/.aerokube/selenoid/:/etc/selenoid/:ro              \
      -v $HOME/.aerokube/selenoid/video/:/opt/selenoid/video/     \
      aerokube/selenoid:latest-release                             \
      -listen :4444                                               \
      -conf /etc/selenoid/browsers.json                            \
      -video-output-dir /opt/selenoid/video/                       \
      -log-output-dir /var/log/selenoid/                           \
      -idempotency-key selenoid-$(date '+%s')                       \
      -session-attempt-timeout 180s
    
  3. Run the following command to start the Selenoid UI:

    sudo docker run -d \
     -p 8080:8080 \
     --name selenoid-ui \
     --link selenoid \
     -v /var/run/docker.sock:/var/run/docker.sock \
     aerokube/selenoid-ui --selenoid-uri=http://selenoid:4444
    

    This will allow you to monitor the status of your running tests.

Verifying the installation

Once you have followed the installation steps, you can verify that the Selenoid installation is successful by navigating to http://localhost:8080 in your web browser.

This should open the Selenoid UI, and you should see a list of available browsers along with their versions.

You can now start writing automation scripts and running them using Selenoid!

Conclusion

In this tutorial, we have walked you through the process of installing Selenoid on your Elementary OS system. With Selenoid, you can run Selenium tests quickly and effortlessly, thanks to its fast and efficient design. If you are interested in learning more about Selenoid, be sure to check out the official documentation.

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!