Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 953 Bytes

DAEMON.md

File metadata and controls

35 lines (22 loc) · 953 Bytes

Running IPFS as a daemon

How to run a long-lived IPFS process

## Table of contents

CLI

To start a daemon on the CLI, use the daemon command:

jsipfs daemon

The IPFS Daemon exposes the API defined in the HTTP API spec. You can use any of the IPFS HTTP-API client libraries with it, such as: ipfs-http-client.

Programmatic

If you want a programmatic way to spawn a IPFS Daemon using JavaScript, check out the ipfsd-ctl module.

const { createFactory } = require('ipfsd-ctl')
const factory = createFactory({
  type: 'proc' // or 'js' to run in a separate process
})

const node = await factory.create()

// print the node ide
console.info(await node.id())