Jump to content

Services:Prerequisites: Difference between revisions

From jb-vpn.uk Wiki
Added troubleshooting guide: Prerequisites for Adding Services
 
Updated documentation from markdown files
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Prerequisites for Adding Services =
Before adding a new public hostname, gather the following.


Before adding a new service to the reverse proxy system, ensure you have the following:
== Service information ==


== Service Information ==
* '''Hostname''' (e.g. <code>newservice.jb-vpn.uk</code>)


= '''Subdomain name''' (e.g., <code>newservice.jb-vpn.uk</code>) =
* '''Backend location''': VPS (<code>127.0.0.1:PORT</code>) or NAS via VPN (<code>10.8.0.2:PORT</code>)
= '''Internal IP address''' (usually <code>10.8.0.2</code> for Synology NAS) =
= '''Internal port number''' (e.g., <code>8080</code>, <code>3000</code>, etc.) =
= '''Protocol''' (HTTP or HTTPS) =


== DNS Configuration ==
* '''Protocol''': HTTP or HTTPS on the backend


= '''DNS A record created''' pointing subdomain to VPS IP (<code>87.106.61.62</code>) =
== DNS ==
= '''DNS propagation completed''' (can take up to 48 hours, usually much faster) =


=== Verify DNS Configuration ===
* '''A record''' pointing the hostname to <code>87.106.61.62</code>
 
* Propagation complete (verify with <code>dig</code> or <code>nslookup</code>)


<pre class="lang-bash">
<pre class="lang-bash">
= Check DNS resolution =
nslookup newservice.jb-vpn.uk
= Or using dig =
dig newservice.jb-vpn.uk +short
dig newservice.jb-vpn.uk +short
</pre>
</pre>


== Service Verification ==
== Backend health ==
 
'''VPS service:'''


Before configuring the reverse proxy, verify:
<pre class="lang-bash">
curl -sI http://127.0.0.1:PORT | head -1
</pre>


= '''Service is running''' on Synology NAS =
'''NAS service''' (requires active VPN):
= '''Service is accessible''' from VPN network =
= '''Test from VPS''': <code>curl http://10.8.0.2:[PORT]</code> ### Test Service Accessibility =


<pre class="lang-bash">
<pre class="lang-bash">
= Test service from VPS =
ping -c 2 10.8.0.2
curl http://10.8.0.2:8080
curl -sI -m 5 http://10.8.0.2:PORT | head -1
</pre>
 
'''Wiki example:'''


= Check if service is listening (from Synology NAS or via SSH) =
<pre class="lang-bash">
netstat -tlnp | grep PORT_NUMBER
curl -sI http://127.0.0.1:8010 | head -1
curl -sI https://wiki.jb-vpn.uk | head -1
</pre>
</pre>


== System Requirements ==
== System requirements ==


Ensure the following are in place:
* '''Caddy''' running on the VPS (<code>systemctl status caddy</code>)


= '''OpenVPN tunnel is active''' (tun0 interface up) =
* '''Ports 80/443''' reachable from the internet (for Let's Encrypt)
= '''Synology NAS is connected''' to VPN (10.8.0.2 reachable) =
= '''Nginx is running''' on the VPS =
= '''Port 80 is accessible''' (required for SSL certificate validation) =


=== Verify System Status ===
* '''OpenVPN''' up (<code>ip addr show tun0</code>) when the backend is on <code>10.8.0.2</code>


<pre class="lang-bash">
<pre class="lang-bash">
= Check VPN connectivity =
systemctl status caddy
ping 10.8.0.2
ip addr show tun0
ping -c 2 10.8.0.2
</pre>


= Check nginx status =
== Related documentation ==
systemctl status nginx


= Check VPN interface =
* [Step By Step Step-by-Step Process]
ip addr show tun0
</pre>


== Related Documentation ==
* [[System:Network Architecture]]


'' [Step-by-Step Process](step-by-step.md) - Next steps after prerequisites
'' [System Overview](index.md) - System architecture


[[Category:Documentation]]
[[Category:Documentation]]
[[Category:Documentation/Services]]
[[Category:Documentation/Services]]
[[Category:Documentation/Services/Adding Services]]
[[Category:Documentation/Services/Adding Services]]

Latest revision as of 14:04, 16 May 2026

Before adding a new public hostname, gather the following.

Service information

[edit]
  • Hostname (e.g. newservice.jb-vpn.uk)
  • Backend location: VPS (127.0.0.1:PORT) or NAS via VPN (10.8.0.2:PORT)
  • Protocol: HTTP or HTTPS on the backend

DNS

[edit]
  • A record pointing the hostname to 87.106.61.62
  • Propagation complete (verify with dig or nslookup)
dig newservice.jb-vpn.uk +short

Backend health

[edit]

VPS service:

curl -sI http://127.0.0.1:PORT | head -1

NAS service (requires active VPN):

ping -c 2 10.8.0.2
curl -sI -m 5 http://10.8.0.2:PORT | head -1

Wiki example:

curl -sI http://127.0.0.1:8010 | head -1
curl -sI https://wiki.jb-vpn.uk | head -1

System requirements

[edit]
  • Caddy running on the VPS (systemctl status caddy)
  • Ports 80/443 reachable from the internet (for Let's Encrypt)
  • OpenVPN up (ip addr show tun0) when the backend is on 10.8.0.2
systemctl status caddy
ip addr show tun0
ping -c 2 10.8.0.2
[edit]
  • [Step By Step Step-by-Step Process]