← Back to all services
Caching

Varnish Cache Default Port & Configuration

varnish systemctl: varnish

HTTP accelerator and reverse proxy cache. Extremely fast, uses VCL for configuration.

🔌 Default Ports

6081
tcp
HTTP (client-facing)
6082
tcp
Management interface

📦 Installation Command

apt install varnish

⚙️ Configuration Files

  • /etc/varnish/default.vcl
  • /etc/default/varnish
  • /lib/systemd/system/varnish.service

📂 Default Directories

  • config: /etc/varnish
  • data: N/A (memory cache)
  • logs: /var/log/varnish
  • vcl: /etc/varnish/default.vcl

🔐 Default Credentials

Username:N/A
Password:N/A
💡 Management interface uses secret file: /etc/varnish/secret

⚠️ Conflicts

N/A Port: Change to 80 conflicts with nginx/apache

✅ Works With

nginxapache2 (as backend)wordpressdrupalmagento

🛡️ Security Notes

Restrict management port to localhost, use secret authentication, purge only from trusted IPs, configure proper cache invalidation

❓ Frequently Asked Questions

What port does Varnish use?
Varnish uses port 6081 for HTTP and 6082 for admin/CLI by default.
What is Varnish used for?
Varnish is an HTTP accelerator that caches content to dramatically speed up websites.
Where is Varnish config?
VCL config at /etc/varnish/default.vcl, daemon config at /etc/default/varnish.