# Can one server install two Kong?

**URL:** <https://discuss.konghq.com/t/can-one-server-install-two-kong/6775>\
**Category:** Questions\
**Created:** [July 24, 2020, 2:01am UTC](https://discuss.konghq.com/t/can-one-server-install-two-kong/6775 "2020-07-24T02:01:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![wangx8](https://avatars.discourse-cdn.com/v4/letter/w/9d8465/32.png) [@wangx8](https://discuss.konghq.com/u/wangx8)\
**Post date:** [July 24, 2020, 2:01am UTC](https://discuss.konghq.com/t/can-one-server-install-two-kong/6775/1 "2020-07-24T02:01:24Z")

</div>

I have installed Kong in one server (Red Hat) and it is running successfully. Can I install other Kong on this server? If can, how can I do it? Are there any documents? Thank you!

---

<div class="post-metadata">

**Author:** ![hisham](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hisham/32/14_2.png) [@hisham](https://discuss.konghq.com/u/hisham)\
**Post date:** [July 27, 2020, 3:44pm UTC](https://discuss.konghq.com/t/can-one-server-install-two-kong/6775/2 "2020-07-27T15:44:48Z")

</div>

Yes, as long as each Kong runs on its own prefix directory and has its own ports configured. The various `kong` CLI commands (`kong migrations`, `kong start`, etc.) accept a `-c` flag where you can point to a different `kong.conf` file. The default one is at `/etc/kong/kong.conf`, but you can have another one containing different values for `prefix`, `proxy_listen`, `admin_listen`, etc. At the very least you need to have different values for `prefix` and all the `*_listen` settings. If you’re running Kong with a database, you also need to have it point to a different data store (it can be the same Postgres database with a different schema, for example).

---

<div class="post-metadata">

**Author:** ![wangx8](https://avatars.discourse-cdn.com/v4/letter/w/9d8465/32.png) [@wangx8](https://discuss.konghq.com/u/wangx8)\
**Post date:** [July 28, 2020, 1:12am UTC](https://discuss.konghq.com/t/can-one-server-install-two-kong/6775/3 "2020-07-28T01:12:03Z")

</div>

Thank you for your answer. I understand your reply in general but I still have a question about how to install the kong on its prefix path? For example, I used the ‘sudo yum install kong-xxxx’ on my server and the path is decided by kong instead of me.

---

<div class="post-metadata">

**Author:** ![niaomingjian](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/niaomingjian/32/1979_2.png) [@niaomingjian](https://discuss.konghq.com/u/niaomingjian)\
**Post date:** [August 7, 2020, 8:24am UTC](https://discuss.konghq.com/t/can-one-server-install-two-kong/6775/4 "2020-08-07T08:24:45Z")

</div>

Do we need to install kong twice with `yum` command? I don’t think so.  
As @hisham said, we can start various kong instances with different kong.conf files (using `-c` flag) which define values for kong’s configurations and different prefix directory (using `-p` flag).

kong.conf.default says:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/konghq/original/2X/1/123da67a69c5786eb4f9bd9305022fd9ab9ef2f2.png)

I’m also wondering how to do if you really want to install kong twice, for example, 2 different versions. Maybe we need other tools to assist this kind of task.

---

<div class="post-metadata">

**Author:** ![tyree731](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/tyree731/32/1374_2.png) [@tyree731](https://discuss.konghq.com/u/tyree731)\
**Post date:** [August 7, 2020, 1:20pm UTC](https://discuss.konghq.com/t/can-one-server-install-two-kong/6775/5 "2020-08-07T13:20:16Z")

</div>

You do not need to install Kong twice for this to work.

---

<div class="post-metadata">

**Author:** ![vinicius.mignot](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/vinicius.mignot/32/3442_2.png) [@vinicius.mignot](https://discuss.konghq.com/u/vinicius.mignot)\
**Post date:** [August 7, 2020, 3:51pm UTC](https://discuss.konghq.com/t/can-one-server-install-two-kong/6775/6 "2020-08-07T15:51:03Z")

</div>

As pointed by @tyree731, you don’t need to install Kong twice to use two different prefixes. But if you really want to have two different versions of Kong installed, that’s not easily achieved using `yum`. Your best bet is using building the sources, but be aware that you might face dependency problems, like needing two different OpenResty installations.
