# How to install cookbook offline?

**URL:** <https://discourse.chef.io/t/how-to-install-cookbook-offline/9142>\
**Category:** Chef Infra (archive)\
**Created:** [August 12, 2016, 3:18pm UTC](https://discourse.chef.io/t/how-to-install-cookbook-offline/9142 "2016-08-12T15:18:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nic\_chef](https://avatars.discourse-cdn.com/v4/letter/n/fbc32d/32.png) [@nic\_chef](https://discourse.chef.io/u/nic_chef)\
**Post date:** [August 12, 2016, 3:18pm UTC](https://discourse.chef.io/t/how-to-install-cookbook-offline/9142/1 "2016-08-12T15:18:58Z")

</div>

Is there a way to install chef cookbooks offline, because our servers are behind the firewall, by example this cookbook **line-cookbook-master.zip** , i have uploaded to my Linux work station and unzipped it in: my **/root/chef-repo/cookbooks** but when i run **knife cookbook upload line-cookbook-master** i get this error:  
**ERROR: Could not find cookbook line-cookbook-master in your cookbook path, skipping it**  
**Uploaded 0 cookbook.**  
Thank you for your help in advance.

---

<div class="post-metadata">

**Author:** ![carlos727](https://avatars.discourse-cdn.com/v4/letter/c/58f4c7/32.png) [@carlos727](https://discourse.chef.io/u/carlos727)\
**Post date:** [August 12, 2016, 8:08pm UTC](https://discourse.chef.io/t/how-to-install-cookbook-offline/9142/2 "2016-08-12T20:08:25Z")

</div>

Hi @nic_chef, you want to run locally the cookbook in your server ?

---

<div class="post-metadata">

**Author:** ![nic\_chef](https://avatars.discourse-cdn.com/v4/letter/n/fbc32d/32.png) [@nic\_chef](https://discourse.chef.io/u/nic_chef)\
**Post date:** [August 13, 2016, 6:28pm UTC](https://discourse.chef.io/t/how-to-install-cookbook-offline/9142/3 "2016-08-13T18:28:33Z")

</div>

No, I want to uploaded from my Linux work station to the chef server, how do I do that? As per my previous message, the upload command did not work… That command works with cookbooks created locally on my work station but not the one I downloaded from the chef web site.

---

<div class="post-metadata">

**Author:** ![fulliautomatix](https://avatars.discourse-cdn.com/v4/letter/f/a6a055/32.png) [@fulliautomatix](https://discourse.chef.io/u/fulliautomatix)\
**Post date:** [August 13, 2016, 7:12pm UTC](https://discourse.chef.io/t/how-to-install-cookbook-offline/9142/4 "2016-08-13T19:12:49Z")

</div>

Try creating the cookbook with same name you downloaded and replace it with  
the download. Then run the upload command it should work.

---

<div class="post-metadata">

**Author:** ![Matt\_Wrock](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/matt_wrock/32/3394_2.png) [@Matt\_Wrock](https://discourse.chef.io/u/Matt_Wrock)\
**Post date:** [August 13, 2016, 7:18pm UTC](https://discourse.chef.io/t/how-to-install-cookbook-offline/9142/5 "2016-08-13T19:18:54Z")

</div>

Keep in mind that the actual cookbook name can be different from the directory name. The canonical name is located in the cookbook’s `metadata.rb` in the `name` setting. I am guessing that you are using the `line` cookbook. If you download the tar.gz from that cookbook’s github site, the file is line-cookbook-master.zip but the true cookbook name is `line`.

---

<div class="post-metadata">

**Author:** ![nic\_chef](https://avatars.discourse-cdn.com/v4/letter/n/fbc32d/32.png) [@nic\_chef](https://discourse.chef.io/u/nic_chef)\
**Post date:** [August 15, 2016, 9:31am UTC](https://discourse.chef.io/t/how-to-install-cookbook-offline/9142/6 "2016-08-15T09:31:15Z")

</div>

it worked using the correct name from the **/root/chef-repo/cookbooks/line-cookbook-master/_metadata.rb_**  
Thank u everyone for your help!!!
