Jump to content

Services:Current Services: Difference between revisions

From jb-vpn.uk Wiki
Added troubleshooting guide: Current Services - Service Inventory
 
Updated documentation from markdown files
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Current Services - Service Inventory =
This document provides a detailed inventory of all services currently configured on the reverse proxy system.
This document provides a detailed inventory of all services currently configured on the reverse proxy system.


Line 9: Line 7:
| Service || Subdomain || Internal Port || Protocol || Status || SSL
| Service || Subdomain || Internal Port || Protocol || Status || SSL
|-
|-
| Wiki || wiki.jb-vpn.uk || 8080 || HTTP || Active || ✅
| Wiki || wiki.jb-vpn.uk || 8010 || HTTP || Active || ✅
|-
|-
| Werbs-Wiki || werbs-wiki.jb-vpn.uk || 8081 || HTTP || Active || ✅
| Werbs-Wiki || werbs-wiki.jb-vpn.uk || 8011 || HTTP || Active || ✅
|-
|-
| Synology DSM || dsm.jb-vpn.uk || 5001 || HTTPS || Active || ✅
| Synology DSM || dsm.jb-vpn.uk || 5001 || HTTPS || Active || ✅
Line 19: Line 17:
| VPS Default || vps.jb-vpn.uk || - || - || Active || ✅
| VPS Default || vps.jb-vpn.uk || - || - || Active || ✅
|}
|}
== Service Details ==
== Service Details ==


Line 28: Line 27:


'''Internal Configuration''':
'''Internal Configuration''':
'' '''Target IP''': <code>10.8.0.2</code> (Synology NAS via VPN)
* '''Host''': VPS (Docker)
'' '''Target Port''': <code>8080</code>
'' '''Protocol''': HTTP


'''Nginx Configuration''':
* '''Target''': <code>127.0.0.1:8010</code> (container <code>wiki-mediawiki</code>)
'' '''File''': <code>/etc/nginx/sites-available/wiki.jb-vpn.uk</code>
'' '''Enabled''': <code>/etc/nginx/sites-enabled/wiki.jb-vpn.uk</code>


'''SSL Certificate''':
* '''Stack''': <code>/var/www/wiki.jb/</code>
'' '''Provider''': Let's Encrypt
 
'' '''Certificate Path''': <code>/etc/letsencrypt/live/wiki.jb-vpn.uk/</code>
* '''Protocol''': HTTP
'' '''Expiry Date''': 2026-02-01
 
'' '''Status''': Valid (89 days remaining)
'''Reverse Proxy''':
* '''Caddy''': <code>/etc/caddy/Caddyfile</code> (<code>wiki.jb-vpn.uk</code> → <code>127.0.0.1:8010</code>)


'''Traffic Flow''':
'''Traffic Flow''':
<pre>
<pre>
External Request → wiki.jb-vpn.uk:443 (HTTPS)  
External Request → wiki.jb-vpn.uk:443 (HTTPS)
   → Nginx Reverse Proxy (SSL Termination)
   → Caddy (SSL termination)
   → 10.8.0.2:8080 (HTTP on Synology NAS)
   → 127.0.0.1:8010 (MediaWiki Docker on VPS)
</pre>
</pre>
'''Configuration Details''':
'' HTTP to HTTPS redirect: ✅ Enabled
'' WebSocket support: ✅ Enabled
'' Extended timeouts: ✅ 300 seconds
'' Proxy headers: ✅ Full set configured
'''DNS Record''': <code>wiki.jb-vpn.uk</code> → <code>87.106.61.62</code>


'''Test Command''':
'''Test Command''':
<pre class="lang-bash">
<pre class="lang-bash">
curl -I https://wiki.jb-vpn.uk
curl -I https://wiki.jb-vpn.uk
= Or access directly: https://wiki.jb-vpn.uk/index.php?title=Main_Page =
</pre>
</pre>


Line 72: Line 59:


'''Internal Configuration''':
'''Internal Configuration''':
'' '''Target IP''': <code>10.8.0.2</code> (Synology NAS via VPN)
* '''Host''': VPS (Docker)
'' '''Target Port''': <code>8081</code>
'' '''Protocol''': HTTP


'''Nginx Configuration''':
* '''Target''': <code>127.0.0.1:8011</code> (container <code>wiki-werbs-mediawiki</code>)
'' '''File''': <code>/etc/nginx/sites-available/werbs-wiki.jb-vpn.uk</code>
'' '''Enabled''': <code>/etc/nginx/sites-enabled/werbs-wiki.jb-vpn.uk</code>


'''SSL Certificate''':
* '''Stack''': <code>/var/www/wiki.jb/</code>
'' '''Provider''': Let's Encrypt
'' '''Certificate Path''': <code>/etc/letsencrypt/live/werbs-wiki.jb-vpn.uk/</code>
'' '''Expiry Date''': 2026-02-01
'' '''Status''': Valid (89 days remaining)


'''Traffic Flow''':
* '''Protocol''': HTTP
<pre>
External Request → werbs-wiki.jb-vpn.uk:443 (HTTPS)
  → Nginx Reverse Proxy (SSL Termination)
  → 10.8.0.2:8081 (HTTP on Synology NAS)
</pre>
 
'''Configuration Details''':
'' HTTP to HTTPS redirect: ✅ Enabled
'' WebSocket support: ✅ Enabled
'' Extended timeouts: ✅ 300 seconds
'' Proxy headers: ✅ Full set configured


'''DNS Record''': <code>werbs-wiki.jb-vpn.uk</code> → <code>87.106.61.62</code>
'''Reverse Proxy''':
* '''Caddy''': <code>/etc/caddy/Caddyfile</code> (<code>werbs-wiki.jb-vpn.uk</code> → <code>127.0.0.1:8011</code>)


'''Test Command''':
'''Test Command''':
Line 115: Line 84:


'''Internal Configuration''':
'''Internal Configuration''':
'' '''Target IP''': <code>10.8.0.2</code> (Synology NAS via VPN)
* '''Target IP''': <code>10.8.0.2</code> (Synology NAS via VPN)
'' '''Target Port''': <code>5001</code>
 
'' '''Protocol''': HTTPS
* '''Target Port''': <code>5001</code>


'''Nginx Configuration''':
* '''Protocol''': HTTPS
'' '''File''': <code>/etc/nginx/sites-available/dsm.jb-vpn.uk</code>
'' '''Enabled''': <code>/etc/nginx/sites-enabled/dsm.jb-vpn.uk</code>


'''SSL Certificate''':
'''Reverse Proxy''':
'' '''Provider''': Let's Encrypt
* '''Caddy''': <code>/etc/caddy/Caddyfile</code> (<code>dsm.jb-vpn.uk</code> → <code>https://10.8.0.2:5001</code>)
'' '''Certificate Path''': <code>/etc/letsencrypt/live/vps.jb-vpn.uk/</code> (shared certificate)
'' '''Status''': Valid


'''Traffic Flow''':
'''Traffic Flow''':
<pre>
<pre>
External Request → dsm.jb-vpn.uk:443 (HTTPS)  
External Request → dsm.jb-vpn.uk:443 (HTTPS)
   → Nginx Reverse Proxy (SSL Termination)
   → Caddy (SSL termination)
   → 10.8.0.2:5001 (HTTPS on Synology NAS)
   → 10.8.0.2:5001 (HTTPS on NAS via VPN)
</pre>
</pre>
'''Configuration Details''':
'' HTTP to HTTPS redirect: ✅ Enabled
'' WebSocket support: ✅ Enabled (for DSM WebSocket features)
'' Internal HTTPS: ✅ Passes through to Synology HTTPS
'''DNS Record''': <code>dsm.jb-vpn.uk</code> → <code>87.106.61.62</code>


'''Test Command''':
'''Test Command''':
Line 156: Line 114:


'''Internal Configuration''':
'''Internal Configuration''':
'' '''Target IP''': <code>10.8.0.2</code> (Synology NAS via VPN)
* '''Target IP''': <code>10.8.0.2</code> (Synology NAS via VPN, hostname <code>StrawberryNAS</code>)
'' '''Target Port''': <code>32400</code>
 
'' '''Protocol''': HTTP
* '''Target Port''': <code>32400</code>
 
* '''Protocol''': HTTP (TLS terminated by Caddy)


'''Nginx Configuration''':
'''Reverse Proxy''':
'' '''File''': <code>/etc/nginx/sites-available/plex.jb-vpn.uk</code>
* '''Caddy''': <code>/etc/caddy/Caddyfile</code> (<code>plex.jb-vpn.uk</code> <code>http://10.8.0.2:32400</code>)
'' '''Enabled''': <code>/etc/nginx/sites-enabled/plex.jb-vpn.uk</code>


'''SSL Certificate''':
* '''Canonical repo copy''': <code>app.jb/docs/caddy/Caddyfile</code>
'' '''Provider''': Let's Encrypt
'' '''Certificate Path''': <code>/etc/letsencrypt/live/vps.jb-vpn.uk/</code> (shared certificate)
'' '''Status''': Valid


'''Traffic Flow''':
'''Traffic Flow''':
<pre>
<pre>
External Request → plex.jb-vpn.uk:443 (HTTPS)  
External Request → plex.jb-vpn.uk:443 (HTTPS)
   → Nginx Reverse Proxy (SSL Termination)
   → Caddy (SSL termination)
   → 10.8.0.2:32400 (HTTP on Synology NAS)
   → 10.8.0.2:32400 (HTTP on NAS via VPN)
</pre>
</pre>


'''Configuration Details''':
'''Configuration Details''':
'' HTTP to HTTPS redirect: ✅ Enabled
* HTTP to HTTPS redirect: ✅ Enabled
'' Plex-specific headers: ✅ Configured
 
  '' X-Plex-Client-Identifier
* WebSocket upgrade headers: ✅ Enabled (for playback)
  '' X-Plex-Device
 
  '' X-Plex-Product
* Forwarded headers: <code>Host</code>, <code>X-Real-IP</code>, <code>X-Forwarded-For</code>, <code>X-Forwarded-Proto</code>, <code>X-Forwarded-Host</code>, <code>X-Forwarded-Port</code>
  '' X-Plex-Version
 
  '' X-Plex-Platform
* Internal <code>Location</code> header rewrites: ✅ <code>10.8.0.2</code>, <code>192.168.1.21</code>, <code>strawberrynas</code> → <code>https://plex.jb-vpn.uk</code>
  '' X-Plex-Platform-Version
 
  '' X-Plex-Device-Name
* '''Do not''' use <code>header_up X-Plex-*</code> in Caddy — see [[Troubleshooting:Plex Troubleshooting|Troubleshooting:Plex Troubleshooting]]
  '' X-Plex-Provides
 
  '' X-Plex-Token
'''Synology Plex settings''' (Settings → Network):
* '''Custom server access URLs''': <code>https://plex.jb-vpn.uk:443</code> only (no VPN/LAN URLs)
 
* '''LAN Networks''': <code>192.168.1.0/255.255.255.0,10.8.0.0/255.255.255.0</code>
 
* '''Remote Access "not available"''': Expected — remote access uses the reverse proxy, not port 32400 forwarding


'''DNS Record''': <code>plex.jb-vpn.uk</code> → <code>87.106.61.62</code>
'''DNS Record''': <code>plex.jb-vpn.uk</code> → <code>87.106.61.62</code>


'''Test Command''':
'''Test Commands''':
<pre class="lang-bash">
<pre class="lang-bash">
curl -I https://plex.jb-vpn.uk
curl -s https://plex.jb-vpn.uk/identity
curl -I https://plex.jb-vpn.uk/web
ping -c 2 10.8.0.2
</pre>
</pre>


Line 205: Line 168:


'''Internal Configuration''':
'''Internal Configuration''':
'' '''Type''': Static files
* '''Type''': Static files
'' '''Web Root''': <code>/var/www/html</code>
'' '''Protocol''': Direct file serving


'''Nginx Configuration''':
* '''Web Root''': <code>/var/www/html</code>
'' '''File''': <code>/etc/nginx/sites-available/vps.jb-vpn.uk</code>
'' '''Enabled''': <code>/etc/nginx/sites-enabled/vps.jb-vpn.uk</code>


'''SSL Certificate''':
'''Reverse Proxy''':
'' '''Provider''': Let's Encrypt
* '''Caddy''': <code>file_server</code> for <code>/var/www/html</code>
'' '''Certificate Path''': <code>/etc/letsencrypt/live/vps.jb-vpn.uk/</code>
'' '''Status''': Valid
 
'''Traffic Flow''':
<pre>
External Request → vps.jb-vpn.uk:443 (HTTPS)
  → Nginx (SSL Termination)
  → /var/www/html (Local file serving)
</pre>
 
'''Configuration Details''':
'' HTTP to HTTPS redirect: ✅ Enabled
'' Static file serving: ✅ Enabled
'' Index files: <code>index.html</code>, <code>index.htm</code>, <code>index.nginx-debian.html</code>
 
'''DNS Record''': <code>vps.jb-vpn.uk</code> → <code>87.106.61.62</code>


'''Test Command''':
'''Test Command''':
Line 243: Line 186:
=== SSH Port Forwarding ===
=== SSH Port Forwarding ===


SSH port forwarding is managed through a centralized configuration system. See [SSH Port Forwarding Management](index.md) for complete documentation.
'''Current Forwards''':
* '''Synology NAS''': Port <code>22222</code> → <code>10.8.0.2:22</code>


'''Current Forwards''':
   * Access: <code>ssh -p 22222 user@87.106.61.62</code>
'' '''Synology NAS''': Port <code>22222</code> → <code>10.8.0.2:22</code>
   '' Access: <code>ssh -p 22222 user@87.106.61.62</code>


'''Management''':
'''Management''':
<pre class="lang-bash">
<pre class="lang-bash">
= List all SSH port forwards =
sudo /usr/local/bin/ssh-port-forward-manager.sh list
sudo ssh-forward list
 
= Add a new device =
sudo ssh-forward add <name> <external_port> <vpn_ip> [ssh_port]
 
= Remove a device =
sudo ssh-forward remove <name>
</pre>
</pre>


'''Configuration File''': <code>/etc/ssh-port-forwards.conf</code>
'''Configuration File''': <code>/etc/ssh-port-forwards.conf</code>
'''Note''': This is a direct port forward via iptables, not handled by nginx.


----
----


== Service Status Monitoring ==
== Service Status Monitoring ==
=== Check All Services ===


<pre class="lang-bash">
<pre class="lang-bash">
= Test all HTTPS services =
# Test all HTTPS services
for domain in wiki.jb-vpn.uk werbs-wiki.jb-vpn.uk dsm.jb-vpn.uk plex.jb-vpn.uk vps.jb-vpn.uk; do
for domain in wiki.jb-vpn.uk werbs-wiki.jb-vpn.uk dsm.jb-vpn.uk plex.jb-vpn.uk vps.jb-vpn.uk; do
     echo "Testing $domain..."
     echo "Testing $domain..."
     curl -I -s https://$domain | head -1
     curl -I -s "https://$domain" | head -1
done
done
</pre>


=== Check SSL Certificates ===
# Caddy
systemctl status caddy
caddy validate --config /etc/caddy/Caddyfile


<pre class="lang-bash">
# VPN (required for DSM/Plex)
certbot certificates
cat /var/log/openvpn-status.log
ping -c 2 10.8.0.2
</pre>
</pre>


=== Check Nginx Status ===
== Related Documentation ==


<pre class="lang-bash">
* [[Troubleshooting:Plex Troubleshooting|Troubleshooting:Plex Troubleshooting]]
systemctl status nginx
</pre>


=== View Active Sites ===
* [[Troubleshooting:Service Troubleshooting|Troubleshooting:Service Troubleshooting]]


<pre class="lang-bash">
* [[Documentation:Integration|OpenVPN:Integration]]
ls -la /etc/nginx/sites-enabled/
</pre>
 
----
 
== Service Dependencies ==
 
=== Required for All Services ===
 
= '''OpenVPN Tunnel''': Must be active (tun0 interface up) =
= '''Synology NAS''': Must be connected to VPN (10.8.0.2 reachable) =
= '''Nginx Service''': Must be running =
= '''DNS Records''': Must point to VPS IP (87.106.61.62) =


=== Service-Specific Requirements ===
'' '''Wiki/Werbs-Wiki''': Services must be running on ports 8080/8081
'' '''DSM''': Synology DSM must be enabled
'' '''Plex''': Plex Media Server must be running
'' '''VPS Default''': No dependencies (local files only)
----
== Maintenance Schedule ==
=== Daily ===
'' Monitor nginx error logs
'' Check service availability
=== Weekly ===
'' Review access logs for anomalies
'' Verify SSL certificate status
=== Monthly ===
'' Backup nginx configurations
'' Review and update documentation
'' Check for service updates
=== Quarterly ===
'' Verify SSL certificate auto-renewal
'' Review firewall rules
* Update system packages
----
== Service Statistics ==
'''Total Services''': 5 web services + 1 SSH port forward
'''SSL Certificates''': 3 unique certificates (some shared)
'''Configuration Files''': 5 nginx site configurations
'''Internal Ports Used''': 8080, 8081, 5001, 32400, 22
----


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

Latest revision as of 10:44, 7 July 2026

This document provides a detailed inventory of all services currently configured on the reverse proxy system.

Service Summary

[edit]
Service Subdomain Internal Port Protocol Status SSL
Wiki wiki.jb-vpn.uk 8010 HTTP Active
Werbs-Wiki werbs-wiki.jb-vpn.uk 8011 HTTP Active
Synology DSM dsm.jb-vpn.uk 5001 HTTPS Active
Plex Media Server plex.jb-vpn.uk 32400 HTTP Active
VPS Default vps.jb-vpn.uk - - Active

Service Details

[edit]

1. Wiki Service

[edit]

Subdomain: wiki.jb-vpn.uk

Public Access: https://wiki.jb-vpn.uk

Internal Configuration:

  • Host: VPS (Docker)
  • Target: 127.0.0.1:8010 (container wiki-mediawiki)
  • Stack: /var/www/wiki.jb/
  • Protocol: HTTP

Reverse Proxy:

  • Caddy: /etc/caddy/Caddyfile (wiki.jb-vpn.uk127.0.0.1:8010)

Traffic Flow:

External Request → wiki.jb-vpn.uk:443 (HTTPS)
  → Caddy (SSL termination)
  → 127.0.0.1:8010 (MediaWiki Docker on VPS)

Test Command:

curl -I https://wiki.jb-vpn.uk

2. Werbs-Wiki Service

[edit]

Subdomain: werbs-wiki.jb-vpn.uk

Public Access: https://werbs-wiki.jb-vpn.uk

Internal Configuration:

  • Host: VPS (Docker)
  • Target: 127.0.0.1:8011 (container wiki-werbs-mediawiki)
  • Stack: /var/www/wiki.jb/
  • Protocol: HTTP

Reverse Proxy:

  • Caddy: /etc/caddy/Caddyfile (werbs-wiki.jb-vpn.uk127.0.0.1:8011)

Test Command:

curl -I https://werbs-wiki.jb-vpn.uk

3. Synology DSM

[edit]

Subdomain: dsm.jb-vpn.uk

Public Access: https://dsm.jb-vpn.uk

Internal Configuration:

  • Target IP: 10.8.0.2 (Synology NAS via VPN)
  • Target Port: 5001
  • Protocol: HTTPS

Reverse Proxy:

Traffic Flow:

External Request → dsm.jb-vpn.uk:443 (HTTPS)
  → Caddy (SSL termination)
  → 10.8.0.2:5001 (HTTPS on NAS via VPN)

Test Command:

curl -I https://dsm.jb-vpn.uk

4. Plex Media Server

[edit]

Subdomain: plex.jb-vpn.uk

Public Access: https://plex.jb-vpn.uk

Internal Configuration:

  • Target IP: 10.8.0.2 (Synology NAS via VPN, hostname StrawberryNAS)
  • Target Port: 32400
  • Protocol: HTTP (TLS terminated by Caddy)

Reverse Proxy:

  • Canonical repo copy: app.jb/docs/caddy/Caddyfile

Traffic Flow:

External Request → plex.jb-vpn.uk:443 (HTTPS)
  → Caddy (SSL termination)
  → 10.8.0.2:32400 (HTTP on NAS via VPN)

Configuration Details:

  • HTTP to HTTPS redirect: ✅ Enabled
  • WebSocket upgrade headers: ✅ Enabled (for playback)
  • Forwarded headers: Host, X-Real-IP, X-Forwarded-For, X-Forwarded-Proto, X-Forwarded-Host, X-Forwarded-Port

Synology Plex settings (Settings → Network):

  • LAN Networks: 192.168.1.0/255.255.255.0,10.8.0.0/255.255.255.0
  • Remote Access "not available": Expected — remote access uses the reverse proxy, not port 32400 forwarding

DNS Record: plex.jb-vpn.uk87.106.61.62

Test Commands:

curl -s https://plex.jb-vpn.uk/identity
curl -I https://plex.jb-vpn.uk/web
ping -c 2 10.8.0.2

5. VPS Default Web Directory

[edit]

Subdomain: vps.jb-vpn.uk

Public Access: https://vps.jb-vpn.uk

Internal Configuration:

  • Type: Static files
  • Web Root: /var/www/html

Reverse Proxy:

  • Caddy: file_server for /var/www/html

Test Command:

curl -I https://vps.jb-vpn.uk

Additional Services (Non-Web)

[edit]

SSH Port Forwarding

[edit]

Current Forwards:

  • Synology NAS: Port 2222210.8.0.2:22
 * Access: ssh -p 22222 user@87.106.61.62

Management:

sudo /usr/local/bin/ssh-port-forward-manager.sh list

Configuration File: /etc/ssh-port-forwards.conf


Service Status Monitoring

[edit]
# Test all HTTPS services
for domain in wiki.jb-vpn.uk werbs-wiki.jb-vpn.uk dsm.jb-vpn.uk plex.jb-vpn.uk vps.jb-vpn.uk; do
    echo "Testing $domain..."
    curl -I -s "https://$domain" | head -1
done

# Caddy
systemctl status caddy
caddy validate --config /etc/caddy/Caddyfile

# VPN (required for DSM/Plex)
cat /var/log/openvpn-status.log
ping -c 2 10.8.0.2
[edit]