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.
Login to the system using sudo access and open a terminal.
Run the following command to create a directory to store Selenoid configuration:
sudo mkdir /etc/selenoid
Next, run the following command to download the latest release of Selenoid:
sudo curl -s https://aerokube.com/selenoid/latest/release-download.sh | bash
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/
Make Selenoid executable by running the following command:
sudo chmod +x /usr/local/bin/selenoid /usr/local/bin/cm
After completing the above-given commands, we need to create a configuration file for Selenoid by running:
sudo nano /etc/selenoid/browsers.json
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.
Save the changes and exit the editor.
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.
After successful start of Selenoid, open your favorite web browser and go to http://localhost:4444/status
to verify that Selenoid is running.
If everything is okay, you can now use Selenoid for running browser tests in Docker containers.
To stop Selenoid, run the following command:
sudo selenoid stop
Note: This command will stop all the running Docker containers created by Selenoid.
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
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!