<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://betaardordocs.jelurida.com/index.php?action=history&amp;feed=atom&amp;title=How_to_connect_Ardor_node_to_IPFS_node</id>
	<title>How to connect Ardor node to IPFS node - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://betaardordocs.jelurida.com/index.php?action=history&amp;feed=atom&amp;title=How_to_connect_Ardor_node_to_IPFS_node"/>
	<link rel="alternate" type="text/html" href="https://betaardordocs.jelurida.com/index.php?title=How_to_connect_Ardor_node_to_IPFS_node&amp;action=history"/>
	<updated>2026-05-14T18:12:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.10</generator>
	<entry>
		<id>https://betaardordocs.jelurida.com/index.php?title=How_to_connect_Ardor_node_to_IPFS_node&amp;diff=12861&amp;oldid=prev</id>
		<title>Almonte at 16:09, 19 April 2021</title>
		<link rel="alternate" type="text/html" href="https://betaardordocs.jelurida.com/index.php?title=How_to_connect_Ardor_node_to_IPFS_node&amp;diff=12861&amp;oldid=prev"/>
		<updated>2021-04-19T16:09:58Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=How to connect Ardor node with an IPFS node&lt;br /&gt;
|titlemode=replace&lt;br /&gt;
|keywords=IPFS, IPFS node, IPFS documentation, Ardor, Ardor node, Ardor documentation, blockchain, proof of stake, ardor, ignis, jelurida, development, ardor wiki, wiki, tutorials, advanced tutorials&lt;br /&gt;
|description=Detailed explanation step by step to connect IPFS to an Ardor node&lt;br /&gt;
}}&lt;br /&gt;
[[Category:Advanced_guides]]&lt;br /&gt;
__TOC__&lt;br /&gt;
== Introduction ==&lt;br /&gt;
This guide will show you how to connect &amp;#039;&amp;#039;&amp;#039;IPFS node&amp;#039;&amp;#039;&amp;#039; to &amp;#039;&amp;#039;&amp;#039;Ardor node&amp;#039;&amp;#039;&amp;#039;. You will also learn how to Pin files to the IPFS node, connected to the Ardor node via another IPFS node.&lt;br /&gt;
&lt;br /&gt;
==== What is IPFS? ====&lt;br /&gt;
IPFS is a distributed system for storing and accessing files, websites, applications, and data. Refer to the IPFS [https://docs.ipfs.io official documentation] for more information.&lt;br /&gt;
&lt;br /&gt;
== Installing and deploying IPFS node ==&lt;br /&gt;
Please refer to [https://wiki.jelurida.com/How_to_deploy_IPFS_node guide] for a detailed tutorial about how to install deploy IPFS node.&lt;br /&gt;
&lt;br /&gt;
== Connecting the Ardor node to IPFS node ==&lt;br /&gt;
The connection between Ardor and IPFS nodes is possible via a Lightweight contract. If you are not familiar with Jelurida&amp;#039;s Lightweight Contracts, please visit [https://wiki.jelurida.com/Lightweight_Contracts this documentation] for a detailed tutorial.&lt;br /&gt;
&lt;br /&gt;
Assuming that you already have running Ardor node with enabled Contract Runner and two IPFS nodes connected to the IPFS network, the next step is to upload &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;PinToIpfs.java&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;PinFromMessage.java&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; contracts to the Ardor node. If you don&amp;#039;t know how to deploy contracts, please visit [https://wiki.jelurida.com/Lightweight_Contracts#Contract_Deployment our tutorial] for Lightweight Contracts. After successfully uploading the contracts, you will observe the following in the Contracts menu:&lt;br /&gt;
&lt;br /&gt;
[[File:Uploaded ipfs contract1.jpg|class=img-responsive|border|center]]&lt;br /&gt;
&lt;br /&gt;
Your Ardor node is now connected to the IPFS node. If you are wondering which IPFS node is exactly connected, it&amp;#039;s to the one with default IPFS settings, or you may call it the initial IPFS node (The default address of the IPFS API can be configured, please refer to the Configuring parameters section below).&lt;br /&gt;
&lt;br /&gt;
Now let&amp;#039;s see if the connection was indeed successful. Let&amp;#039;s navigate to the Web UI of the second IPFS node,in our case that is &amp;lt;code&amp;gt;http://localhost:5002/ipfs&amp;lt;/code&amp;gt; and make sure we have uploaded a file.&lt;br /&gt;
&lt;br /&gt;
[[File:Ipfs uploaded file.jpg|class=img-responsive|border|center]]&lt;br /&gt;
&lt;br /&gt;
The next step is to copy the CID of the uploaded file and open the Ardor app. As the name of the contract suggests, we have to issue a transaction with a message, it can be &amp;#039;&amp;#039;Send Money&amp;#039;&amp;#039;, &amp;#039;&amp;#039;Send Message&amp;#039;&amp;#039;, etc., as long as a message can be attached. We will simply send a message and paste the copied CID:&lt;br /&gt;
&lt;br /&gt;
[[File:Send message CID.jpg|class=img-responsive|border|center]]&lt;br /&gt;
&lt;br /&gt;
An important thing to remind here is that the message has to be &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;non-encrypted&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;, otherwise the operation will not work. &lt;br /&gt;
* Wait for the transaction to be confirmed and published to the blockchain &lt;br /&gt;
* Open the Web UI of the initial node &amp;lt;code&amp;gt;localhost:5001/ipfs&amp;lt;/code&amp;gt; &lt;br /&gt;
* Click on &amp;#039;&amp;#039;&amp;#039;FILES&amp;#039;&amp;#039;&amp;#039; on the left panel and as you already guessed, our file should be located in &amp;#039;&amp;#039;&amp;#039;pins&amp;#039;&amp;#039;&amp;#039; menu, &lt;br /&gt;
* You can open it. If you don&amp;#039;t see the file, please refresh the page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Ipfs pin.jpg|class=img-responsive|border|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ipfs pin1.jpg|class=img-responsive|border|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configuring parameters ==&lt;br /&gt;
&lt;br /&gt;
=== Max Pin Size ===&lt;br /&gt;
If you want to limit the size of the pinned files, you can do that by configuring the &amp;#039;&amp;#039;maxPinSize&amp;#039;&amp;#039; parameter.&lt;br /&gt;
It can be done by either adding &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contract.PinToIpfs.param.maxPinSize=size_in_bytes&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; in &amp;#039;&amp;#039;nxt.properties&amp;#039;&amp;#039; file or editing the &amp;#039;&amp;#039;contract.uploader.json&amp;#039;&amp;#039; file and adding this code:&lt;br /&gt;
&lt;br /&gt;
[[File:Max pin size.jpg|frame|none]]&lt;br /&gt;
&lt;br /&gt;
As you can see, the max pin size is set to 1024 bytes.&lt;br /&gt;
&lt;br /&gt;
=== IPFS API Address ===&lt;br /&gt;
The default IPFS API Address can be configured by changing the &amp;#039;&amp;#039;ipfsApiAddress&amp;#039;&amp;#039; parameter. It can be done by either adding &amp;lt;code&amp;gt;contract.PinToIpfs.param.ipfsApiAddress=http://127.0.0.1:5002/api/v0&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;nxt.properties&amp;lt;/code&amp;gt; file or editing the &amp;lt;code&amp;gt;contract.uploader.json&amp;lt;/code&amp;gt; file and adding this code:&lt;br /&gt;
&lt;br /&gt;
[[File:Api address.jpg|frame|none]]&lt;br /&gt;
&lt;br /&gt;
In the example, only the &amp;#039;&amp;#039;Port&amp;#039;&amp;#039; is changed from 5001 to 5002.&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Almonte</name></author>
	</entry>
</feed>