Skip to content

Commit 22ce4f0

Browse files
authored
Update hosting.md
Changed example URL to `hideout-demo.com`. Changed to not include *.conf in nginx config dir.
1 parent 4e2aa8a commit 22ce4f0

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

hosting.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Hideout is tested to work on Debian. Testing on other distros is very welcomed.
66

77
This guide assumes:
88
* Hideout will be hosted at `/home/user/hideout-1.0.0`. Your version number may be different.
9-
* Domain name will be `ourhideout.xyz`.
9+
* Domain name will be `hideout-demo.com`.
1010

1111
To host Hideout, first download the latest release from the release page: https://github.com/techmindful/hideout/releases
1212

@@ -46,14 +46,14 @@ http {
4646
4747
#gzip on;
4848
49-
include /etc/nginx/conf.d/*.conf;
49+
include /etc/nginx/conf.d/hideout-demo.com.conf;
5050
}
5151
```
52-
Notice the last line `include /etc/nginx/conf.d/*.conf;`. It brings in all the extra configs stored in `/etc/nginx/conf.d`. So let's rename the default `/etc/nginx/conf.d/default.conf` into something with a different postfix, like `/etc/nginx/conf.d/default.conf_default`, so that it won't be included. Then let's create a config for Hideout at `/etc/nginx/conf.d/ourhideout.xyz.conf`:
52+
Notice the last line `include /etc/nginx/conf.d/hideout-demo.com.conf;`. It brings in the site-specific config at `/etc/nginx/conf.d/hideout-demo.com.conf`. So let's create a config for Hideout at `/etc/nginx/conf.d/hideout-demo.com.conf`:
5353
```
5454
server {
5555
56-
server_name www.ourhideout.xyz;
56+
server_name www.hideout-demo.com;
5757
5858
root /home/user/hideout-1.0.0/;
5959
@@ -77,15 +77,15 @@ Now if you start nginx with `sudo nginx`, you should see Hideout running at `loc
7777

7878
Now is the time to setup domain name, DNS, and HTTPS. I'm going to switch to my perspective here, because there are multiple ways to make it work, and I don't want to sound like a sales associate by saying things like "okay now you should get a domain from Njalla and buy Mullvad VPN".
7979

80-
In my case, I'm hosting Hideout behind Mullvad VPN: https://mullvad.net. With its (open-source) app, port-forwarding through VPN becomes possible. It's an easy process, and I don't need to setup port-forwarding elsewhere. If you are hosting Hideout without a VPN, you probably need to setup port-forwarding on your router and firewall. A caveat is that Mullvad assigns me a random port number. Let's assume it's 50000 in this guide. This requires me to change the `listen 80` in `ourhideout.xyz.conf` to `listen 50000`.
80+
In my case, I'm hosting Hideout behind Mullvad VPN: https://mullvad.net. With its (open-source) app, port-forwarding through VPN becomes possible. It's an easy process, and I don't need to setup port-forwarding elsewhere. If you are hosting Hideout without a VPN, you probably need to setup port-forwarding on your router and firewall. A caveat is that Mullvad assigns me a random port number. Let's assume it's 50000 in this guide. This requires me to change the `listen 80` in `hideout-demo.com.conf` to `listen 50000`.
8181

82-
I get my domain name at Njalla: https://njal.la/, a "privacy-aware domain service". For the domain's DNS, I add an A record, fill in its name with "www", and its content with the "Out" IP shown on my Mullvad app. I give the record a short TTL. I don't continue until I test to see that I can reach Hideout by visiting `http://www.ourhideout.xyz:50000`.
82+
I get my domain name at Njalla: https://njal.la/, a "privacy-aware domain service". For the domain's DNS, I add an A record, fill in its name with "www", and its content with the "Out" IP shown on my Mullvad app. I give the record a short TTL. I don't continue until I test to see that I can reach Hideout by visiting `http://www.hideout-demo.com:50000`.
8383

84-
The next step is to enable HTTPS. Unlike domain and VPN, an HTTPS certificate can be acquired freely with EFF's Certbot: https://certbot.eff.org/. The instruction there is pretty simple to follow. I let Certbot modify my nginx config, and the final `ourhideout.xyz.conf` looks like this:
84+
The next step is to enable HTTPS. Unlike domain and VPN, an HTTPS certificate can be acquired freely with EFF's Certbot: https://certbot.eff.org/. The instruction there is pretty simple to follow. I let Certbot modify my nginx config, and the final `hideout-demo.com.conf` looks like this:
8585
```
8686
server {
8787
88-
server_name www.ourhideout.xyz;
88+
server_name www.hideout-demo.com;
8989
9090
root /home/user/hideout-1.0.0/;
9191
@@ -102,8 +102,8 @@ server {
102102
103103
# SSL cert
104104
listen 50000 ssl;
105-
ssl_certificate /etc/letsencrypt/live/www.ourhideout.xyz/fullchain.pem;
106-
ssl_certificate_key /etc/letsencrypt/live/www.ourhideout.xyz/privkey.pem;
105+
ssl_certificate /etc/letsencrypt/live/www.hideout-demo.com/fullchain.pem;
106+
ssl_certificate_key /etc/letsencrypt/live/www.hideout-demo.com/privkey.pem;
107107
include /etc/letsencrypt/options-ssl-nginx.conf;
108108
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
109109
@@ -114,9 +114,9 @@ server {
114114
# If the server is behind Mullvad VPN.
115115
#server {
116116
#
117-
# server_name www.ourhideout.xyz
117+
# server_name hideout-demo.com
118118
#
119-
# if ($host = www.ourhideout.xyz) {
119+
# if ($host = www.hideout-demo.com) {
120120
# return 301 https://$host$request_uri;
121121
# }
122122
#
@@ -128,4 +128,4 @@ server {
128128
```
129129
I modified it further after Certbot's operation. See the commented out block at the end. Make sure that the port number being listened on is 50000, with this line `listen 50000 ssl;`.
130130

131-
At this point, I've successfully hosted Hideout on a computer I physically own, behind VPN, over HTTPS. I can access it in browser at `https://www.ourhideout.xyz:50000`. Note that no piece of the URL can be left out. I need to specify all of `https`, `www`, and port number `50000`.
131+
At this point, I've successfully hosted Hideout on a computer I physically own, behind VPN, over HTTPS. I can access it in browser at `https://www.hideout-demo.com:50000`. Note that no piece of the URL can be left out. I need to specify all of `https`, `www`, and port number `50000`.

0 commit comments

Comments
 (0)