You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hosting.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,15 +73,17 @@ server {
73
73
```
74
74
Change your `server_name` and `root` based on your domain name, and file location.
75
75
76
-
Now if you start nginx with `sudo nginx`, you should see Hideout's frontend running at `localhost`.
76
+
Now if you start nginx with `sudo nginx`, you should see Hideout's frontend running at `localhost`. This is also a good time to make sure Hideout can be accessed by visiting your public IP in your browser. You may need to configure your router and firewall for the traffic to be forwarded.
77
77
78
-
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".
78
+
Now we need 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".
79
79
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`.
80
+
I got my domain name at Njalla: https://njal.la/, a "privacy-aware domain service". For the domain's DNS, I added an A record, fill in its name with "www", and its content with my public IP. I gave the record a short TTL. I didn't continue until I tested to see that I can reach Hideout by visiting `http://www.hideout-demo.com`. Note that it only works over HTTP, not HTTPS, at this point.
81
81
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`.
82
+
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. Certbot modified my `/etc/nginx/conf.d/hideout-demo.com.conf` to handle HTTPS traffic, and redirect HTTP traffic to HTTPS.
83
83
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:
84
+
I decided to test if I can access Hideout over HTTPS, and if I'll be redirected when I attempt HTTP connection. I found the website timing out. After checking every corner, it turned out that on my firewall, I've only setup port-forwarding for port 80, but not port 443. After I forwarded port 443, the HTTPS connection and redirection worked immediately.
85
+
86
+
At this point, I've successfully hosted a working instance of Hideout on my laptop. But if I'm to send a Hideout link to others, I'd expose the public IP of my home to both the recipients, and the unprivate platform where I send the link. So I need to host Hideout behind a VPN. Fortunately, port-forwarding is supported by Mullvad VPN: https://mullvad.net. I installed its open-source app on my laptop, and followed Mullvad's port-forwarding guide: https://mullvad.net/en/help/port-forwarding-and-mullvad/. It was a rather simple process. I didn't need to touch my router or firewall. I also disabled the port-forwarding on my firewall for port 80 and 443, because the port-forwarding doesn't happen on the firewall anymore. It's handled by Mullvad. 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 443 ssl` in `hideout-demo.com.conf` to `listen 50000 ssl`. Below is the final config. Notice the commented block at the end too.
0 commit comments