How to Install Blocky on Clear Linux Latest

Blocky is a privacy-oriented DNS resolver that blocks ads and trackers. It is an open-source software and available on GitHub. To install it on Clear Linux Latest, follow the below steps.

Prerequisites

Install Dependencies

First, update the package list and install the dependencies required to build and run Blocky.

sudo swupd update
sudo swupd bundle-add devpkg-glib devpkg-mbedtls devpkg-zlib

Clone the repository

Now, let's clone the Blocky repository from GitHub.

git clone https://github.com/0xERR0R/blocky.git

Building Blocky

Change the directory to the cloned repository and build it.

cd blocky
make

Installation

Create a directory to store the configuration files and copy the required files.

sudo mkdir /etc/blocky/
sudo cp blocky /usr/local/bin/
sudo cp blocky.conf.example /etc/blocky/blocky.conf

Configuration

Edit the /etc/blocky/blocky.conf file and add your preferred settings. The file has comments to help you understand each option.

sudo nano /etc/blocky/blocky.conf

Running Blocky

Run the following command to start the Blocky daemon.

sudo blocky

Add Blocky to Systemd

To allow Blocky to start automatically after the system restarts, we need to create a systemd service file.

sudo nano /etc/systemd/system/blocky.service

Add the below configuration to the file.

[Unit]
Description=Blocky

[Service]
ExecStart=/usr/local/bin/blocky
Restart=always

[Install]
WantedBy=multi-user.target

Reload systemd and start Blocky.

sudo systemctl daemon-reload
sudo systemctl enable blocky.service
sudo systemctl start blocky.service

Conclusion

You have successfully installed and configured Blocky on Clear Linux Latest. You can now use it as a primary DNS resolver on your devices to have better privacy while browsing.

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!