Skip to content

Configuration

Andrei Krivenko edited this page Jun 18, 2025 · 1 revision

Using config.default.json5 as a template, you can create various configuration files. Make a copy of this file to configure an app. config.json5 file will be used:

cp config.default.json5 config.json5

Config file properties are detailed below:

{
  // List of IPFS ADAMANT nodes interacting between each other
  nodes: [
    {
      name: "ipfs1",
      multiAddr: "/ip4/194.163.154.252/tcp/4001/p2p/12D3KooWSUCe86zWfas1Lo1UQzXzquZgS81d1DpPPYAuTNjSyniq"
    },
    ...
  ],
  storeFolder: '.adm-ipfs', // File storage directory
  logLevel: 'debug', // Logging level: fatal, error, warn, info, debug, trace
  peerDiscovery: {
    // IPFS network nodes that will be used to search for new nodes
    // Details: https://github.com/libp2p/js-libp2p/tree/main/packages/peer-discovery-bootstrap
    bootstrap: [
      '/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN',
      ...
    ],
    // Addresses that helia will listen to
    listen: [
      '/ip4/0.0.0.0/tcp/4001',
    ]
  },
  serverPort: 4000, // API server deployment port
  autoPeeringPeriod: '*/10 * * * * *', 
  diskUsageScanPeriod: '*/30 * * * * *', // Disk space scanning period. Set in cron format: '* * * * * *'
  garbageCollectorRunPeriod: '*/30 * * * * *', // Garbage collector running period. Set in cron format: '* * * * * *'
  uploadLimitSizeBytes: 268435456, // Maximum upload file size (in bytes)
  maxFileCount: 5, // Maximum upload count of files per request
  findFileTimeout: 20000, // Time limit for searching for a file on the IPFS network 
  cors: {
    // Allowed URLs to make request to node. Set using regular expressions 
    originRegexps: ['.*\.adamant\.im', 'adm.im', '.*\.vercel\.app', '.*\.surge\.sh', 'localhost:8080']
  }
}

Clone this wiki locally