# LDAP Setup for Discourse

**URL:** https://meta.discourse.org/t/ldap-setup-for-discourse/88349
**Category:** Self-hosting
**Tags:** discourse-ldap-auth
**Created:** [May 24, 2018, 7:34am UTC](https://meta.discourse.org/t/ldap-setup-for-discourse/88349 "2018-05-24T07:34:32Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![pprp](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@pprp](https://meta.discourse.org/u/pprp)
#### Post date: [May 24, 2018, 7:34am UTC](https://meta.discourse.org/t/ldap-setup-for-discourse/88349/1 "2018-05-24T07:34:32Z")

</div>

Hi,

I have followed and added almost every thing (LDAP plugin and LDAP configuration at /admin/site\_settings/category/ldap) as per below links to set up LDAP for Discourse:

> [@Install plugins on a self-hosted site](https://meta.discourse.org/t/install-a-plugin/19157):
>
> warning This guide assumes that you have a self-hosted standard installation. We only support the standard method of install here, so these instructions assume you have a [standard install](https://meta.discourse.org/t/142537?silent=true). warning This guide only applies to self-hosted Discourse instances. If you are using a managed hosting service, the available plugins are controlled by your hosting provider. For example, on our hosting [these specific plugins](https://www.discourse.org/plugins) are available by hosting tier. information_source As of mid-2025, [many p…](https://meta.discourse.org/t/373574)

[https://github.com/jonmbake/discourse-ldap-auth](https://github.com/jonmbake/discourse-ldap-auth)

But I still can’t see LDAP option in login page UI.

Could you please let me know, if any other instructions need to follow.. ? to get the LDAP option in login page.

Thank you.

---

<div class="post-metadata">

### Author: ![pprp](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@pprp](https://meta.discourse.org/u/pprp)
#### Post date: [May 25, 2018, 2:22pm UTC](https://meta.discourse.org/t/ldap-setup-for-discourse/88349/2 "2018-05-25T14:22:38Z")

</div>

Hi,

I can directly access with “[https://discourse-xxx.xxx/auth/ldap](https://discourse-xxx.xxx/auth/ldap)” for LDAP login, but I don’t see LDAP pop up after clicking on login button ( as shown in below screen shot).

 ![LDAP](https://global.discourse-cdn.com/meta/original/3X/e/8/e8ebeb5ad0ce575ffeb42dcf99ee1eeeee32e457.JPG)

Can any one please let me know if I will need to modify the Login form in the initial Discourse page to include an extra button that can allow me to redirect to “[https://discourse-xxx.xx/auth/ldap](https://discourse-xxx.xx/auth/ldap)”.

I have installed Discourse in Ubuntu Ubuntu 16.04.3 server and the Discourse version is v2.0.0.beta10

---

<div class="post-metadata">

### Author: ![dnsmichi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dnsmichi/32/379505_2.png) [@dnsmichi](https://meta.discourse.org/u/dnsmichi)
#### Post date: [May 25, 2018, 2:53pm UTC](https://meta.discourse.org/t/ldap-setup-for-discourse/88349/3 "2018-05-25T14:53:35Z")

</div>

Did you disable local logins like shown [here](https://github.com/jonmbake/discourse-ldap-auth#other-tips)? This is what we use in a setup.

---

<div class="post-metadata">

### Author: ![pprp](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@pprp](https://meta.discourse.org/u/pprp)
#### Post date: [May 25, 2018, 4:52pm UTC](https://meta.discourse.org/t/ldap-setup-for-discourse/88349/4 "2018-05-25T16:52:39Z")

</div>

Hi, Thanks very much for the response.

When i disable local login (unchecked " enable local logins" option) and clicking on login button, and I got below blank pop up.

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/1/015e40cc14a07c0e9fd7c2250d25b30e37aaeb01.png)

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [May 25, 2018, 4:57pm UTC](https://meta.discourse.org/t/ldap-setup-for-discourse/88349/5 "2018-05-25T16:57:29Z")

</div>

Did you enable the LDAP plugin and did the basic configuration?

---

<div class="post-metadata">

### Author: ![pprp](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@pprp](https://meta.discourse.org/u/pprp)
#### Post date: [May 25, 2018, 5:14pm UTC](https://meta.discourse.org/t/ldap-setup-for-discourse/88349/6 "2018-05-25T17:14:31Z")

</div>

Hi,

Thank you.

Yes, I have enabled the LDAP plugin and did the basic configuration, which is why I was able to do LDAP authentication with direct URL (“[https://discourse-xxx.xxx/auth/ldap”](https://discourse-xxx.xxx/auth/ldap%E2%80%9D) )as mentioned in above posts.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [May 25, 2018, 5:44pm UTC](https://meta.discourse.org/t/ldap-setup-for-discourse/88349/7 "2018-05-25T17:44:56Z")

</div>

Can you restart the docker container ( `./launcher restart app` ) ?

---

<div class="post-metadata">

### Author: ![pprp](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@pprp](https://meta.discourse.org/u/pprp)
#### Post date: [May 29, 2018, 1:42pm UTC](https://meta.discourse.org/t/ldap-setup-for-discourse/88349/8 "2018-05-29T13:42:59Z")

</div>

Hi,

I did restart the docker container as suggested, but it still does not work.

 ![](https://global.discourse-cdn.com/meta/original/3X/0/1/015e40cc14a07c0e9fd7c2250d25b30e37aaeb01.png)

---

<div class="post-metadata">

### Author: ![dnsmichi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dnsmichi/32/379505_2.png) [@dnsmichi](https://meta.discourse.org/u/dnsmichi)
#### Post date: [May 29, 2018, 2:03pm UTC](https://meta.discourse.org/t/ldap-setup-for-discourse/88349/9 "2018-05-29T14:03:37Z")

</div>

Browser dev console has some errors or hints on the matter?

---

<div class="post-metadata">

### Author: ![pprp](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@pprp](https://meta.discourse.org/u/pprp)
#### Post date: [May 29, 2018, 2:20pm UTC](https://meta.discourse.org/t/ldap-setup-for-discourse/88349/10 "2018-05-29T14:20:34Z")

</div>

Hi, Thank you for the hint.

I checked by cliking F12 in google chrome, and it has below errors in home page:

 ![image](https://global.discourse-cdn.com/meta/original/3X/5/8/5879893b6fc0f40629cdc59162cbbef555c782ab.png)

Uncaught TypeError: Cannot read property ‘addPreProcessor’ of undefined  
at \_plugin-third-party-bbf5e2e3e7e7a22c7391a8d01a610ce18dd03367259d13426ed3751e26a14552.js:23  
at \_plugin-third-party-bbf5e2e3e7e7a22c7391a8d01a610ce18dd03367259d13426ed3751e26a14552.js:24

---

<div class="post-metadata">

### Author: ![dnsmichi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dnsmichi/32/379505_2.png) [@dnsmichi](https://meta.discourse.org/u/dnsmichi)
#### Post date: [May 29, 2018, 3:04pm UTC](https://meta.discourse.org/t/ldap-setup-for-discourse/88349/11 "2018-05-29T15:04:07Z")

</div>

Which version of Discourse is installed?

---

<div class="post-metadata">

### Author: ![pprp](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@pprp](https://meta.discourse.org/u/pprp)
#### Post date: [May 29, 2018, 3:05pm UTC](https://meta.discourse.org/t/ldap-setup-for-discourse/88349/12 "2018-05-29T15:05:57Z")

</div>

#### Installed version:

### [v2.0.0.beta10 +230](https://github.com/discourse/discourse/compare/597095f56ff28583df27add37f9ecd8659b80558...tests-passed)

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [May 29, 2018, 3:16pm UTC](https://meta.discourse.org/t/ldap-setup-for-discourse/88349/13 "2018-05-29T15:16:39Z")

</div>

So it looks like you are using a third-party plugin that is broken. And it’s not the LDAP one.

Can you try [safe-mode](https://meta.discourse.org/t/how-to-use-discourse-safe-mode/53504) ?

---

<div class="post-metadata">

### Author: ![esepjav](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@esepjav](https://meta.discourse.org/u/esepjav)
#### Post date: [May 29, 2018, 4:19pm UTC](https://meta.discourse.org/t/ldap-setup-for-discourse/88349/14 "2018-05-29T16:19:23Z")

</div>

> [@Falco](#):
>
> ks like you are using a third-party plugin that is broken

Hi,  
I think we might have modify site\_setting.yml to be able to see login with ldap button.  
Do you know any idea?

---

<div class="post-metadata">

### Author: ![dnsmichi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dnsmichi/32/379505_2.png) [@dnsmichi](https://meta.discourse.org/u/dnsmichi)
#### Post date: [May 29, 2018, 5:26pm UTC](https://meta.discourse.org/t/ldap-setup-for-discourse/88349/15 "2018-05-29T17:26:31Z")

</div>

We don’t have that in our setup. The JS error should be solved, that’s probably causing the page to not render properly.

@pprp  
Please share the installed plugin lines from your app.yml and any modifications you’ve made to your theme with custom JS in the header, footer, etc. sections.

---

<div class="post-metadata">

### Author: ![esepjav](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@esepjav](https://meta.discourse.org/u/esepjav)
#### Post date: [May 29, 2018, 5:43pm UTC](https://meta.discourse.org/t/ldap-setup-for-discourse/88349/16 "2018-05-29T17:43:05Z")

</div>

## Plugins go here

## see [Install plugins on a self-hosted site](https://meta.discourse.org/t/19157) for details

hooks:  
after\_code:  
- exec:  
cd: $home/plugins  
cmd:  
- git clone [GitHub - discourse/docker\_manager: Plugin for use with discourse docker image · GitHub](https://github.com/discourse/docker_manager.git)  
- git clone [GitHub - discourse/discourse-solved: Allow accepted answers on topics · GitHub](https://github.com/discourse/discourse-solved.git)  
- git clone [GitHub - Jake-Shadle/discourse\_jira: Discourse Onebox plugin for JIRA · GitHub](https://github.com/Jake-Shadle/discourse_jira.git)  
- git clone [GitHub - PoloGT/abbreviation-discourse-plugin: A plugin for discourse to create abbreviation tags · GitHub](https://github.com/PoloGT/abbreviation-discourse-plugin.git)  
- git clone [GitHub - jonmbake/discourse-ldap-auth: Discourse plugin to enable LDAP/Active Directory authentication. · GitHub](https://github.com/jonmbake/discourse-ldap-auth.git)  
- git clone [GitHub - ShaohuaSmile/discourse-jira: Automatically translate JIRA id to a hyperlink to JIRA issue · GitHub](https://github.com/ShaohuaSmile/discourse-jira.git)

---

<div class="post-metadata">

### Author: ![esepjav](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@esepjav](https://meta.discourse.org/u/esepjav)
#### Post date: [May 29, 2018, 5:45pm UTC](https://meta.discourse.org/t/ldap-setup-for-discourse/88349/17 "2018-05-29T17:45:09Z")

</div>

> [@dnsmichi](#):
>
> theme with custom JS in the header, footer, etc. sections.

where is files for " your theme with custom JS in the header, footer, etc. sections." ?

---

<div class="post-metadata">

### Author: ![dnsmichi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dnsmichi/32/379505_2.png) [@dnsmichi](https://meta.discourse.org/u/dnsmichi)
#### Post date: [May 29, 2018, 5:46pm UTC](https://meta.discourse.org/t/ldap-setup-for-discourse/88349/18 "2018-05-29T17:46:03Z")

</div>

Not sure why you are answering instead of @pprp here, is that a colleague of yours?

---

<div class="post-metadata">

### Author: ![esepjav](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@esepjav](https://meta.discourse.org/u/esepjav)
#### Post date: [May 29, 2018, 5:50pm UTC](https://meta.discourse.org/t/ldap-setup-for-discourse/88349/19 "2018-05-29T17:50:37Z")

</div>

yes I am his colleague.

---

<div class="post-metadata">

### Author: ![dnsmichi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dnsmichi/32/379505_2.png) [@dnsmichi](https://meta.discourse.org/u/dnsmichi)
#### Post date: [May 29, 2018, 6:05pm UTC](https://meta.discourse.org/t/ldap-setup-for-discourse/88349/20 "2018-05-29T18:05:32Z")

</div>

I’d say you disable the jira and abbreviation plugins one by one and try to eliminate the error (each line removal with an app rebuild). Those plugins look dated, last commit was 2016. Not sure if they’re still compatible with Discourse, nor if they’re supported.

The abbreviation and jira onebox plugins for example were moved to #plugin:broken-plugin in 2016.

Theme customization happens in the frontend in your admin console, `/admin/customize/themes`. I doubt that this helps though as you’re using plugins which seem broken.

[Next page](https://meta.discourse.org/t/ldap-setup-for-discourse/88349.md?page=2)
