<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/configuring-varnish-on-systemd-in-2026-drop-in-overrides-not-varnish-params-nax5eay1f" -->

---
title: Configuring Varnish on systemd in 2026: drop-in...
description: Modern Varnish packages on Debian/Ubuntu and RedHat-family systems no longer use varnish.params or /etc/default/varnish. Startup options now live directly in...
canonical: https://daily.dev/posts/configuring-varnish-on-systemd-in-2026-drop-in-overrides-not-varnish-params-nax5eay1f
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Configuring Varnish on systemd in 2026: drop-in overrides, not varnish.params | daily.dev
og:description: Modern Varnish packages on Debian/Ubuntu and RedHat-family systems no longer use varnish.params or /etc/default/varnish. Startup options now live directly in...
og:url: https://daily.dev/posts/configuring-varnish-on-systemd-in-2026-drop-in-overrides-not-varnish-params-nax5eay1f
og:image: https://api.daily.dev/og/posts/NAx5eaY1f.png
og:image:alt: Configuring Varnish on systemd in 2026: drop-in overrides, not varnish.params
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuring Varnish on systemd in 2026: drop-in overrides, not varnish.params

**[Mattias Geniar](https://daily.dev/sources/mattiasgeniar)** · 6 min read · 0 upvotes · 0 comments

## Summary

Modern Varnish packages on Debian/Ubuntu and RedHat-family systems no longer use varnish.params or /etc/default/varnish. Startup options now live directly in the systemd unit's ExecStart, and the correct way to customize them is a systemd drop-in override via `systemctl edit varnish`, which creates a file under /etc/systemd/system/varnish.service.d/. The post explains the ExecStart clearing trick (empty ExecStart= before the new one), how to verify the override took effect with `systemctl show`, and how to do graceful VCL reloads with `systemctl reload varnish` using varnishreload. A real production example from Oh Dear shows tuning parameters including thread pools, grace periods, and memory caps via a separate drop-in. Validated on Debian 13 with Varnish 7.7.0.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://ma.ttias.be/varnish-systemd-drop-in-overrides-2026>

## Questions this post answers

### How do I change Varnish startup options on systemd without editing the shipped unit file?

Use `systemctl edit varnish` to create a drop-in override at /etc/systemd/system/varnish.service.d/override.conf. To replace ExecStart, first clear it with an empty `ExecStart=` line, then add your own. After saving, run `systemctl daemon-reload && systemctl restart varnish`. Verify with `systemctl show varnish -p ExecStart`. This approach survives package upgrades, unlike editing /usr/lib/systemd/system/varnish.service directly.

_Engineers tuning Varnish in production track patterns like this on daily.dev before the next upgrade wipes their config._

### How do I reload a changed VCL in Varnish without restarting and dropping the cache?

Run `systemctl reload varnish`. The ExecReload directive calls varnishreload, which compiles the new VCL, loads it under a timestamped name, and switches it active while the old VCL keeps serving until the transition is safe. No restart, no dropped cache, no service gap. Run `varnishd -C -f /etc/varnish/default.vcl` first to catch syntax errors before attempting the reload.

_Varnish operators avoiding cache-drop incidents during deploys find reload workflows like this on daily.dev._

### Why does the Varnish systemd unit have TasksMax=infinity and is it safe to remove?

TasksMax=infinity prevents a 'fork failed' error during VCL reloads. Without it, a reload can hit the default systemd task limit and fail mid-operation. The comment in the shipped unit explicitly flags this as a known scar. Leave it in place — removing it risks failed reloads under load.

_Sysadmins hardening Varnish service units without breaking reloads find edge cases like this on daily.dev._

## Similar posts on daily.dev

- [News: Breaking changes for all users of \`varnish\`, which is renamed to \`vinyl-cache\`](https://daily.dev/posts/news-breaking-changes-for-all-users-of-varnish-which-is-renamed-to-vinyl-cache--4nkqq9eiz) · Arch Linux · 0 upvotes · 0 comments
- [On Vinyl Cache and Varnish Cache](https://daily.dev/posts/on-vinyl-cache-and-varnish-cache-gqssyhs02) · Lobsters · 0 upvotes · 0 comments
- [Linux From Scratch Abandoning SysVinit Support](https://daily.dev/posts/linux-from-scratch-abandoning-sysvinit-support-ohwaybfxo) · Phoronix · 1 upvotes · 1 comments
- [Vinyl Cache has left github — Varnish HTTP Cache](https://daily.dev/posts/vinyl-cache-has-left-github-varnish-http-cache-wdmoub0u6) · Lobsters · 0 upvotes · 0 comments

---

Tags: [#linux](https://daily.dev/tags/linux)

[View this post on daily.dev](https://daily.dev/posts/configuring-varnish-on-systemd-in-2026-drop-in-overrides-not-varnish-params-nax5eay1f)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Configuring Varnish on systemd in 2026: drop-in overrides, not varnish.params","url":"https://daily.dev/posts/configuring-varnish-on-systemd-in-2026-drop-in-overrides-not-varnish-params-nax5eay1f","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/configuring-varnish-on-systemd-in-2026-drop-in-overrides-not-varnish-params-nax5eay1f"},"datePublished":"2026-08-11T08:51:45.381Z","dateModified":"2026-08-11T08:52:38.765Z","description":"Modern Varnish packages on Debian/Ubuntu and RedHat-family systems no longer use varnish.params or /etc/default/varnish. Startup options now live directly in...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/4972153d2730ba3e650bff3025bb8269?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/4972153d2730ba3e650bff3025bb8269?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Mattias Geniar","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Mattias Geniar","logo":"https://media.daily.dev/image/upload/logos/placeholder.jpg","url":"https://daily.dev/sources/mattiasgeniar"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/configuring-varnish-on-systemd-in-2026-drop-in-overrides-not-varnish-params-nax5eay1f","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"linux","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Mattias Geniar","item":"https://daily.dev/sources/mattiasgeniar"},{"@type":"ListItem","position":3,"name":"Configuring Varnish on systemd in 2026: drop-in overrides, not varnish.params"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/configuring-varnish-on-systemd-in-2026-drop-in-overrides-not-varnish-params-nax5eay1f#faq","mainEntity":[{"@type":"Question","name":"How do I change Varnish startup options on systemd without editing the shipped unit file?","acceptedAnswer":{"@type":"Answer","text":"Use `systemctl edit varnish` to create a drop-in override at /etc/systemd/system/varnish.service.d/override.conf. To replace ExecStart, first clear it with an empty `ExecStart=` line, then add your own. After saving, run `systemctl daemon-reload && systemctl restart varnish`. Verify with `systemctl show varnish -p ExecStart`. This approach survives package upgrades, unlike editing /usr/lib/systemd/system/varnish.service directly. Engineers tuning Varnish in production track patterns like this on daily.dev before the next upgrade wipes their config."}},{"@type":"Question","name":"How do I reload a changed VCL in Varnish without restarting and dropping the cache?","acceptedAnswer":{"@type":"Answer","text":"Run `systemctl reload varnish`. The ExecReload directive calls varnishreload, which compiles the new VCL, loads it under a timestamped name, and switches it active while the old VCL keeps serving until the transition is safe. No restart, no dropped cache, no service gap. Run `varnishd -C -f /etc/varnish/default.vcl` first to catch syntax errors before attempting the reload. Varnish operators avoiding cache-drop incidents during deploys find reload workflows like this on daily.dev."}},{"@type":"Question","name":"Why does the Varnish systemd unit have TasksMax=infinity and is it safe to remove?","acceptedAnswer":{"@type":"Answer","text":"TasksMax=infinity prevents a 'fork failed' error during VCL reloads. Without it, a reload can hit the default systemd task limit and fail mid-operation. The comment in the shipped unit explicitly flags this as a known scar. Leave it in place — removing it risks failed reloads under load. Sysadmins hardening Varnish service units without breaking reloads find edge cases like this on daily.dev."}}]}
```

