# Create regisrtry via rancher cli

**URL:** <https://forums.suse.com/t/create-regisrtry-via-rancher-cli/10638>\
**Category:** SUSE Rancher Prime\
**Created:** [June 1, 2018, 4:09pm UTC](https://forums.suse.com/t/create-regisrtry-via-rancher-cli/10638 "2018-06-01T16:09:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeremyweber-np](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/jeremyweber-np/32/4190_2.png) [@jeremyweber-np](https://forums.suse.com/u/jeremyweber-np)\
**Post date:** [June 1, 2018, 4:09pm UTC](https://forums.suse.com/t/create-regisrtry-via-rancher-cli/10638/1 "2018-06-01T16:09:27Z")

</div>

Is it possible to create a registry via the cli or in some other way besides using the UI?

---

<div class="post-metadata">

**Author:** ![afgane](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/afgane/32/3796_2.png) [@afgane](https://forums.suse.com/u/afgane)\
**Post date:** [June 4, 2018, 4:08pm UTC](https://forums.suse.com/t/create-regisrtry-via-rancher-cli/10638/2 "2018-06-04T16:08:06Z")

</div>

If by registry you mean another entry in the app catalog, you can use the REST API (e.g., [https://github.com/afgane/ansible-rancher/blob/master/roles/rancher/tasks/main.yml#L225](https://github.com/afgane/ansible-rancher/blob/master/roles/rancher/tasks/main.yml#L225)). I don’t know about the CLI.

---

<div class="post-metadata">

**Author:** ![jeremyweber-np](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/jeremyweber-np/32/4190_2.png) [@jeremyweber-np](https://forums.suse.com/u/jeremyweber-np)\
**Post date:** [June 4, 2018, 4:21pm UTC](https://forums.suse.com/t/create-regisrtry-via-rancher-cli/10638/3 "2018-06-04T16:21:12Z")

</div>

I was speaking about a docker registry, like dockerhub, quay etc… I dont think there is a way to do so through the cli.

---

<div class="post-metadata">

**Author:** ![afgane](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/afgane/32/3796_2.png) [@afgane](https://forums.suse.com/u/afgane)\
**Post date:** [June 4, 2018, 11:34pm UTC](https://forums.suse.com/t/create-regisrtry-via-rancher-cli/10638/4 "2018-06-04T23:34:32Z")

</div>

Again, don’t know about the CLI but you can just wrap an API call. If you monitor what’s going on in the dev console in the browser when you add it there, then just replicate it from a shell script.
