# \[SOLVED\] Can't Connect to the Server

**URL:** https://meta.discourse.org/t/solved-cant-connect-to-the-server/22436
**Category:** Self-hosting
**Created:** [23 Novembre 2014, 12:53pm UTC](https://meta.discourse.org/t/solved-cant-connect-to-the-server/22436 "2014-11-23T12:53:52Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![balintant](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/balintant/32/115249_2.png) [@balintant](https://meta.discourse.org/u/balintant)
#### Post date: [23 Novembre 2014, 12:53pm UTC](https://meta.discourse.org/t/solved-cant-connect-to-the-server/22436/1 "2014-11-23T12:53:52Z")

</div>

I have just installed Discourse on **Debian Wheezy** and I’m not even able to connect to it by it’s IP address (+the port I set up). Safari says:

> Safari Can’t Connect to the Server  
> Safari can’t open the page “xxx.xxx.xxx.xxx:8020”, because  
> Safari can’t connect to the server “xxx.xxx.xxx.xxx”.

My `containers/app.yml` file contains the following relevant options and it’s based on `sample/standalone.yml`:

```plaintext
expose:
  - "8020:8020"
  - "2222:22"

DISCOURSE_HOSTNAME: 'hereismydomain.com'

```

- I ran `./launcher start app` as `root`, because other users don’t have permission to use Docker.
- I changed the port to `:8020`, because I am using Nginx on the server and I will want to make a proxy for my installation
- as of that, I don’t want people to be able to connect directly on the port (I’m about to block it with `iptables`, but if you know a better solution, I’m open)
- I have a server at DigitalOcean with 2 GB of RAM and I made a swapfile with 1 GB as everybody’s saying Discourse will thank it

Thanks!

---

<div class="post-metadata">

### Author: ![lake54](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lake54/32/121955_2.png) [@lake54](https://meta.discourse.org/u/lake54)
#### Post date: [23 Novembre 2014, 4:10pm UTC](https://meta.discourse.org/t/solved-cant-connect-to-the-server/22436/2 "2014-11-23T16:10:47Z")

</div>

Try changing the exposed port from `8020:8020` to `8020:80`

---

<div class="post-metadata">

### Author: ![balintant](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/balintant/32/115249_2.png) [@balintant](https://meta.discourse.org/u/balintant)
#### Post date: [23 Novembre 2014, 6:15pm UTC](https://meta.discourse.org/t/solved-cant-connect-to-the-server/22436/3 "2014-11-23T18:15:50Z")

</div>

> [@lake54](#):
>
> Try changing the exposed port from 8020:8020 to 8020:80

Thanks that worked! 😄

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [24 Novembre 2014, 8:39am UTC](https://meta.discourse.org/t/solved-cant-connect-to-the-server/22436/4 "2014-11-24T08:39:37Z")

</div>


