create account

Step by step guide to setup a IPFS node by balaz

View this thread on: hive.blogpeakd.comecency.com
· @balaz ·
$47.49
Step by step guide to setup a IPFS node
Nowadays IPFS node is important for running some blockchain applications and nodes. For example, SPKCC uses IPFS and it is important to have a local node running use the configuration if you SPKCC config files. I usually prefer running my nodes using pm2 instead of Docker. But both are good with their own advantages. In my case the nodes are pretty lightweight if I do it with pm2 and also version management is easier for me. So I prefer the non-docker method. 

We are going to be installing `kubo` in this setup guide. The current version of kubo at the time of writing this article was v0.14.0 and before this version, it was called go-ipfs. I was using an older version on one of my servers and recently installed the new version on a different server. I wanted to write this step-by-step guide so that it is useful for me when I want to do it the next time. Of course, it is also helpful for people who are doing their first-time setup as well. 

![image.png](https://images.hive.blog/DQmUPjXAAVosA17u2drB54PpKJbh4L3BqfZPtWUVs3Jmrus/image.png)

## Step 1: Download and exact the setup file

There are two places to get the IPFS setup file. 

https://dist.ipfs.tech/#kubo

The above gives us some details and links to other things if we want. We can download the tar file from there based on the version of our operating system. 

Another alternative place is to check for the new releases of kubo from the GitHub releases page and pick the tar file from there. There will be multiple files available and good to pick the file based on our operating system. 

https://github.com/ipfs/kubo/releases

Use the below command to download the setup file. I wanted these files to be inside a folder, so I created a new directory called ipfs and extracted the file there.

```
mkdir ipfs
wget https://github.com/ipfs/kubo/releases/download/v0.14.0/kubo_v0.14.0_linux-amd64.tar.gz
tar xvfz kubo_v0.14.0_linux-amd64.tar.gz

```

## Step 2: Install IPFS

The next step is to navigate inside the folder and execute `install.sh` file. 

```
cd kubo
sudo ./install.sh
```

After the installation is complete, the below output will be displayed in the logs. 

> Moved ./ipfs to /usr/local/bin

This doesn't mean that the IPFS node is running already. 

## Step 3: Initialize IPFS

The below command is for initializing IPFS. 

```
ipfs init --profile server

The above command will initialize the IPFS node at ./root/.ipfs
```
**Note:** The server profile option is recommended for running in a data center. Using this profile will prevent IPFS from trying to discover local nodes, and reduce network traffic. Some hosting providers also have a policy against running IPFS, unless you use the server profile.

## Step 4: Update the config file

The next step is the navigate to the initialized folder and update the config file. 

```
cd ~\.ipfs
nano config
```

There are no big changes required if you would like to retain the default settings. If you would like to change some of the settings, updating the config file is important. There are two things that people usually change. The first is to update the maximum storage limit. By default, it is 10G and it can be changed to any value based on your need. 

![image.png](https://images.hive.blog/DQmasauwNwrTGyx2BVMTNudy86aPrmwyMEfTCSUPnsEf2av/image.png)

The second change is the port number. Again this is also not a mandatory step but I wanted to change it. In my case, I changed the port number of the API from default 5001 to 4002. You can change it to whatever you want. 

![image.png](https://images.hive.blog/DQmQesECdiai5AvQ8bNXDHoyigLo8iB1y3JL83MQJSPu48x/image.png)

## Step 5: Start the Server

We have to run the server with the help of pm2. If you don't have pm2 installed, you have to first install nodejs and then install pm2. Assuming this should be a known step, I'm not going to cover that part in this tutorial. Use the below command to start the server:

```
pm2 start "ipfs daemon --enable-gc" --name ipfs --time
```

The above command will name the service as `ipfs` and also start the server with garbage collection enabled. If you want to restart the service if the memory consumption is high, you can include other criteria. 

```
pm2 start "ipfs daemon --enable-gc" --name ipfs --time --max-memory-restart 3G
```
The above command will restart the node if the memory goes beyond 3G. You can customize it however you want. 
After the service is started, you can view the logs with the below command:

```
pm2 logs ipfs
```

![image.png](https://images.hive.blog/DQmVPZNdFmm38ng5oUhRj3w76njn6HDvrry2ULLnrn9wk3i/image.png)

Based on the ports we changed, the API server is running in 4002. 

The setup is complete and the IPFS can now be used in your apps. With this IPFS setup, my previous guide to set up the SPKCC node is now outdated. I will try to publish an updated guide including these steps. 

## Upgrading the node

The instructions are pretty much the same for upgrading the node as well. 

---
If you like what I'm doing on Hive, you can vote me as a witness with the links below. 
<center> Vote @balaz as a [Hive Witness](https://vote.hive.uno/@balaz) </center>
<center> Vote @kanibot as a [Hive Engine Witness](https://votify.vercel.app/kanibot) </center>

---

<table>
<tr>
<td>
<center><a href="https://discord.gg/bGmS2tE"><img src="https://images.hive.blog/DQmdthy4q4vyefBYmjMJtx7qHBmLnCfP2btiRPhRyc2U8hP/Indiaunited.png"/></a></center>
</td>
<td>
<center><a href="https://kanibot.com/"><img src="https://images.hive.blog/DQmdm8hKPz9TZL8Gd8bPyeVHm9hfgMqqiHcKL8283RBv2eH/Kanibot.png"/></a></center>
</td>
<td>
<center><a href="https://netbox.global/r/balanbx"><img src="https://images.hive.blog/DQma1a9t6rceDQYvMt6FhNkHuUUjAkQssZHrLJcXKfiQBFd/NetboxGlobal.png"/></a></center>
</td>
<tr>
<td>
<center><a href="https://r.honeygain.me/BALA4F8CD5"><img src="https://images.hive.blog/DQmdCZg8z6sxVukSdPm2kXRAhhnySqPZqK9YQ5hco65sp4n/Honeygain.png"/></a></center>
</td>
<td>
<center><a href="https://www.privex.io/?r=bala41288"><img src="https://images.hive.blog/DQmPB85eAMrQNGV7C4ykbfVTDNaiGmb8PfuiFr2AL8N8JQm/Privex.png"/></a></center>
</td>
<td>
<center><a href="https://www.publish0x.com/?a=YRdG6knybD"><img src="https://images.hive.blog/DQmcb3f3oJvjyxyScbim4gKPAnrHTyXjYtwk7HeC9aTN9Pn/Publish0x.png"/></a></center>
</td>
</tr>
</tr>
</table>

---

Posted with [STEMGeeks](https://stemgeeks.net)
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 171 others
👎  
properties (23)
authorbalaz
permlinkstep-by-step-guide-to-setup-a-ipfs-node
categoryhive-163521
json_metadata{"tags":["ipfs","hive-engine","guide","coding","server","spkcc","honeycomb","neoxian","archon","stem"],"users":["balaz","kanibot"],"image":["https://images.hive.blog/DQmUPjXAAVosA17u2drB54PpKJbh4L3BqfZPtWUVs3Jmrus/image.png","https://images.hive.blog/DQmasauwNwrTGyx2BVMTNudy86aPrmwyMEfTCSUPnsEf2av/image.png","https://images.hive.blog/DQmQesECdiai5AvQ8bNXDHoyigLo8iB1y3JL83MQJSPu48x/image.png","https://images.hive.blog/DQmVPZNdFmm38ng5oUhRj3w76njn6HDvrry2ULLnrn9wk3i/image.png","https://images.hive.blog/DQmdthy4q4vyefBYmjMJtx7qHBmLnCfP2btiRPhRyc2U8hP/Indiaunited.png","https://images.hive.blog/DQmdm8hKPz9TZL8Gd8bPyeVHm9hfgMqqiHcKL8283RBv2eH/Kanibot.png","https://images.hive.blog/DQma1a9t6rceDQYvMt6FhNkHuUUjAkQssZHrLJcXKfiQBFd/NetboxGlobal.png","https://images.hive.blog/DQmdCZg8z6sxVukSdPm2kXRAhhnySqPZqK9YQ5hco65sp4n/Honeygain.png","https://images.hive.blog/DQmPB85eAMrQNGV7C4ykbfVTDNaiGmb8PfuiFr2AL8N8JQm/Privex.png","https://images.hive.blog/DQmcb3f3oJvjyxyScbim4gKPAnrHTyXjYtwk7HeC9aTN9Pn/Publish0x.png"],"links":["https://dist.ipfs.tech/#kubo"],"app":"stemgeeks/0.1","format":"markdown","canonical_url":"https://stemgeeks.net/@balaz/step-by-step-guide-to-setup-a-ipfs-node"}
created2022-09-16 04:56:24
last_update2022-09-16 04:56:24
depth0
children8
last_payout2022-09-23 04:56:24
cashout_time1969-12-31 23:59:59
total_payout_value23.768 HBD
curator_payout_value23.718 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length6,379
author_reputation21,581,277,076,455
root_title"Step by step guide to setup a IPFS node"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id116,658,505
net_rshares73,807,287,510,740
author_curate_reward""
vote details (236)
@curation-cartel ·
![1UP-PIZZA.png](https://files.peakd.com/file/peakd-hive/curation-cartel/23xediR4hotaNsS5pUJrmYVg3YGeTLpui41uCij2jhUDZ4uFT84zoGJf8a8VnfELXLJgt.png) |  <div class="phishy"><u><h4>You have received a __1UP__ from @gwajnberg!</h4></u></div> The @oneup-cartel will soon upvote you with:<hr> __@bee-curator, @stem-curator, @neoxag-curator__ <hr>_And they will bring !PIZZA 🍕._
-|-

<sup>[Learn more](https://peakd.com/hive-102223/@flauwy/the-curation-cartel-1up-trigger-smart-voting-mana-and-high-delegation-returns-for-14-different-tribes) about our delegation service to earn daily rewards. Join the Cartel on [Discord](https://discord.gg/mvtAneE3Ca).</sup>
properties (22)
authorcuration-cartel
permlinkre-step-by-step-guide-to-setup-a-ipfs-node-20220916t151833z
categoryhive-163521
json_metadata"{"app": "beem/0.24.26"}"
created2022-09-16 15:18:33
last_update2022-09-16 15:18:33
depth1
children0
last_payout2022-09-23 15:18:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length654
author_reputation1,123,882,653,763
root_title"Step by step guide to setup a IPFS node"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id116,670,217
net_rshares0
@gwajnberg ·
Good for SPKCC users! Your posts are very helpful into the hive world programming
!1UP
<a href="https://discord.gg/zQrvxAu7mu">
<img src="https://files.peakd.com/file/peakd-hive/thecuriousfool/23wCNFDyCLJu1v77TTg2MYKkd7XWkgF9fhiLujTDAaLaUz7H4AaQkDentB5UMVS8FcrVs.png"></a>
👍  , , ,
properties (23)
authorgwajnberg
permlinkrib6dy
categoryhive-163521
json_metadata{"tags":["stem"],"image":["https://files.peakd.com/file/peakd-hive/thecuriousfool/23wCNFDyCLJu1v77TTg2MYKkd7XWkgF9fhiLujTDAaLaUz7H4AaQkDentB5UMVS8FcrVs.png"],"links":["https://discord.gg/zQrvxAu7mu"],"app":"stemgeeks/0.1","canonical_url":"https://stemgeeks.net/@gwajnberg/rib6dy"}
created2022-09-16 15:15:33
last_update2022-09-16 15:15:33
depth1
children0
last_payout2022-09-23 15:15:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length272
author_reputation364,736,081,958,753
root_title"Step by step guide to setup a IPFS node"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id116,670,136
net_rshares1,749,941,202
author_curate_reward""
vote details (4)
@hivebuzz ·
Congratulations @balaz! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s):

<table><tr><td><img src="https://images.hive.blog/60x70/http://hivebuzz.me/@balaz/posts.png?202209160757"></td><td>You published more than 10 posts.<br>Your next target is to reach 20 posts.</td></tr>
</table>

<sub>_You can view your badges on [your board](https://hivebuzz.me/@balaz) and compare yourself to others in the [Ranking](https://hivebuzz.me/ranking)_</sub>
<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub>


To support your work, I also upvoted your post!


**Check out the last post from @hivebuzz:**
<table><tr><td><a href="/hive-106258/@hivebuzz/hivefest-2022-contest"><img src="https://images.hive.blog/64x128/https://i.imgur.com/GFdCYKj.jpg"></a></td><td><a href="/hive-106258/@hivebuzz/hivefest-2022-contest">HiveFest⁷ Meetings Contest</a></td></tr><tr><td><a href="/hive-106258/@hivebuzz/hivefest-2022-bos"><img src="https://images.hive.blog/64x128/https://i.imgur.com/sCBFjhf.png"></a></td><td><a href="/hive-106258/@hivebuzz/hivefest-2022-bos">HiveFest⁷ - Participate in the Balls of Steel tournament and get a new badge</a></td></tr><tr><td><a href="/hive-122221/@hivebuzz/lpud-202209"><img src="https://images.hive.blog/64x128/https://i.imgur.com/pVZi2Md.png"></a></td><td><a href="/hive-122221/@hivebuzz/lpud-202209">New badge - LEO Power Up Day - September 15, 2022</a></td></tr></table>

###### Support the HiveBuzz project. [Vote](https://hivesigner.com/sign/update_proposal_votes?proposal_ids=%5B%22199%22%5D&approve=true) for [our proposal](https://peakd.com/me/proposals/199)!
properties (22)
authorhivebuzz
permlinknotify-balaz-20220916t082140
categoryhive-163521
json_metadata{"image":["http://hivebuzz.me/notify.t6.png"]}
created2022-09-16 08:21:42
last_update2022-09-16 08:21:42
depth1
children0
last_payout2022-09-23 08:21:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,697
author_reputation369,193,623,600,301
root_title"Step by step guide to setup a IPFS node"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id116,661,312
net_rshares0
@hiveupme ·
<center>
<sup>Congratulations, @balaz Your Post Got <b>100%</b> Boost.</sup>
<sup>@theguruasia Burnt <b>381.126</b> <b>UPME</b> & We Followed That Lead.</sup>

<img src="https://files.peakd.com/file/peakd-hive/hiveupme/M3wgTwQC-hiveupme.png" alt="upme.link">
---
<sup>Contact Us : [CORE / VAULT Token Discord Channel](https://discord.gg/XYMrvyr)</sup>
</center>
properties (22)
authorhiveupme
permlink20220916t220147450z
categoryhive-163521
json_metadata{"tags":["curation","delegation","hiveupme"],"app":"curation-bot/4.0","format":"markdown"}
created2022-09-16 22:01:48
last_update2022-09-16 22:01:48
depth1
children0
last_payout2022-09-23 22:01:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length368
author_reputation6,010,552,098,649
root_title"Step by step guide to setup a IPFS node"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id116,679,348
net_rshares0
@indiaunited ·
Indiaunited Curation 1663319579089
This post has been manually curated by @bhattg from Indiaunited community. Join us on our [Discord Server](https://discord.gg/bGmS2tE). 

Do you know that you can earn a passive income by delegating to @indiaunited. We share 100 % of the curation rewards with the delegators. 

Here are some handy links for delegations: [100HP](https://hivesigner.com/sign/delegateVestingShares?delegator=&delegatee=indiaunited&vesting_shares=181239.69302222386%20VESTS), [250HP](https://hivesigner.com/sign/delegateVestingShares?delegator=&delegatee=indiaunited&vesting_shares=453099.23255555966%20VESTS), [500HP](https://hivesigner.com/sign/delegateVestingShares?delegator=&delegatee=indiaunited&vesting_shares=906198.4651111193%20VESTS), [1000HP](https://hivesigner.com/sign/delegateVestingShares?delegator=&delegatee=indiaunited&vesting_shares=1812396.9302222386%20VESTS). 

Read our latest [announcement post](https://hive.blog/hive-186042/@indiaunited/indiaunited-2-0-active-again-with-a-lot-more-energy-this-time) to get more information. 

[![image.png](https://files.peakd.com/file/peakd-hive/bala41288/46eaz12N-image.png)](https://discord.gg/bGmS2tE) 

<sub>**Please contribute to the community by upvoting this comment and posts made by @indiaunited.**</sub>
properties (22)
authorindiaunited
permlinkindiaunited-1663319579089
categoryhive-163521
json_metadata{"app":"hiveblog/0.1","tags":["ipfs","hive-engine","guide","coding","server","spkcc","honeycomb","neoxian","archon","stem"]}
created2022-09-16 09:12:57
last_update2022-09-16 09:12:57
depth1
children0
last_payout2022-09-23 09:12:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,253
author_reputation95,100,389,667,134
root_title"Step by step guide to setup a IPFS node"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id116,662,209
net_rshares0
@linlove ·
Hi @Balaz, I find your posts very interesting especially for those of "steps by steps".

Just 2 questions:
* Do you have local servers or do you rent remote servers?
* Do you have any suggestions or offers for remote servers?
properties (22)
authorlinlove
permlinkre-balaz-2022917t1206849z
categoryhive-163521
json_metadata{"tags":["ipfs","hive-engine","guide","coding","server","spkcc","honeycomb","neoxian","archon","stem"],"app":"ecency/3.0.26-vision","format":"markdown+html"}
created2022-09-17 11:00:06
last_update2022-09-17 11:00:06
depth1
children0
last_payout2022-09-24 11:00:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length225
author_reputation12,368,630,499,812
root_title"Step by step guide to setup a IPFS node"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id116,691,115
net_rshares0
@manniman ·
I do have a hickup with the Docker/NGINX setup of the SPK ClaimChainNote, the API doesn't get adequately published since the last pull and build. Are you running this config + caddy for your note?
properties (22)
authormanniman
permlinkre-balaz-rif960
categoryhive-163521
json_metadata{"tags":["hive-163521"],"app":"peakd/2022.07.1"}
created2022-09-18 20:06:00
last_update2022-09-18 20:06:00
depth1
children0
last_payout2022-09-25 20:06:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length196
author_reputation77,790,724,868,389
root_title"Step by step guide to setup a IPFS node"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id116,731,738
net_rshares0
@pizzabot ·
<center>PIZZA! 


PIZZA Holders sent <strong>$PIZZA</strong> tips in this post's comments:
@curation-cartel<sub>(17/20)</sub> tipped @balaz (x1)


<sub>Please <a href="https://vote.hive.uno/@pizza.witness">vote for pizza.witness</a>!</sub></center>
properties (22)
authorpizzabot
permlinkre-step-by-step-guide-to-setup-a-ipfs-node-20220916t151943z
categoryhive-163521
json_metadata"{"app": "beem/0.24.19"}"
created2022-09-16 15:19:42
last_update2022-09-16 15:19:42
depth1
children0
last_payout2022-09-23 15:19:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length248
author_reputation7,455,222,562,069
root_title"Step by step guide to setup a IPFS node"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id116,670,245
net_rshares0