{"id":514,"date":"2024-12-05T11:28:04","date_gmt":"2024-12-05T11:28:04","guid":{"rendered":"https:\/\/blog.eu.enginyr.ing\/?p=514"},"modified":"2025-11-30T15:36:36","modified_gmt":"2025-11-30T15:36:36","slug":"how-to-set-up-an-adguard-dns-server-on-your-vps-hosting-plan","status":"publish","type":"post","link":"https:\/\/www.serverspan.com\/en\/blog\/how-to-set-up-an-adguard-dns-server-on-your-vps-hosting-plan\/","title":{"rendered":"How to Set Up an AdGuard DNS Server on Your VPS Hosting Plan"},"content":{"rendered":"\n<p>\n        AdGuard DNS is a privacy-focused, ad-blocking DNS solution that enhances your internet browsing experience<br \/>\n        by filtering unwanted content at the DNS level. Setting up an AdGuard DNS server on your <a href=\"https:\/\/www.enginyring.com\/en\/virtual-servers\" target=\"_blank\">VPS hosting plan<\/a><br \/>\n        allows you to customize and control your browsing environment, block ads, and improve security. This comprehensive<br \/>\n        guide provides step-by-step instructions to set up AdGuard DNS on your VPS.\n    <\/p>\n<h2>Why Choose AdGuard DNS?<\/h2>\n<p>\n        AdGuard DNS is more than just a standard DNS resolver. By integrating ad-blocking and privacy-enhancing features,<br \/>\n        it provides a seamless way to filter internet traffic at the network level. Unlike browser-based ad-blockers,<br \/>\n        AdGuard DNS works for all devices on your network, providing comprehensive coverage without requiring individual<br \/>\n        installations.\n    <\/p>\n<ul>\n<li>Blocks ads and trackers globally.<\/li>\n<li>Enhances privacy by filtering DNS queries.<\/li>\n<li>Improves security by blocking access to malicious domains.<\/li>\n<li>Allows custom filters and DNS settings for personalized control.<\/li>\n<\/ul>\n<h2>Prerequisites<\/h2>\n<p>Before beginning, ensure your VPS and local environment meet the following requirements:<\/p>\n<ul>\n<li>A VPS with a supported Linux distribution (Ubuntu\/Debian recommended).<\/li>\n<li>At least 1 GB RAM and 20 GB storage space.<\/li>\n<li>Docker installed on the VPS (we\u2019ll guide you if not).<\/li>\n<li>Basic familiarity with SSH access and Linux commands.<\/li>\n<li>A domain name (optional, but recommended for easy access).<\/li>\n<\/ul>\n<h2>Step 1: Update Your Server<\/h2>\n<p>Start by updating your server\u2019s system packages to ensure compatibility and security:<\/p>\n<pre><code>sudo apt update && sudo apt upgrade -y<\/code><\/pre>\n<p>This command updates the package index and upgrades all installed packages to their latest versions.<\/p>\n<h2>Step 2: Install Docker<\/h2>\n<p>\n        AdGuard DNS runs efficiently as a Docker container. Docker simplifies installation, upgrades, and management<br \/>\n        of the AdGuard service.\n    <\/p>\n<h3>Install Docker<\/h3>\n<p>Run the following command to install Docker using an automated script:<\/p>\n<pre><code>curl -fsSL https:\/\/get.docker.com | bash<\/code><\/pre>\n<h3>Start Docker<\/h3>\n<p>Enable Docker to start on boot and verify the installation:<\/p>\n<pre><code>sudo systemctl start docker\nsudo systemctl enable docker\ndocker --version<\/code><\/pre>\n<h2>Step 3: Download and Run AdGuard Home<\/h2>\n<p>\n        With Docker installed, you can now pull the AdGuard Home Docker image and create a container for it. This will<br \/>\n        allow you to manage DNS queries efficiently.\n    <\/p>\n<h3>Pull the AdGuard Docker Image<\/h3>\n<pre><code>docker pull adguard\/adguardhome<\/code><\/pre>\n<p>This command downloads the latest version of AdGuard Home to your VPS.<\/p>\n<h3>Run the AdGuard Container<\/h3>\n<p>Create and run the AdGuard Home container:<\/p>\n<pre><code>docker run -d --name adguardhome \\\n  -v \/opt\/adguardhome\/work:\/opt\/adguardhome\/work \\\n  -v \/opt\/adguardhome\/conf:\/opt\/adguardhome\/conf \\\n  -p 53:53\/tcp -p 53:53\/udp \\\n  -p 80:80\/tcp \\\n  -p 3000:3000\/tcp \\\n  adguard\/adguardhome<\/code><\/pre>\n<ul>\n<li><code>\/opt\/adguardhome\/work<\/code> and <code>\/opt\/adguardhome\/conf<\/code> store working and configuration files.<\/li>\n<li>Ports 53 (DNS), 80 (HTTP), and 3000 (Admin interface) are mapped for use.<\/li>\n<\/ul>\n<h2>Step 4: Access AdGuard Home<\/h2>\n<p>\n        After starting the container, access AdGuard Home using your server\u2019s IP address in a web browser. Replace<br \/>\n        <code>your-server-ip<\/code> with your VPS\u2019s IP:\n    <\/p>\n<pre><code>http:\/\/your-server-ip:3000<\/code><\/pre>\n<p>Follow the setup wizard to configure your DNS server and set up admin credentials.<\/p>\n<h2>Step 5: Configure AdGuard DNS<\/h2>\n<p>During the setup wizard, you can:<\/p>\n<ul>\n<li>Enable ad-blocking, tracker-blocking, and malware filters.<\/li>\n<li>Set upstream DNS servers for enhanced privacy (e.g., Quad9, Cloudflare).<\/li>\n<li>Configure custom DNS rules to block or allow specific domains.<\/li>\n<\/ul>\n<h2>Step 6: Point Devices to Your DNS Server<\/h2>\n<p>\n        To use AdGuard DNS, you need to configure devices or your router to use your VPS\u2019s IP address as the DNS resolver.\n    <\/p>\n<ol>\n<li>Access your device or router\u2019s DNS settings.<\/li>\n<li>Replace existing DNS addresses with your server\u2019s IP (use port 53).<\/li>\n<li>Save the changes and restart the network if required.<\/li>\n<\/ol>\n<h2>Step 7: Optimize and Secure Your AdGuard Server<\/h2>\n<p>Consider these additional steps to enhance functionality and security:<\/p>\n<ul>\n<li><strong>Enable HTTPS:<\/strong> Use a Let\u2019s Encrypt certificate to secure the admin interface.<\/li>\n<li><strong>Enable Logging:<\/strong> Monitor DNS queries and blocklists for insights.<\/li>\n<li><strong>Keep AdGuard Updated:<\/strong> Use Docker to pull the latest AdGuard images.<\/li>\n<\/ul>\n<pre><code>docker pull adguard\/adguardhome\ndocker container restart adguardhome<\/code><\/pre>\n<h2>Conclusion<\/h2>\n<p>\n        Setting up AdGuard DNS on your VPS provides a robust, private, and efficient way to filter unwanted content<br \/>\n        and enhance browsing security. With this configuration, all devices on your network can benefit from ad-blocking<br \/>\n        and privacy features. For advanced configurations, explore custom filters and DNS encryption options.\n    <\/p>\n<div class=\"alert alert-info my-4\" role=\"alert\">\n  <strong>Need a VPS for this?<\/strong> Our virtual servers start at <strong>\u20ac2.99\/mo<\/strong> with instant deployment and 2.5 Tbps DDoS protection included. <a href=\"\/en\/virtual-servers\" class=\"alert-link\">View VPS plans \u2192<\/a>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>AdGuard DNS is a privacy-focused, ad-blocking DNS solution that enhances your internet browsing experience by filtering unwanted content at the DNS level. Setting up an AdGuard DNS server on your VPS hosting plan allows you to customize and control your browsing environment, block ads, and improve security. This comprehensive guide provides step-by-step instructions to set [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":515,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,12],"tags":[2543,2535,2526,2542,2531,2537,2532,2533,2528,2536,2530,2544,2527,2538,2539,2545,2534,2541,2540,2529],"class_list":["post-514","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-virtual-servers","tag-ad-free-internet-with-adguard","tag-adguard-dns-for-better-privacy","tag-adguard-dns-server-setup","tag-adguard-home-custom-dns-rules","tag-adguard-home-installation-guide","tag-adguard-setup-for-linux","tag-block-ads-with-adguard-dns","tag-configure-adguard-home","tag-dns-filtering-for-privacy","tag-dns-server-for-ad-blocking","tag-docker-dns-server-setup","tag-how-to-block-trackers-with-adguard","tag-install-adguard-home-on-vps","tag-install-adguard-home-with-docker","tag-private-dns-resolver-setup","tag-secure-browsing-with-adguard","tag-secure-dns-on-vps","tag-setup-dns-on-ubuntu-vps","tag-vps-dns-filtering-guide","tag-vps-hosting-for-dns"],"_links":{"self":[{"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/514","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=514"}],"version-history":[{"count":2,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/514\/revisions"}],"predecessor-version":[{"id":2087,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/514\/revisions\/2087"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/515"}],"wp:attachment":[{"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=514"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}