modules/ipfs: listen on multiple ports

This commit is contained in:
Max Headroom 2022-09-24 13:50:05 +02:00
parent a6de8398dd
commit 1fdc2aed10

View file

@ -18,8 +18,8 @@ in
links.ipfsGateway.protocol = "http"; links.ipfsGateway.protocol = "http";
networking.firewall = { networking.firewall = {
allowedTCPPorts = [ ipfsPort ]; allowedTCPPorts = [ ipfsPort 4001 ];
allowedUDPPorts = [ ipfsPort ]; allowedUDPPorts = [ ipfsPort 4001 ];
}; };
services.ipfs = { services.ipfs = {
@ -29,7 +29,10 @@ in
autoMount = true; autoMount = true;
autoMigrate = false; 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; inherit apiAddress;
gatewayAddress = "/ip4/${gw.ipv4}/tcp/${gw.portStr}"; gatewayAddress = "/ip4/${gw.ipv4}/tcp/${gw.portStr}";
dataDir = "/srv/storage/ipfs/repo"; dataDir = "/srv/storage/ipfs/repo";