LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

varnishd

Varnish HTTP reverse proxy cache daemon

TLDR

Start with default backend
$ varnishd -a :80 -b localhost:8080
copy
Start with VCL configuration
$ varnishd -a :80 -f /etc/varnish/default.vcl
copy
Run in foreground
$ varnishd -F -a :80 -b localhost:8080
copy
Set cache storage size
$ varnishd -a :80 -b localhost:8080 -s malloc,[256m]
copy
Enable management interface
$ varnishd -a :80 -b localhost:8080 -T localhost:6082
copy
Set default TTL
$ varnishd -a :80 -b localhost:8080 -t [120]
copy
Set runtime parameters
$ varnishd -a :80 -b localhost:8080 -p thread_pools=[2]
copy

SYNOPSIS

varnishd [options]

DESCRIPTION

varnishd is the Varnish HTTP accelerator daemon. It acts as a reverse proxy cache, accepting HTTP requests, forwarding them to backend servers, and caching responses to serve future requests faster.The daemon uses VCL (Varnish Configuration Language) to define caching policies, request routing, and response handling. VCL is compiled to C and loaded dynamically.Storage backends include malloc (memory) and file (disk-based with memory mapping). Multiple storage backends and listening addresses can be configured.The management interface allows runtime configuration changes, VCL loading, and statistics access via varnishadm.

PARAMETERS

-a address[:port]

Listen for client requests (default port: 80).
-b host[:port]
Backend server (default port: 80).
-f config
VCL configuration file.
-F
Run in foreground (don't fork).
-s [name=]type[,options]
Storage backend: malloc, file, persistent.
-t ttl
Default TTL for cached objects in seconds.
-T address[:port]
Management interface address.
-S secret-file
Authentication secret for management.
-n name
Instance name and working directory.
-p param=value
Set runtime parameter.
-r param[,param...]
Make parameters read-only.
-i identity
Server identity string.
-I clifile
Execute CLI commands from file on start.
-d
Enable debug mode (do not start worker process, accept CLI commands on stdin).
-j jail[,jailoptions]
Specify jailing technology for worker process.

INSTALL

sudo apt install varnish
copy
sudo dnf install varnish
copy
sudo apk add varnish
copy
brew install varnish
copy
nix profile install nixpkgs#varnish
copy

CAVEATS

Requires either -b or -f option. VCL changes require reload through management interface. Memory storage is lost on restart. Running on port 80 requires root or capabilities.

HISTORY

Varnish was created by Poul-Henning Kamp and released in 2006. It was designed from scratch for modern hardware and operating systems, using techniques like memory-mapped files and kernel-level optimizations. It has become one of the most widely deployed HTTP accelerators.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid