Create a new DAppNode Package

First, you need to download the dappnode SDK cli that will help you to create the package template.

npm install -g @dappnode/dappnodesdk

Then, create a new directory for your package and launch

dappnodesdk init

After answering basics questions, you have 3 files that you need to modify :

dappnode_package.json : contains all metadata used by DAppNode System to manager your new package.

docker-compose.yml : basic docker-compose file that will be used to launch your docker image.

build/Dockerfile : you must your configure docker image for the software or node you want to create.

For Polkadot, we inherit from the official docker image and add a parameter EXTRA_OPTS in the command. This parameter will be then valorize and can be changed in the web interface of the DAppNode.

To have a nice logo in the interface you need to set a logo in the directory. This logo will be added to IPFS when you will launch the sdk build command. After that, the IPFS link will be set in avatar parameter in dappnode_package.json file.

You can now try to build.

Be Careful, you must be connected to some IPFS provider to be able to generate the IPFS link for the package et the logo. If you are connected to a DAppNode Wifi your have nothing to do, the config is good by default. Otherwise, you can overwrite the IPFS provider to target.

dappnodesdk build

DAppNode SDK build command

The build command upload the logo to IPFS and create docker image thanks to your Dockerfile.

When all is ok, it loads the package metadata to IPFS and give you a direct link to install it on your DAppNode.

Configure the EXTRA_OPTS parameter and after clicking on Install, you node will start automatically.

Install Package with IPFS link

In the installer Menu, everybody that have the IPFS link will now be able to install the package you have just created !

But how to install with just the DAppNode Package Name ?

You need to do the sdk publish step

dappnodesdk publish

It uses Ethereum for the versioning and ENS to resolve the name : polkadot.public.dappnode.eth

You need also to prepare a developer Ethereum wallet that will be responsible to publish the package and publish new versions of the package.

DAppNode SDK publish command

When publish command is successful, it gives you a direct link to a form filled out. Connect you wallet and propagate the transaction. The new repo is then created with version 1.0.0. Now, you can direct install your package with his name.