How to install Maza ad-blocking on Ubuntu Server

In this tutorial, we will walk you through the steps required to install Maza ad-blocking on Ubuntu Server latest version. Maza is an open-source ad-blocker that blocks ads, trackers and malware from your device.

Prerequisites

Step 1: Install Git

Open a terminal window on your Ubuntu Server by pressing CTRL + ALT + T and run the following command to install Git:

sudo apt-get update
sudo apt-get install git

Step 2: Clone the Maza repository

Run the following command to clone Maza's repository:

sudo git clone https://github.com/maza-ad-blocking/maza-ad-blocking.git

Step 3: Install Docker

Maza requires Docker to be installed on your machine. Follow the given steps to install it.

3.1 Remove old docker binaries if any

sudo apt-get remove docker docker-engine docker.io containerd runc

3.2 Install Docker dependencies

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

3.3 Add Docker's official GPG key

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

3.4 Add Docker’s stable repository

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

3.5 Install Docker

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

3.6 Add user to the Docker group

sudo usermod -aG docker "$USER"

Step 4: Configure Maza

4.1 Create the configuration file

cd maza-ad-blocking
cp config.sample.ini config.ini

4.2 Edit the configuration file

nano config.ini

Make the following changes to the configuration file:

Save and exit the editor.

Step 5: Build and run Maza

Run the following command to build Maza:

sudo docker build -t maza:latest .

Run the following command to start the Maza container:

sudo docker run -d -v $(pwd)/data:/opt/maza/data -p 5053:53/udp --restart always --name maza maza:latest

Step 6: Verify Maza

Maza should now be up and running on your machine. You can verify this by visiting http://localhost/admin on a web browser. If everything was done correctly, you should see the Maza web interface.

Conclusion

In this tutorial, we have shown you how to install and configure Maza ad-blocking on Ubuntu Server latest version. Maza is a powerful ad-blocker that helps in blocking ads, trackers and malware from your device.

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!