[IPFS Tutorial #1] - Host Your Images Online Forever with IPFS by hsynterkr

View this thread on steempeak.com
· @hsynterkr · (edited)
$91.59
[IPFS Tutorial #1] - Host Your Images Online Forever with IPFS
![](https://ipfs.io/ipfs/QmTgtbb4LckHaXh1YhpNcBu48cFY8zgT1Lh49q7q7ksf3M/raster-generated/ipfs-logo-text-512-ice.png)
><center>[source](https://ipfs.io/ipfs/QmTgtbb4LckHaXh1YhpNcBu48cFY8zgT1Lh49q7q7ksf3M)</center>
#### What Will I Learn?

- You will learn how to create an IPFS node.
- You will learn how to keep the IPFS node connected to the network constantly.
- You will learn how you can distribute your photos or files with IPFS.

#### Requirements

- An Ubuntu Server (Digitalocean, AWS etc.)
- A few sample photos to keep in IPFS.

#### Difficulty
- Basic/Intermediate

#### What is IPFS
IPFS is a peer-to-peer protocol where each node stores a collection of hashed files, images, videos etc. It is a distributed peer-to-peer file system which aims to transfer files at high speed and security and to make it impossible to interfere from the outside due to its distributed structure.

#### Download & Run an IPFS Node
* Go Programming Language must be installed on your ubuntu server.  If it is not installed, you can easily install it with the following command.
````
sudo apt-get install golang-go -y
````
* Download the Go-IPFS software with wget to create a node. You can check the versions on this [site](https://dist.ipfs.io/#go-ipfs) Currently the latest version is 0.4.14.
````
wget https://dist.ipfs.io/go-ipfs/v0.4.14/go-ipfs_v0.4.14_linux-386.tar.gz

````
* You have to extract the archive with the following command.
````
tar xvfz go-ipfs_v0.4.14_linux-386.tar.gz
````
* Now you need to run following commands to install the IPFS to the server globally.
````
cd go-ipfs
sudo ./install.sh
````
* Let's initialize an IPFS node.
````
ipfs init
````
* After IPFS is initialization, you can run the IPFS node with the following command.
````
ipfs daemon
````
![image.png](https://cdn.utopian.io/posts/363e653512e48afe098d3f3b3c3533e5156bimage.png)

#### How to run an IPFS Node Forever (Crash Prevention)
If the IPFS server crashes due to any connection problem, it is necessary to restart it automatically. Ubuntu Service is the best solution for cases like this.

You can start to create a service with the following commands.

````
cd /lib/systemd/system/
nano ipfs.service
````
Paste the following codes. This allows to automatically restart the iPFS  server in the event of an crash.
````
[Unit]
Description=IPFS
[Service]
ExecStart=/usr/local/bin/ipfs daemon
Restart=always
User=root
Group=root
[Install]
WantedBy=multi-user.target
````
#### Upload a file to IPFS
To upload a file to your IPFS server, you have to send an HTTP POST request to the server you created. 

* Here is an example with Postman
![image.png](https://cdn.utopian.io/posts/34b67f839d98d17847c87c2340593bebc09fimage.png)

<br>
<br>

<hr>
I used steemia.net address. This is an IPFS server I set up for Steemia app. 
 You will use your server address. Here is an example address.

````
167.99.XXX.XXX/api/v0/add
````
The http post request will respond to the Name, Size and Hash of the file you uploaded.
<br>
![image.png](https://cdn.utopian.io/posts/2c773cb4fa1d49acc4f1b6a11e9abf7f4e5cimage.png)

<br>
<br>
With this hash, you can access your file via IPFS gateway. 
````
https://gateway.ipfs.io/ipfs/ {HASH}
https://gateway.ipfs.io/ipfs/QmaJVawuxkDnKxE6tFDT1V6xVjag3wDCG2BVBDjfwEwkLJ
````

<br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@hsynterkr/host-your-images-online-forever-with-ipfs">Utopian.io -  Rewarding Open Source Contributors</a></em><hr/>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
post_id45,076,311
authorhsynterkr
permlinkhost-your-images-online-forever-with-ipfs
categoryutopian-io
json_metadata"{"staff_pick": null, "platform": "github", "config": {"questions": [{"question": "How many substantial concepts does this tutorial address?", "answers": [{"answer": "4-5 substantial concepts covered in the tutorial.", "value": 10, "answer_id": "tuts-1-a-1"}, {"answer": "2-3 substantial concepts covered in the tutorial.", "value": 7, "answer_id": "tuts-1-a-2"}, {"answer": "1 substantial concept covered in the tutorial.", "value": 3, "answer_id": "tuts-1-a-3"}, {"answer": "More than 5 substantial concepts covered in the tutorial.", "value": 0, "answer_id": "tuts-1-a-4"}], "question_id": "tuts-1"}, {"question": "Does the title and the outline of the tutorial properly reflect the content?", "answers": [{"answer": "Yes, it is very clear.", "value": 15, "answer_id": "tuts-2-a-1"}, {"answer": "To some extent.", "value": 11.5, "answer_id": "tuts-2-a-2"}, {"answer": "The title is somewhat misleading and/or the outline is not detailed or informative enough.", "value": 4.5, "answer_id": "tuts-2-a-3"}, {"answer": "Title and outline are of little or no relevance to the content of the tutorial.", "value": 0, "answer_id": "tuts-2-a-4"}], "question_id": "tuts-2"}, {"question": "Did the contributor provide supplementary resources, such as code and sample files in the contribution post or a linked GitHub repository?", "answers": [{"answer": "Yes, exceptional supplementary resources are provided including a relevant github repo/gist.", "value": 15, "answer_id": "tuts-3-a-1"}, {"answer": "Supplementary resources provided are of high relevance.", "value": 12, "answer_id": "tuts-3-a-2"}, {"answer": "Contributor provides minimal supplementary resources.", "value": 6, "answer_id": "tuts-3-a-3"}, {"answer": "No supplementary resources were provided.", "value": 0, "answer_id": "tuts-3-a-4"}], "question_id": "tuts-3"}, {"question": "Is the tutorial part of a series?", "answers": [{"answer": "Yes.", "value": 10, "answer_id": "tuts-4-a-1"}, {"answer": "Yes, but it is the first entry in the series.", "value": 7, "answer_id": "tuts-4-a-2"}, {"answer": "No, but it works just fine as a stand-alone tutorial.", "value": 5, "answer_id": "tuts-4-a-3"}, {"answer": "No.", "value": 0, "answer_id": "tuts-4-a-4"}], "question_id": "tuts-4"}, {"question": "Does the tutorial contain sufficient explanatory visuals?", "answers": [{"answer": "Yes, the visual components of the post were adequate in quality and quantity.", "value": 10, "answer_id": "tuts-5-a-1"}, {"answer": "The volume of visual components included was unnecessarily large.", "value": 7, "answer_id": "tuts-5-a-2"}, {"answer": "The post lacked sufficient visualization to easily learn from the content.", "value": 3, "answer_id": "tuts-5-a-3"}, {"answer": "No visualization was presented in this contribution.", "value": 0, "answer_id": "tuts-5-a-4"}], "question_id": "tuts-5"}, {"question": "How unique and/or innovative are the concepts covered in the tutorial?", "answers": [{"answer": "This was the first time I read about the concepts covered.", "value": 10, "answer_id": "tuts-6-a-1"}, {"answer": "The concepts covered were innovative and offer some usefulness.", "value": 7, "answer_id": "tuts-6-a-2"}, {"answer": "I have read several similar ideas and thoughts elsewhere, but this one was of higher quality.", "value": 5, "answer_id": "tuts-6-a-3"}, {"answer": "Such tutorials can be found online with great ease and the contribution add no value to the open source community.", "value": 0, "answer_id": "tuts-6-a-4"}], "question_id": "tuts-6"}, {"question": "How would you describe the formatting, language and overall presentation of the post?", "answers": [{"answer": "The quality of the post is fantastic.", "value": 10, "answer_id": "c-1-a-1"}, {"answer": "The post is of very good quality.", "value": 7, "answer_id": "c-1-a-2"}, {"answer": "The post is poorly written and/or formatted, but readable.", "value": 3, "answer_id": "c-1-a-3"}, {"answer": "The post is really hard to read and the content is barely understandable.", "value": 0, "answer_id": "c-1-a-4"}], "question_id": "c-1"}, {"question": "How would you rate the overall value of this contribution on the open source community and ecosystem?", "answers": [{"answer": "This contribution brings great and impactful value, and can be used for applications outside the specific project.", "value": 20, "answer_id": "c-2-a-1"}, {"answer": "This contribution adds significant value to the open source community and ecosystem, or is of critical importance to the specific project.", "value": 18, "answer_id": "c-2-a-2"}, {"answer": "This contribution adds some value to the open source community and ecosystem or is only valuable to the specific project.", "value": 11, "answer_id": "c-2-a-3"}, {"answer": "This contribution adds no value to the open source community and ecosystem or the specific project.", "value": 0, "answer_id": "c-2-a-4"}], "question_id": "c-2"}]}, "pullRequests": [], "users": ["hsynterkr"], "staff_pick_by": null, "questions": {"total_influence": 0, "voters": ["deathwing", "mcfarhat", "crokkon"], "answers": [{"user": "deathwing", "influence": 100, "answer_id": "tuts-1-a-3", "question_id": "tuts-1"}, {"user": "deathwing", "influence": 100, "answer_id": "tuts-2-a-1", "question_id": "tuts-2"}, {"user": "deathwing", "influence": 100, "answer_id": "tuts-3-a-4", "question_id": "tuts-3"}, {"user": "deathwing", "influence": 100, "answer_id": "tuts-4-a-3", "question_id": "tuts-4"}, {"user": "deathwing", "influence": 100, "answer_id": "tuts-5-a-3", "question_id": "tuts-5"}, {"user": "deathwing", "influence": 100, "answer_id": "tuts-6-a-1", "question_id": "tuts-6"}, {"user": "deathwing", "influence": 100, "answer_id": "c-1-a-2", "question_id": "c-1"}, {"user": "deathwing", "influence": 100, "answer_id": "c-2-a-3", "question_id": "c-2"}, {"user": "mcfarhat", "influence": 100, "answer_id": "tuts-1-a-2", "question_id": "tuts-1"}, {"user": "mcfarhat", "influence": 100, "answer_id": "tuts-2-a-1", "question_id": "tuts-2"}, {"user": "mcfarhat", "influence": 100, "answer_id": "tuts-3-a-3", "question_id": "tuts-3"}, {"user": "mcfarhat", "influence": 100, "answer_id": "tuts-4-a-3", "question_id": "tuts-4"}, {"user": "mcfarhat", "influence": 100, "answer_id": "tuts-5-a-3", "question_id": "tuts-5"}, {"user": "mcfarhat", "influence": 100, "answer_id": "tuts-6-a-2", "question_id": "tuts-6"}, {"user": "mcfarhat", "influence": 100, "answer_id": "c-1-a-2", "question_id": "c-1"}, {"user": "mcfarhat", "influence": 100, "answer_id": "c-2-a-3", "question_id": "c-2"}, {"user": "crokkon", "influence": 60, "answer_id": "tuts-1-a-2", "question_id": "tuts-1"}, {"user": "crokkon", "influence": 60, "answer_id": "tuts-2-a-1", "question_id": "tuts-2"}, {"user": "crokkon", "influence": 60, "answer_id": "tuts-3-a-3", "question_id": "tuts-3"}, {"user": "crokkon", "influence": 60, "answer_id": "tuts-4-a-3", "question_id": "tuts-4"}, {"user": "crokkon", "influence": 60, "answer_id": "tuts-5-a-3", "question_id": "tuts-5"}, {"user": "crokkon", "influence": 60, "answer_id": "tuts-6-a-3", "question_id": "tuts-6"}, {"user": "crokkon", "influence": 60, "answer_id": "c-1-a-2", "question_id": "c-1"}, {"user": "crokkon", "influence": 60, "answer_id": "c-2-a-3", "question_id": "c-2"}], "most_rated": [{"voters": ["mcfarhat", "crokkon"], "influence": 160, "answer_id": "tuts-1-a-2", "question_id": "tuts-1"}, {"voters": ["deathwing", "mcfarhat", "crokkon"], "influence": 260, "answer_id": "tuts-2-a-1", "question_id": "tuts-2"}, {"voters": ["mcfarhat", "crokkon"], "influence": 160, "answer_id": "tuts-3-a-3", "question_id": "tuts-3"}, {"voters": ["deathwing", "mcfarhat", "crokkon"], "influence": 260, "answer_id": "tuts-4-a-3", "question_id": "tuts-4"}, {"voters": ["deathwing", "mcfarhat", "crokkon"], "influence": 260, "answer_id": "tuts-5-a-3", "question_id": "tuts-5"}, {"voters": ["deathwing"], "influence": 100, "answer_id": "tuts-6-a-1", "question_id": "tuts-6"}, {"voters": ["deathwing", "mcfarhat", "crokkon"], "influence": 260, "answer_id": "c-1-a-2", "question_id": "c-1"}, {"voters": ["deathwing", "mcfarhat", "crokkon"], "influence": 260, "answer_id": "c-2-a-3", "question_id": "c-2"}]}, "app": "utopian/1.0.0", "score": 64, "type": "tutorials", "links": ["https://ipfs.io/ipfs/QmTgtbb4LckHaXh1YhpNcBu48cFY8zgT1Lh49q7q7ksf3M", "https://dist.ipfs.io/#go-ipfs", "https://cdn.utopian.io/posts/363e653512e48afe098d3f3b3c3533e5156bimage.png", "https://cdn.utopian.io/posts/34b67f839d98d17847c87c2340593bebc09fimage.png", "https://cdn.utopian.io/posts/2c773cb4fa1d49acc4f1b6a11e9abf7f4e5cimage.png"], "moderator": {"time": "2018-04-24T11:40:51.616Z", "pending": false, "reviewed": true, "flagged": false, "account": "deathwing"}, "community": "utopian", "tags": ["utopian-io", "ipfs", "blockchain", "development"], "total_influence": 260, "repository": {"full_name": "ipfs/go-ipfs", "owner": {"login": "ipfs"}, "id": 21233191, "fork": false, "html_url": "https://github.com/ipfs/go-ipfs", "name": "go-ipfs"}, "image": ["https://cdn.utopian.io/posts/363e653512e48afe098d3f3b3c3533e5156bimage.png"], "format": "markdown"}"
created2018-04-23 23:09:09
last_update2018-04-29 19:06:42
depth0
children7
net_rshares15,070,658,408,126
last_payout2018-04-30 23:09:09
cashout_time1969-12-31 23:59:59
total_payout_value66.406 SBD
curator_payout_value25.186 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length3,464
author_reputation12,653,836,604,140
root_title"[IPFS Tutorial #1] - Host Your Images Online Forever with IPFS"
beneficiaries
0.
weight1,500
accountutopian.pay
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (42)
@deathwing ·
$2.21
Thanks for the contribution.

----------------------------------------------------------------------
Need help? Write a ticket on https://support.utopian.io.
Chat with us on [Discord](https://discord.gg/uTyJkNm).

**[[utopian-moderator]](https://utopian.io/moderators)**
👍  
properties (23)
post_id45,159,049
authordeathwing
permlinkre-hsynterkr-host-your-images-online-forever-with-ipfs-20180424t114204533z
categoryutopian-io
json_metadata"{"app": "utopian/1.0.0", "community": "utopian", "tags": ["utopian-io"]}"
created2018-04-24 11:42:03
last_update2018-04-24 11:42:03
depth1
children1
net_rshares509,536,920,452
last_payout2018-05-01 11:42:03
cashout_time1969-12-31 23:59:59
total_payout_value2.208 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length270
author_reputation34,940,839,343,940
root_title"[IPFS Tutorial #1] - Host Your Images Online Forever with IPFS"
beneficiaries
0.
weight1,500
accountutopian.pay
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@utopian.tip ·
Hey @deathwing, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!
properties (22)
post_id45,214,221
authorutopian.tip
permlinkre-re-hsynterkr-host-your-images-online-forever-with-ipfs-20180424t114204533z-20180424t182954
categoryutopian-io
json_metadata{}
created2018-04-24 18:29:54
last_update2018-04-24 18:29:54
depth2
children0
net_rshares0
last_payout2018-05-01 18:29:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length159
author_reputation238,049,167,312
root_title"[IPFS Tutorial #1] - Host Your Images Online Forever with IPFS"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@qurator-tier-0 ·
<div class="pull-left"><img src="![Qsmall.png](https://steemitimages.com/DQmcWoZUnPrRW1UdZeVPWhHpnXfkgWAdFHGxMrSgZoxSZw8/Qsmall.png)" /></div>
		
<center>You just received a Tier 0 upvote!  Looking for bigger rewards? Click [here](https://steemit.com/qurator/@qurator/qurator-tier-changes) and learn how to get them or visit us on [Discord](https://discord.gg/nhQehdv)</center>
properties (22)
post_id45,159,505
authorqurator-tier-0
permlinkre-host-your-images-online-forever-with-ipfs-20180424t114515
categoryutopian-io
json_metadata{}
created2018-04-24 11:45:15
last_update2018-04-24 11:45:15
depth1
children0
net_rshares0
last_payout2018-05-01 11:45:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length377
author_reputation59,338,058,627
root_title"[IPFS Tutorial #1] - Host Your Images Online Forever with IPFS"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@crokkon ·
Nice tutorial! I never gave IPFS a try myself, but that reads pretty straight forward. Is a file uploaded to my own server automatically synced with other peers, so is it still available at any later time even if I stop my own daemon? Does my own daemon also store files from others and how much disk space should be available for that?

----------------------------------------------------------------------
Need help? Write a ticket on https://support.utopian.io.
Chat with us on [Discord](https://discord.gg/uTyJkNm).

**[[utopian-moderator]](https://utopian.io/moderators)**
properties (22)
post_id45,336,706
authorcrokkon
permlinkre-hsynterkr-host-your-images-online-forever-with-ipfs-20180425t121641815z
categoryutopian-io
json_metadata"{"app": "utopian/1.0.0", "community": "utopian", "tags": ["utopian-io"]}"
created2018-04-25 12:16:42
last_update2018-04-25 12:16:42
depth1
children1
net_rshares0
last_payout2018-05-02 12:16:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length578
author_reputation75,470,595,669,689
root_title"[IPFS Tutorial #1] - Host Your Images Online Forever with IPFS"
beneficiaries
0.
weight1,500
accountutopian.pay
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@hsynterkr ·
Hello @crokkon,
To be honest I'm still not sure about this issue 😁
We're using IPFS in Steemia app and our server only keep our own files. I'm still researching IPFS, don't forget to inform me when you learned 🙄😅
properties (22)
post_id45,344,449
authorhsynterkr
permlinkre-crokkon-re-hsynterkr-host-your-images-online-forever-with-ipfs-20180425t131326488z
categoryutopian-io
json_metadata"{"app": "steemit/0.1", "users": ["crokkon"], "tags": ["utopian-io"]}"
created2018-04-25 13:13:30
last_update2018-04-25 13:13:30
depth2
children0
net_rshares0
last_payout2018-05-02 13:13:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length212
author_reputation12,653,836,604,140
root_title"[IPFS Tutorial #1] - Host Your Images Online Forever with IPFS"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@utopian-io ·
### Hey @hsynterkr! Thank you for the great work you've done!
We're already looking forward to your next contribution!
#### Fully Decentralized Rewards
We hope you will take the time to share your expertise and knowledge by rating contributions made by others on Utopian.io to help us reward the best contributions together.
#### Utopian Witness!
<a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1">Vote for Utopian Witness!</a> We are made of developers, system administrators, entrepreneurs, artists, content creators, thinkers. We embrace every nationality, mindset and belief.

**Want to chat? Join us on Discord https://discord.me/utopian-io**
properties (22)
post_id45,429,490
authorutopian-io
permlinkre-hsynterkr-host-your-images-online-forever-with-ipfs-20180426t010047526z
categoryutopian-io
json_metadata"{"app": "utopian/1.0.0", "community": "utopian", "tags": ["utopian-io"]}"
created2018-04-26 01:00:48
last_update2018-04-26 01:00:48
depth1
children0
net_rshares0
last_payout2018-05-03 01:00:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length689
author_reputation152,913,012,544,965
root_title"[IPFS Tutorial #1] - Host Your Images Online Forever with IPFS"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@steem881 ·
Hi LOVE YOUR POST MAN!!! LIKE MY POST TOO!!!!! HERE IS THE LINK: https://steemit.com/bots/@abusereports/last-minute-upvote-list-2018-05-02 
properties (22)
post_id47,007,472
authorsteem881
permlinkre-host-your-images-online-forever-with-ipfs-20180505t043118
categoryutopian-io
json_metadata{}
created2018-05-05 04:31:18
last_update2018-05-05 04:31:18
depth1
children0
net_rshares0
last_payout2018-05-12 04:31:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length139
author_reputation-796,363,068,104
root_title"[IPFS Tutorial #1] - Host Your Images Online Forever with IPFS"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000