Skip to content

Commit

Permalink
redis service: Listen on localhost by default. Fixes NixOS#100192.
Browse files Browse the repository at this point in the history
All other database servers in NixOS also use this safe-by-default setting.
  • Loading branch information
nh2 committed Nov 8, 2020
1 parent c0f4be6 commit 169ab0b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions nixos/doc/manual/release-notes/rl-2103.xml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@
to <package>nextcloud20</package>.
</para>
</listitem>
<listitem>
<para>
The setting <xref linkend="opt-services.redis.bind" /> defaults to <literal>127.0.0.1</literal> now, making Redis listen on the loopback interface only, and not all public network interfaces.
</para>
</listitem>
<listitem>
<para>
NixOS now emits a deprecation warning if systemd's <literal>StartLimitInterval</literal> setting is used in a <literal>serviceConfig</literal> section instead of in a <literal>unitConfig</literal>; that setting is deprecated and now undocumented for the service section by systemd upstream, but still effective and somewhat buggy there, which can be confusing. See <link xlink:href="https://github.com/NixOS/nixpkgs/issues/45785">#45785</link> for details.
Expand Down
9 changes: 6 additions & 3 deletions nixos/modules/services/databases/redis.nix
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,12 @@ in

bind = mkOption {
type = with types; nullOr str;
default = null; # All interfaces
description = "The IP interface to bind to.";
example = "127.0.0.1";
default = "127.0.0.1";
description = ''
The IP interface to bind to.
<literal>null</literal> means "all interfaces".
'';
example = "192.0.2.1";
};

unixSocket = mkOption {
Expand Down

0 comments on commit 169ab0b

Please sign in to comment.