# Acesse o Discourse na porta redirecionada pelo roteador

**URL:** https://meta.discourse.org/t/access-discourse-on-port-forwarded-by-router/97529
**Category:** Self-hosting
**Tags:** hosting
**Created:** [19 Setembro , 2018 08:05 UTC](https://meta.discourse.org/t/access-discourse-on-port-forwarded-by-router/97529 "2018-09-19T08:05:32Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![MorphZan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/morphzan/32/67951_2.png) [@MorphZan](https://meta.discourse.org/u/MorphZan)
#### Post date: [19 Setembro , 2018 08:05 UTC](https://meta.discourse.org/t/access-discourse-on-port-forwarded-by-router/97529/1 "2018-09-19T08:05:32Z")

</div>

Tenho o Discourse rodando em um servidor Ubuntu dentro da minha rede.  
Para conseguir acessar a instalação de fora da minha rede, preciso encaminhar portas no meu roteador.  
Alguém já fez isso com sucesso e pode ajudar com onde, nas configurações, “definir” isso corretamente?

Basicamente, de fora da minha rede, preciso acessar [myinstall.com:9050](http://myinstall.com:9050), o que deve encaminhar para a porta 80.

Qualquer ajuda ou orientação será muito apreciada.

---

<div class="post-metadata">

### Author: ![molszew](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@molszew](https://meta.discourse.org/u/molszew)
#### Post date: [19 Setembro , 2018 08:21 UTC](https://meta.discourse.org/t/access-discourse-on-port-forwarded-by-router/97529/2 "2018-09-19T08:21:56Z")

</div>

Check [https://ngrok.com/](https://ngrok.com/)

---

<div class="post-metadata">

### Author: ![MorphZan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/morphzan/32/67951_2.png) [@MorphZan](https://meta.discourse.org/u/MorphZan)
#### Post date: [19 Setembro , 2018 08:29 UTC](https://meta.discourse.org/t/access-discourse-on-port-forwarded-by-router/97529/3 "2018-09-19T08:29:08Z")

</div>

Thanks for that

I already have a static “hostname” which I use.  
On my router I have set a port eg. “9050” to point to port 80 on my webserver  
But im looking for a setting somewhere in the backend of Discourse where i can add the port :9050 at the end of the domain name for site wide access

Whenever discourse sends and email the link is [mydomain.com](http://mydomain.com) and not [mydomain.com:9050](http://mydomain.com:9050) which means i cannot access it from outside of my network.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [19 Setembro , 2018 09:05 UTC](https://meta.discourse.org/t/access-discourse-on-port-forwarded-by-router/97529/4 "2018-09-19T09:05:50Z")

</div>

You can map discourse to any port in your yml file

There should be lines

```plaintext
80:80 
443:443

```

Change those to:

```plaintext
9050:80
#443:443

```

---

<div class="post-metadata">

### Author: ![MorphZan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/morphzan/32/67951_2.png) [@MorphZan](https://meta.discourse.org/u/MorphZan)
#### Post date: [19 Setembro , 2018 09:29 UTC](https://meta.discourse.org/t/access-discourse-on-port-forwarded-by-router/97529/5 "2018-09-19T09:29:38Z")

</div>

And is there a way in the BackEnd to specify the URL must always end with :9050

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [19 Setembro , 2018 09:31 UTC](https://meta.discourse.org/t/access-discourse-on-port-forwarded-by-router/97529/6 "2018-09-19T09:31:08Z")

</div>

That is exactly what it would do.  
Or if You want more control, You can run discourse behind a reverse proxy and set up nginx so that it serves discourse on 9050

---

<div class="post-metadata">

### Author: ![MorphZan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/morphzan/32/67951_2.png) [@MorphZan](https://meta.discourse.org/u/MorphZan)
#### Post date: [19 Setembro , 2018 09:36 UTC](https://meta.discourse.org/t/access-discourse-on-port-forwarded-by-router/97529/7 "2018-09-19T09:36:46Z")

</div>

Thank you  
Waiting for everything to rebuild after editing so i can test

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [19 Setembro , 2018 12:47 UTC](https://meta.discourse.org/t/access-discourse-on-port-forwarded-by-router/97529/8 "2018-09-19T12:47:41Z")

</div>

Right. Discourse will not work on a non standard port.

You need to have whatever is doing the reverse proxy to send requests for `discourse.example.com` to the internal server.

---

<div class="post-metadata">

### Author: ![MorphZan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/morphzan/32/67951_2.png) [@MorphZan](https://meta.discourse.org/u/MorphZan)
#### Post date: [19 Setembro , 2018 12:49 UTC](https://meta.discourse.org/t/access-discourse-on-port-forwarded-by-router/97529/9 "2018-09-19T12:49:31Z")

</div>

Thank you to all for the advise etc…  
I have decided it seems to be the smarter option to use the DEV Version which allows you to use Port 3000 out the “Box” and I think this is a better option for me for now

Thanks Again to all…

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [19 Maio , 2021 20:41 UTC](https://meta.discourse.org/t/access-discourse-on-port-forwarded-by-router/97529/10 "2021-05-19T20:41:03Z")

</div>


