# Login page customization

**URL:** <https://support.openanalytics.eu/t/login-page-customization/727>\
**Category:** ShinyProxy\
**Created:** [September 10, 2018, 1:54pm UTC](https://support.openanalytics.eu/t/login-page-customization/727 "2018-09-10T13:54:34Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![theja](https://support.openanalytics.eu/letter_avatar_proxy/v4/letter/t/a587f6/32.png) [@theja](https://support.openanalytics.eu/u/theja)\
**Post date:** [September 10, 2018, 1:54pm UTC](https://support.openanalytics.eu/t/login-page-customization/727/1 "2018-09-10T13:54:34Z")

</div>

Hi,

Is there any way to customize the login page in ShinyProxy v2? With the 1.x version I could modify the templates/login.html in the jar. But in v2 there is no such a file.

Thanks.  
Tibor

---

<div class="post-metadata">

**Author:** ![theja](https://support.openanalytics.eu/letter_avatar_proxy/v4/letter/t/a587f6/32.png) [@theja](https://support.openanalytics.eu/u/theja)\
**Post date:** [September 10, 2018, 4:10pm UTC](https://support.openanalytics.eu/t/login-page-customization/727/2 "2018-09-10T16:10:11Z")

</div>

Hi,  
I found the lib/containerproxy.jar, which responsible for this. The good news: if we put the login.html (from that jar) to the template-path directory defined in application.yml (e.g. /etc/shinyproxy/templates/2col), we can customize the login-page “on-the-fly”, without restarting the shinyproxy.  
Thanks OpenAnalytics, nice feature!  
Plus: If we put the navbar.html one level up (relative to login.html) into the fragments directory (in my example: /etc/shinyproxy/templates/fragments/navbar.html) from the shinyproxy.jar, we can customize that too.  
SuperNice feature!  
Thanks again!..  
Tibor

---

<div class="post-metadata">

**Author:** ![Roman\_Lustrik](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/roman_lustrik/32/139_2.png) [@Roman\_Lustrik](https://support.openanalytics.eu/u/Roman_Lustrik)\
**Post date:** [October 4, 2018, 7:47am UTC](https://support.openanalytics.eu/t/login-page-customization/727/3 "2018-10-04T07:47:43Z")

</div>

@theja can you talk a little more where you found that `login.html`? Do I understand your structure correctly?

```
|- shinyproxy.jar
|- templates
   |- 2col
      |- index.html
      |- login.html
```

---

<div class="post-metadata">

**Author:** ![theja](https://support.openanalytics.eu/letter_avatar_proxy/v4/letter/t/a587f6/32.png) [@theja](https://support.openanalytics.eu/u/theja)\
**Post date:** [October 4, 2018, 1:48pm UTC](https://support.openanalytics.eu/t/login-page-customization/727/4 "2018-10-04T13:48:48Z")

</div>

Hi,

In shinyproxy-2.0.4.jar find the \BOOT-INF\lib\containerproxy-0.5.0.jar. In that jar there is the \templates\login.html.  
Put this file to the directory what is defined in application.yml as “template-path”.

Tibor

---

<div class="post-metadata">

**Author:** ![Roman\_Lustrik](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/roman_lustrik/32/139_2.png) [@Roman\_Lustrik](https://support.openanalytics.eu/u/Roman_Lustrik)\
**Post date:** [October 4, 2018, 2:11pm UTC](https://support.openanalytics.eu/t/login-page-customization/727/5 "2018-10-04T14:11:04Z")

</div>

Found it, thank you.

---

<div class="post-metadata">

**Author:** ![Roman\_Lustrik](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/roman_lustrik/32/139_2.png) [@Roman\_Lustrik](https://support.openanalytics.eu/u/Roman_Lustrik)\
**Post date:** [October 8, 2018, 3:07pm UTC](https://support.openanalytics.eu/t/login-page-customization/727/7 "2018-10-08T15:07:30Z")

</div>

Note to self. `login.html` should be positioned like @theja mentioned, exactly where the template “base” is defined in the configuration.  
For css, I placed `login.css` to `.../2col/assets/css/login.css` and used a new path in `login.html`:

```
<link rel="stylesheet" media="screen" th:href="@{/assets/css/login.css}"/>
```

---

<div class="post-metadata">

**Author:** ![Roman\_Lustrik](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/roman_lustrik/32/139_2.png) [@Roman\_Lustrik](https://support.openanalytics.eu/u/Roman_Lustrik)\
**Post date:** [October 9, 2018, 8:19am UTC](https://support.openanalytics.eu/t/login-page-customization/727/8 "2018-10-09T08:19:43Z")

</div>

Note to self 2: I downloaded `navbar.html` from [here](https://github.com/openanalytics/shinyproxy/blob/master/src/main/resources/fragments/navbar.html) and after modifying it, placed it into one folder as specified by @theja. Specifically, in `application.xml` I have `template-path: ./04-custom-html-template/template/2col` and I placed `navbar.html` into `/fragments` folder one folder above template-path.

```
|- shinyproxy_2.0.4.jar
|- 04-custom-html-template
   |- templates
     |+ 1col
     |+ 2col
     |- fragments
        |- navbar.html

```

I need to restart the server for changes to take effect.

---

<div class="post-metadata">

**Author:** ![thomasthomas](https://support.openanalytics.eu/letter_avatar_proxy/v4/letter/t/f6c823/32.png) [@thomasthomas](https://support.openanalytics.eu/u/thomasthomas)\
**Post date:** [October 17, 2018, 6:17pm UTC](https://support.openanalytics.eu/t/login-page-customization/727/9 "2018-10-17T18:17:01Z")

</div>

Is there a way to hide the navbar in certain Shiny Applications?

I have been able to modify the default navbar (after extracting and updating the jar file) but I found no way to hide it. I have several Shiny Applications and there are a few ones when the navbar should be hidden. In large applications, say, that already have some navbar with more details on it (messages, notifications, info and so forth) it would be great if I could hide the html-based navbar. In the meantime though, it would be great to have them at the top - especially where there is a little point in defining app-speciific header.

Best,

Tamas

---

<div class="post-metadata">

**Author:** ![mnazarov](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/mnazarov/32/216_2.png) [@mnazarov](https://support.openanalytics.eu/u/mnazarov)\
**Post date:** [October 18, 2018, 12:19pm UTC](https://support.openanalytics.eu/t/login-page-customization/727/10 "2018-10-18T12:19:08Z")

</div>

Hi @thomasthomas,  
You can hide the navbar completely with the `hide-navbar` option (see [https://www.shinyproxy.io/configuration/#general](https://www.shinyproxy.io/configuration/#general)). Note that this is a general setting, so it will apply to all apps.

---

<div class="post-metadata">

**Author:** ![thomasthomas](https://support.openanalytics.eu/letter_avatar_proxy/v4/letter/t/f6c823/32.png) [@thomasthomas](https://support.openanalytics.eu/u/thomasthomas)\
**Post date:** [October 18, 2018, 8:23pm UTC](https://support.openanalytics.eu/t/login-page-customization/727/11 "2018-10-18T20:23:03Z")

</div>

Yeah, your right. But what I actually thought is that I would show the navbar at certain apps and hide it whenever its needed. It may sound like an unnecessary feature but I wonder how some of you handle this when you deploy small & large applications at the same time. For large apps, it sounds natural to build an app-specific navbar. For small apps though, it would be great to have a temlate and handle it through ShinyProxy rather than within the Shiny app.
