# Template for serving through an .onion address with Docker

**URL:** <https://meta.discourse.org/t/template-for-serving-through-an-onion-address-with-docker/41536>\
**Category:** Development\
**Created:** [24.Март.2016 20:58:54 UTC](https://meta.discourse.org/t/template-for-serving-through-an-onion-address-with-docker/41536 "2016-03-24T20:58:54Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![RomeoPapa](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/romeopapa/32/52756_2.png) [@RomeoPapa](https://meta.discourse.org/u/RomeoPapa)\
**Post date:** [24.Март.2016 20:58:54 UTC](https://meta.discourse.org/t/template-for-serving-through-an-onion-address-with-docker/41536/1 "2016-03-24T20:58:54Z")

</div>

Hi there, I’ve submitted a [pull request to discourse\_docker](https://github.com/discourse/discourse_docker/pull/228).

It creates a new `onion.conf` file in the nginx config folder. The new onion.conf is created by copying `nginx.sample.conf` and editing that copy.

This new config file creates another site on nginx’s port 80, that listens to requests made to the specified .onion address.

The template checks that a `DISCOURSE_ONION` ENV variable is defined.

---

_[View the full topic](https://meta.discourse.org/t/template-for-serving-through-an-onion-address-with-docker/41536)._
