# How can we host our own Ansible Galaxy server?

**URL:** <https://forum.ansible.com/t/how-can-we-host-our-own-ansible-galaxy-server/24470>\
**Category:** Ansible Project\
**Tags:** galaxy-ng\
**Created:** [May 12, 2017, 8:40am UTC](https://forum.ansible.com/t/how-can-we-host-our-own-ansible-galaxy-server/24470 "2017-05-12T08:40:01Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Andrei\_Minca](https://avatars.discourse-cdn.com/v4/letter/d/41988e/32.png) [@Daniel\_Andrei\_Minca](https://forum.ansible.com/u/Daniel_Andrei_Minca)\
**Post date:** [May 12, 2017, 8:40am UTC](https://forum.ansible.com/t/how-can-we-host-our-own-ansible-galaxy-server/24470/1 "2017-05-12T08:40:01Z")

</div>

Hi there,

In our company X we have many Ansible roles & playbooks spread among different repositories, all the playbooks follow the [Ansible playbook best-practices guide](http://docs.ansible.com/ansible/playbooks_best_practices.html).

I’m looking for a way to modularize all those playbook repos.

In order to achieve that, I found that hosting our own Ansible Galaxy server would be the best choice since:

- we can easily **re-use roles** without having **duplicate code** in each repo,
- we can also impose a good standard over Ansible Roles (referring here to properly documenting the role’s **./meta/main.yml** & **README.md** et. al. ),
- not to mention, we would _force_ everyone to create a NEW repo for each role instead of pushing everything in a single repo (calling this practice: _crapload-repo_ = usually the size of Gigabytes and takes some time to download).

So my questions here are:

1. how did you configured your own Ansible Galaxy server?
2. can a simple Nginx server with default nginx.conf do?
3. could you give me a list of **prerequisites** of setting this up, or guide me to some resources?

Thank you!

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [May 12, 2017, 6:25pm UTC](https://forum.ansible.com/t/how-can-we-host-our-own-ansible-galaxy-server/24470/2 "2017-05-12T18:25:56Z")

</div>

You should go to [https://github.com/ansible/galaxy](https://github.com/ansible/galaxy).

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [May 13, 2017, 8:48am UTC](https://forum.ansible.com/t/how-can-we-host-our-own-ansible-galaxy-server/24470/3 "2017-05-13T08:48:08Z")

</div>

An alternative route that we use, replace galaxy with Git repository manager.

In Gitlab we have a group called "Ansible roles".  
Each role have it own git repository in this group with README.md and a meta/main.yml.

In the ansible repositories that need the roles  
requirements.yml:

---

<div class="post-metadata">

**Author:** ![Daniel\_Andrei\_Minca](https://avatars.discourse-cdn.com/v4/letter/d/41988e/32.png) [@Daniel\_Andrei\_Minca](https://forum.ansible.com/u/Daniel_Andrei_Minca)\
**Post date:** [May 14, 2017, 1:29pm UTC](https://forum.ansible.com/t/how-can-we-host-our-own-ansible-galaxy-server/24470/4 "2017-05-14T13:29:49Z")

</div>

Thank you very much Brian & Kai for suggestions.

I find Kai’s approach more tempting to use first. Then if this isn’t going to work out, I’ll try compiling galaxy & running on server.

Regards,

---

<div class="post-metadata">

**Author:** ![Greg\_DeKoenigsberg1](https://avatars.discourse-cdn.com/v4/letter/g/838e76/32.png) [@Greg\_DeKoenigsberg1](https://forum.ansible.com/u/Greg_DeKoenigsberg1)\
**Post date:** [May 14, 2017, 5:57pm UTC](https://forum.ansible.com/t/how-can-we-host-our-own-ansible-galaxy-server/24470/5 "2017-05-14T17:57:00Z")

</div>

If you have a \*lot\* of roles and need things like searchability and  
discoverability via API, Galaxy is a good choice -- but if you don't  
need all of that, Kai's solution is definitely sufficient.

--g

---

<div class="post-metadata">

**Author:** ![Daniel\_Andrei\_Minca](https://avatars.discourse-cdn.com/v4/letter/d/41988e/32.png) [@Daniel\_Andrei\_Minca](https://forum.ansible.com/u/Daniel_Andrei_Minca)\
**Post date:** [May 15, 2017, 12:14pm UTC](https://forum.ansible.com/t/how-can-we-host-our-own-ansible-galaxy-server/24470/6 "2017-05-15T12:14:57Z")

</div>

I wanted to go with Ansible Galaxy at first, but I tried it locally and ansible-container was failing to start the django app because the image doesn’t exist. Also the process of _Powering up Ansible Galaxy_ is not fully documented 🙂 all I did was look how you guys start it in TravisCI.

---

<div class="post-metadata">

**Author:** ![Aidan\_Wong](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/aidan_wong/32/3345_2.png) [@Aidan\_Wong](https://forum.ansible.com/u/Aidan_Wong)\
**Post date:** [June 8, 2021, 4:28pm UTC](https://forum.ansible.com/t/how-can-we-host-our-own-ansible-galaxy-server/24470/7 "2021-06-08T16:28:31Z")

</div>

Hi,

Sorry to revive this old thread, but can someone please point me to documentation on how to use requirements.yml using Git as source instead of Galaxy server?  
Does that approach also use the “ansible-galaxy” cli ?

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [June 8, 2021, 5:01pm UTC](https://forum.ansible.com/t/how-can-we-host-our-own-ansible-galaxy-server/24470/8 "2021-06-08T17:01:21Z")

</div>

See example in requirements example file  
[https://galaxy.ansible.com/docs/using/installing.html#installing-multiple-roles-from-a-file](https://galaxy.ansible.com/docs/using/installing.html#installing-multiple-roles-from-a-file)

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [June 8, 2021, 5:04pm UTC](https://forum.ansible.com/t/how-can-we-host-our-own-ansible-galaxy-server/24470/9 "2021-06-08T17:04:38Z")

</div>

Thank you for this.

Is there any docker /container installation packages?
