Quoting NO_PROXY in a systemd Environment Directive
Keep an entire NO_PROXY assignment together in a systemd Environment directive and separate unit-file parsing from the client’s bypass syntax.
In a systemd service definition, keep the whole environment assignment inside the unit-file quotes:
[Service]
Environment="NO_PROXY=localhost,127.0.0.1,::1,intranet.example"
The commas are part of NO_PROXY's value. systemd removes the surrounding quotes while constructing the environment; the network client receives the list and interprets its bypass syntax afterward. Starting another quote halfway through an already quoted item does not create an independent shell-quoting layer.
Unit files are not shell scripts. An export statement or familiar variable name does not supply shell expansion in an Environment= directive.
- Inspect the effective service configuration locally, redacting secrets.
- After changing it, reload the service definitions and use the affected service's normal restart procedure. Plan the impact on active work, especially for a shared image daemon.
- Confirm the intended value reaches the new process. Reloading a unit file alone cannot replace an existing process's environment.
Only then investigate the client's domain or subnet matching. A list that works in a terminal may never have reached the service in the same form.