Installing AdGuard Home on a Debian VPS with a Public IP: A Step-by-Step Guide to Block Ads and Protect Your Privacy
- Connect to the VPS via SSH
To connect to your Debian VPS through SSH, open your terminal and use the following format to log in: ssh root@your.domain.com
Replace your.domain.com with the actual domain or IP address of your VPS.
Enter Password: After entering the SSH command, you’ll be prompted to enter your VPS’s password. Type it in and hit Enter.
Successful Login: If your credentials are correct, you’ll be successfully logged in to your Debian VPS and see a command prompt similar to root@your.domain.com:~#
- Update and Install Packages
Before starting the AdGuard Home installation, update your system and install the required packages:
Apt update
Apt upgrade
Once the update is complete proceed with the installation of the following packages
apt install curl
apt install dnsutils
- Run AdGuard Home Installation Script
Once the updates and installations are complete, run the AdGuard Home installation script:
curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s — -v
After the installation script finishes running, you’ll see a message indicating that AdGuard Home has been successfully installed on your Debian VPS.
To ensure AdGuard Home functions correctly, you need to configure your firewall and open the necessary ports. AdGuard Home requires the following ports to be open for handling DNS queries:
SSH 22
DNS 53
HTTP 80
HTTPS 443
SETUP 3000
You can use the ‘ufw’ firewall tool, a user-friendly frontend for iptables on Ubuntu-based systems. Make sure to allow the required ports for AdGuard Home using the following commands:
Ufw allow 22/tcp
Ufw allow 53/udp
Ufw allow 80/tcp
Ufw allow 443/tcp
Ufw allow 3000/tcp
Note that if you’re using a different firewall or a cloud provider, you’ll need to consult their documentation to open the required ports.
- AdGuard Home initial setup
Open your web browser and enter the URL in the following format, substituting the IP address of your Debian VPS and the default port number for AdGuard Home:
http://your.vps.ip:3000
Follow the on-screen instructions to complete the initial setup. This typically involves specifying a username, password, and other basic configuration options.
During the AdGuard Home setup process, you’ll be prompted to select the correct network interface for your VPS. This is typically the main Ethernet adapter, often named eth0 on Linux systems.
Please enter your chosen username and an exceptionally secure password to log in to the management screen of your ADH.
Depending on your setup, your IP address may be either public or private, impacting your online visibility.
Congratulations on completing the initial setup to access your AGH portal management. Click “Open Dashboard” to proceed to the login screen.
Here’s a glimpse of the login screen below. Enter the username and password created in the previous steps for seamless access to the AdGuard Home management portal.
First Login Dashboard Overview
That wraps up this blog post on installing AdGuard Home on a Debian VPS. Stay tuned for the next blog, where we’ll dive into the details of configuring AdGuard Home to optimize your ad blocking and privacy protection. Until then, happy browsing!