# Custom Template for Docker App

**URL:** <https://forum.hestiacp.com/t/custom-template-for-docker-app/9136>\
**Category:** Community Support\
**Created:** [March 23, 2023, 6:27pm UTC](https://forum.hestiacp.com/t/custom-template-for-docker-app/9136 "2023-03-23T18:27:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon134066](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/a/ba9def/32.png) [@anon134066](https://forum.hestiacp.com/u/anon134066)\
**Post date:** [March 23, 2023, 6:27pm UTC](https://forum.hestiacp.com/t/custom-template-for-docker-app/9136/1 "2023-03-23T18:27:16Z")

</div>

Hello guys,

I searched the forum, found some topics, but not the final solution.  
Like other users I want to open a docker app via subdomain and not via port

```auto
App: Uptime Kuma
Port: 3001
Access via IP 123.456.789.1:3001 is working
Access via mydomain.com:3001 is working

```

Objective is access via `status.mydomain.com`

I created two new templates in `/usr/local/hestia/data/templates/web/nginx/`

- uptimekuma.tpl
- uptimekuma.stpl

I have assigned the template as “Proxy Template” in the domain settings for `status.mydomain.com`

In **uptimekuma.tpl** I set:  
`location / { proxy_pass http://%ip%:3001;`

In **uptimekuma.stpl** I set  
`location / { proxy_pass https//%ip%:3001;`

I also executed the command `v-rebuild-user myuser yes`

On opening [status.mydomain.com](http://status.mydomain.com) I get Error 500 (Internal Server Error)

(Oracle Cloud Server with Ubuntu 22.04.2)

I hope you can help me to solve this problem. Thank you 🙂

---

<div class="post-metadata">

**Author:** ![eris](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/eris/32/1241_2.png) [@eris](https://forum.hestiacp.com/u/eris)\
**Post date:** [March 23, 2023, 6:44pm UTC](https://forum.hestiacp.com/t/custom-template-for-docker-app/9136/2 "2023-03-23T18:44:26Z")

</div>

> <https://github.com/jaapmarcus/web-templates/blob/master/templates/nginx/php-fpm/uptime-kuma.tpl>

and

> <https://github.com/jaapmarcus/web-templates/blob/master/templates/nginx/php-fpm/uptime-kuma.stpl>

How ever I only have have them for nginx only setups  
If you use nginx + apache2  
Replace: web\_port with proxy\_port and  
web\_ssl\_port with proxy\_ssl\_port if I am right

And add this to nginx .conf

> <https://github.com/jaapmarcus/web-templates/blob/master/templates/nginx/php-fpm/uptime-kuma.conf>

Also I run it on port 3000 instead of 3001…

---

<div class="post-metadata">

**Author:** ![anon134066](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/a/ba9def/32.png) [@anon134066](https://forum.hestiacp.com/u/anon134066)\
**Post date:** [March 23, 2023, 7:46pm UTC](https://forum.hestiacp.com/t/custom-template-for-docker-app/9136/3 "2023-03-23T19:46:55Z")

</div>

Thank you @eris

I downloaded the templates to `/usr/local/hestia/data/templates/web/nginx/php-fpm/` and extended the file `/etc/nginx/nginx.conf`

My next challenge is to assign the uptime-kuma template to my domain [status.mydomain.com](http://status.mydomain.com).

Currently I don’t see it in advanced options:  
Web Template (Apache2)  
Backend Template (PHP-FPM)  
Proxy Template

In the docu I found things like user.ini or php-fpm pool config but as a linux server newbee I have a lot of question marks in my head what to do.

I installed Hestia with `--interactive no` parameter. So I think and when I look to the settings, apache2, nginx and php-fpm are running.

Thanks for your time to assist me 🙂

---

<div class="post-metadata">

**Author:** ![eris](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/eris/32/1241_2.png) [@eris](https://forum.hestiacp.com/u/eris)\
**Post date:** [March 23, 2023, 7:47pm UTC](https://forum.hestiacp.com/t/custom-template-for-docker-app/9136/4 "2023-03-23T19:47:39Z")

</div>

If you use Nginx + Apache2 you should put them in /usr/local/hestia/data/templates/web/nginx/ and make the changes I explained 🙂

---

<div class="post-metadata">

**Author:** ![anon134066](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/a/ba9def/32.png) [@anon134066](https://forum.hestiacp.com/u/anon134066)\
**Post date:** [March 23, 2023, 8:01pm UTC](https://forum.hestiacp.com/t/custom-template-for-docker-app/9136/5 "2023-03-23T20:01:44Z")

</div>

Woohoo - Thank you very much! Learned something again.  
It is fun to experiment with Linux servers 😉  
Have a nice evening.

---

<div class="post-metadata">

**Author:** ![system](https://forum.hestiacp.com/uploads/default/original/1X/d9a5b68bf50ced83e880b56452e592b204761b19.png) [@system](https://forum.hestiacp.com/u/system)\
**Post date:** [April 22, 2023, 8:02pm UTC](https://forum.hestiacp.com/t/custom-template-for-docker-app/9136/6 "2023-04-22T20:02:19Z")

</div>

Closed on April 22, 2023, 8:02pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
