From 1fdc2aed10094b8ecf13356b7b48b55dc3e24062 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 24 Sep 2022 13:50:05 +0200 Subject: [PATCH] modules/ipfs: listen on multiple ports --- modules/ipfs/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/ipfs/default.nix b/modules/ipfs/default.nix index bc2f646..386374d 100644 --- a/modules/ipfs/default.nix +++ b/modules/ipfs/default.nix @@ -18,8 +18,8 @@ in links.ipfsGateway.protocol = "http"; networking.firewall = { - allowedTCPPorts = [ ipfsPort ]; - allowedUDPPorts = [ ipfsPort ]; + allowedTCPPorts = [ ipfsPort 4001 ]; + allowedUDPPorts = [ ipfsPort 4001 ]; }; services.ipfs = { @@ -29,7 +29,10 @@ in autoMount = true; autoMigrate = false; - swarmAddress = "/ip4/0.0.0.0/tcp/${toString ipfsPort}"; + swarmAddress = [ + "/ip4/0.0.0.0/tcp/${toString ipfsPort}" + "/ip4/0.0.0.0/tcp/4001" + ]; inherit apiAddress; gatewayAddress = "/ip4/${gw.ipv4}/tcp/${gw.portStr}"; dataDir = "/srv/storage/ipfs/repo";