02 - Core Infrastructure
Proxmox VE
Proxmox VE
Purpose
Proxmox VE is the primary hypervisor for the Bytek homelab.
Proxmox hosts and manages:
- Virtual machines.
- Linux containers.
- Virtual networking.
- Proxmox firewall rules.
- LVM-thin storage.
- VM and LXC snapshots.
- Scheduled backups.
- Backup restoration.
- Physical-device passthrough.
- Emergency guest consoles.
Proxmox is a critical management system and must remain accessible independently of Pi-hole, Traefik, and Authentik.
Service Information
| Setting | Value |
|---|---|
| Private hostname | pve.bytek.ca |
| Private IP address | 192.168.2.254 |
| Web interface port | TCP 8006 |
| SSH port | TCP 22 |
| Access scope | Home LAN or trusted VPN |
| Normal authentication | Authentik OIDC |
| Emergency authentication | root@pam |
| General DNS resolver | 9.9.9.9 |
| Backup storage | pve-backup |
| Primary VM storage | local-lvm |
| Large-data storage | user-data |
Management interface:
Access Policy
The Proxmox management interface must remain private.
Approved access paths include:
- A workstation on the home LAN.
- A trusted remote-access VPN.
- The Proxmox physical console.
- A deliberately configured emergency SSH tunnel.
The following access methods are prohibited:
- Public WHC DNS record for
pve.bytek.ca. - Bell router forwarding of TCP 8006.
- VPS forwarding of TCP 8006.
- Public Traefik routing to Proxmox.
- Direct internet exposure of SSH.
Pi-hole resolves pve.bytek.ca directly to 192.168.2.254.
DNS Design
The Proxmox host intentionally uses Quad9 at 9.9.9.9 instead of Pi-hole.
This prevents the hypervisor from depending on a guest VM or LXC for its own DNS service.
The DNS behavior differs depending on the requester:
| Requester | Hostname | Result |
|---|---|---|
| LAN workstation using Pi-hole | pve.bytek.ca |
192.168.2.254 |
| Proxmox using Quad9 | portal.bytek.ca |
38.29.213.101 |
| LAN workstation using Pi-hole | portal.bytek.ca |
192.168.2.182 |
Proxmox may therefore reach Authentik through the public VPS, WireGuard, and Traefik path.
If that path becomes unreliable for OIDC, a single static entry can map portal.bytek.ca to 192.168.2.182 in the Proxmox /etc/hosts file without changing the general DNS resolver.
Browser DNS Requirement
The private hostname pve.bytek.ca exists only in Pi-hole.
Firefox-based browsers such as Zen may bypass Pi-hole when enhanced DNS protection or DNS over HTTPS is forced.
Recommended browser configuration:
- DNS over HTTPS: Off or Default Protection.
- Proxy: No proxy or system proxy settings.
- VPN: Must allow access to the home LAN.
If the private hostname does not load but the IP address works, verify browser DNS protection before changing Proxmox.
Useful Windows checks:
Resolve-DnsName pve.bytek.canslookup pve.bytek.ca 192.168.2.65Test-NetConnection pve.bytek.ca -Port 8006Clear-DnsClientCacheipconfig /flushdns
Expected results:
pve.bytek.caresolves to192.168.2.254.- TCP port 8006 is reachable.
Authentication Model
Normal Authentication
Normal administration uses native OpenID Connect with Authentik.
| OIDC Setting | Value |
|---|---|
| Realm | authentik |
| Issuer | https://portal.bytek.ca/application/o/proxmox/ |
| Username claim | username |
| Scopes | email profile |
| Automatically create users | Enabled |
| Default realm | Optional after validation |
The matching Authentik provider requires:
- Application slug:
proxmox - Client type: Confidential
- Subject mode: User UUID
- Signing key: Selected
- Encryption key: None
- Authorization redirect:
https://pve.bytek.ca:8006
Required Authentik bindings:
- Group
bytek-admin. - Policy
Allow bytek.ca users. - Policy engine mode
ALL.
A user must satisfy both the group and policy requirements.
Authentik Scope Mappings
The Proxmox Authentik provider must include the following selected scope mappings:
openidemailprofile
Missing scope mappings can allow the browser authorization step to succeed while causing Proxmox to fail at the Authentik userinfo endpoint.
A previously observed failure was:
- OpenID authentication failure.
- Failed to contact the userinfo endpoint.
- Proxmox returned authentication failure 401.
Selecting the expected mappings in the Authentik provider resolved the authentication flow.
Authentication and Authorization Are Separate
Successful Authentik authentication creates the Proxmox user but does not grant access to VMs, containers, nodes, or storage.
A newly created OIDC user may initially see an empty interface.
The user requires an explicit Proxmox access-control entry.
For the primary administrator:
| Permission Setting | Value |
|---|---|
| Path | / |
| Role | Administrator |
| Propagate | Enabled |
| User | Authentik-created Proxmox user |
The username normally ends with the realm:
- Example:
brygag1@authentik
Do not accidentally grant the permission to the PAM version of the username.
Break-Glass Authentication
The local Proxmox PAM account must remain available.
| Setting | Value |
|---|---|
| Account | root@pam |
| Authentication source | Proxmox host PAM |
| Purpose | Emergency recovery |
| Password storage | Password manager |
| Removal permitted | No |
Never:
- Delete
root@pam. - Disable the PAM realm.
- Make Authentik the only possible administrative login.
- Depend on public ingress for emergency Proxmox access.
The root@pam account should be tested periodically in a private browser session.
Web Service Health
The Proxmox web interface is provided by pveproxy.
Check service state with:
systemctl is-active pveproxy
Expected result:
active
Check the listener with:
ss -lntp | grep ':8006'
Expected result:
- A listener on TCP port 8006.
pveproxyand worker processes appear.
Test locally with:
curl -k https://127.0.0.1:8006/
A 501 method HEAD not available response from a command using curl -I does not indicate an outage. That response confirms the HTTPS service was reached, but the endpoint does not support the HTTP HEAD method.
Network Validation
Test from another LAN VM:
nc -zv -w 5 192.168.2.254 8006
A successful result confirms TCP reachability.
Test HTTPS by IP:
curl -k https://192.168.2.254:8006/
Test HTTPS by private hostname:
curl -k https://pve.bytek.ca:8006/
If the hostname fails but the IP works, investigate DNS rather than pveproxy.
OIDC Validation
Verify that Proxmox can retrieve Authentik discovery information:
curl -fsS https://portal.bytek.ca/application/o/proxmox/.well-known/openid-configuration
The response should contain OIDC metadata such as:
A request to the userinfo endpoint without a bearer token should return an authentication error.
That response is expected and proves the endpoint is reachable.
OIDC Troubleshooting
Review recent Proxmox authentication logs with:
journalctl -u pvedaemon --since "10 minutes ago" --no-pager
Look for terms such as:
- OpenID.
- Userinfo.
- Token.
- Claim.
- Signature.
- Issuer.
- Authentication.
Authentication Failure 401
Possible causes include:
- Incorrect client ID.
- Incorrect client secret.
- Missing Authentik scope mappings.
- Incorrect redirect URI.
- Missing signing key.
- Token encryption enabled.
- Userinfo endpoint failure.
- Browser callback hostname mismatch.
Failed to Contact Userinfo Endpoint
Check:
- Authentik readiness.
- OIDC discovery.
- The userinfo endpoint.
- Selected Authentik
emailandprofilemappings. - Proxmox realm scopes.
- VPS and WireGuard connectivity.
- Traefik routing.
Login Works but No VMs Appear
The OIDC user has not been assigned a Proxmox ACL.
Assign the required role at / with propagation enabled.
Private Hostname Does Not Resolve
Check:
- Pi-hole record.
- Workstation DNS server.
- Browser DNS over HTTPS.
- Active VPN.
- Browser proxy.
- Windows DNS cache.
Firewall Policy
Proxmox TCP port 8006 should accept traffic only from approved management sources.
Potential management sources include:
- Home LAN.
- Reserved administrative workstation.
- Future WireGuard remote-access gateway.
- Emergency SSH tunnel endpoint.
Do not create an internet-wide accept rule for TCP 8006.
SSH should use:
- Key-based authentication.
- No root password login over SSH where hardening permits.
- LAN or trusted VPN access.
- Firewall restrictions.
Storage Attached to Proxmox
| Storage ID | Type | Primary Role |
|---|---|---|
local |
Directory | ISOs, templates, and selected local content |
local-lvm |
LVM-thin | VM and LXC operating-system disks |
user-data |
LVM-thin | Large application and user-data disks |
pve-backup |
Directory on ext4 | VZDump backup files |
Review storage state using:
pvesm status
All required storage should show as active.
Backup System
Proxmox uses its built-in scheduled backup system.
Backups are written to:
- Storage ID:
pve-backup - Mount point:
/mnt/pve/pve-backup - Physical disk: Dedicated internal 4 TB HDD
The general job uses:
- Snapshot mode.
- ZSTD compression.
- A retention policy.
- Selection of production VMs and LXCs.
The backup mount uses mount-point validation to prevent writing backup data to the Proxmox root filesystem if the HDD is unavailable.
Snapshots
Snapshots are used only for short-term rollback.
Appropriate snapshot cases include:
- Before Authentik changes.
- Before Traefik changes.
- Before operating-system upgrades.
- Before enabling GPU passthrough.
- Before risky application changes.
Snapshots are not backups.
Delete snapshots after the associated change has been validated.
Long-lived snapshots consume thin-pool capacity and increase storage risk.
Planned GPU Passthrough
The RTX 2060 is planned for a dedicated Plex VM.
Before passthrough:
- Confirm VT-d and IOMMU.
- Identify GPU and audio PCI functions.
- Review the IOMMU group.
- Confirm the group contains no critical host devices.
- Create a Proxmox backup.
- Preserve console recovery.
- Use a Q35 and OVMF Plex VM.
- Attach all required RTX 2060 functions.
- Keep the GPU non-primary for the headless Plex VM.
A VM with passed-through hardware cannot use normal live migration.
Proxmox Recovery
If Authentik authentication fails:
- Open the Proxmox login page.
- Select the PAM realm.
- Sign in as
root@pam. - Verify Authentik readiness.
- Verify the Authentik Proxmox provider.
- Verify selected scope mappings.
- Verify the Proxmox realm.
- Review
pvedaemonlogs. - Verify the OIDC user ACL.
- Retest from a private browser session.
If the web interface fails:
- Access the Proxmox console or SSH.
- Verify the Proxmox IP address.
- Verify
pveproxy. - Verify TCP port 8006.
- Review firewall rules.
- Verify storage.
- Restart
pveproxyonly if the service is unhealthy.
If the system disk fails:
- Preserve the user-data NVMe and backup HDD.
- Reinstall Proxmox on replacement system storage.
- Restore networking and storage definitions.
- Reconnect
user-data. - Remount
pve-backup. - Restore guests from backup.
- Recreate the Authentik realm.
- Verify
root@pam. - Test OIDC only after local management works.
Validation Checklist
- Proxmox owns
192.168.2.254. - Pi-hole resolves
pve.bytek.cato192.168.2.254. - Zen or Firefox does not force public DNS for the private hostname.
- TCP port 8006 is reachable from the administrative workstation.
pveproxyis active.root@pamlogin works.- Authentik OIDC login works.
- Authentik user has an explicit Proxmox ACL.
local-lvmis active.user-datais active.pve-backupis active.- Backup jobs complete successfully.
- The backup HDD is mounted before scheduled jobs run.
- No Proxmox management port is exposed publicly.
Document Control
- Owner: Bryan Gagne-Plante
- Private hostname:
pve.bytek.ca - Private address:
192.168.2.254 - Normal authentication: Authentik OIDC
- Emergency authentication:
root@pam - General DNS resolver:
9.9.9.9 - Last verified: YYYY-MM-DD
- Last backup test: YYYY-MM-DD
- Last restore test: YYYY-MM-DD
- OIDC recovery tested: Yes / No
- Known limitations: Single Proxmox host and no current high-availability cluster
Public VPS Ingress
Purpose
The public VPS is the internet-facing entry point for applications hosted on the Bytek home network.
The VPS prevents individual home services from being exposed directly through the Bell router. Public HTTPS traffic reaches the VPS first, then travels through an encrypted WireGuard tunnel to the home network.
The VPS provides:
- A stable public IPv4 entry point.
- Public TCP port 443.
- An encrypted path to the home network.
- Separation between the public internet and private service backends.
- A recovery console independent of the home network.
- A controlled point for public firewalling.
Service Information
| Setting | Value |
|---|---|
| Public IPv4 address | 38.29.213.101 |
| Primary purpose | Public HTTPS ingress |
| Public application port | TCP 443 |
| Home-network transport | WireGuard |
| Administration | SSH key authentication |
| SSH port | Confirm current hardened SSH port |
| Operating system | Confirm current Linux distribution |
| Hosting provider | Confirm current VPS provider |
| Public DNS provider | WHC cPanel |
| Monitoring | Uptime Kuma |
Architecture Role
The VPS does not host the main Bytek applications.
The VPS forwards approved traffic to the home network.
The primary traffic path is:
- A client opens a public application hostname.
- WHC DNS resolves the hostname to
38.29.213.101. - The client establishes HTTPS to the VPS on TCP port 443.
- The VPS forwards the permitted connection through WireGuard.
- The home WireGuard gateway receives the traffic.
- The gateway forwards the request to Traefik at
192.168.2.182. - Traefik selects the correct application backend.
The VPS must not have direct access to all home-LAN services unless a specific rule requires it.
Public Hostnames
The following public DNS records point to the VPS:
| Service | Hostname | Public Destination |
|---|---|---|
| Nextcloud | cloud.bytek.ca |
38.29.213.101 |
| BookStack | docs.bytek.ca |
38.29.213.101 |
| Authentik | portal.bytek.ca |
38.29.213.101 |
| Vikunja | projects.bytek.ca |
38.29.213.101 |
| Traefik dashboard | proxy.bytek.ca |
38.29.213.101 |
| Uptime Kuma | status.bytek.ca |
38.29.213.101 |
The public hostname pve.bytek.ca must not point to the VPS.
Proxmox remains available only through the LAN or a trusted remote-access method.
Public HTTPS Flow
External HTTPS requests follow this sequence:
- WHC public DNS returns
38.29.213.101. - The incoming connection reaches the VPS on TCP port 443.
- VPS firewall rules verify that the connection targets an approved public entry point.
- The VPS forwards the traffic through the WireGuard tunnel.
- The home WireGuard gateway forwards the connection to Traefik.
- Traefik terminates HTTPS or processes the forwarded connection according to the configured design.
- Traefik routes the request by hostname.
The VPS does not need separate public ports for every HTTPS application because Traefik distinguishes applications by hostname.
WireGuard Connection
The VPS maintains a WireGuard peer relationship with the home WireGuard gateway.
The tunnel is used for:
- Public HTTPS ingress.
- Approved management traffic where explicitly configured.
- Connectivity testing between the VPS and home gateway.
- Delivery of traffic to Traefik.
The existing VPS tunnel must remain separate from any future laptop or phone VPN.
Do not reuse:
- The same WireGuard client keys.
- The same peer address.
- The same interface configuration.
- The same subnet for road-warrior clients without deliberate routing design.
WireGuard Health
Review the tunnel using:
sudo wg show
Verify:
- The home peer is listed.
- A recent handshake exists.
- Transfer counters are increasing.
- The expected tunnel addresses appear.
- Allowed IPs contain only intended routes.
- The endpoint and keepalive settings match the deployment.
A recent handshake confirms peer connectivity but does not prove that application forwarding works.
Test the complete application path separately.
VPS Firewall Policy
The VPS firewall should allow only required public and administrative traffic.
Required Public Access
- TCP 443 for hosted HTTPS applications.
- The required WireGuard UDP port.
- The hardened SSH management port.
Traffic That Must Remain Private
Do not expose the following home ports through the VPS:
| Service | Port |
|---|---|
| Proxmox VE | TCP 8006 |
| Pi-hole DNS administration | Private management port |
| Nextcloud AIO management | TCP 8080 |
| Nextcloud AIO backend | TCP 11000 |
| Uptime Kuma backend | TCP 3001 |
| Authentik backend | TCP 9000 |
| Vikunja backend | TCP 3456 |
| BookStack backend | TCP 6875 |
| Docker API | Any Docker API listener |
| Home service SSH | TCP 22 |
New public ports must be documented before being added.
SSH Administration
VPS management uses SSH key authentication.
Recommended SSH controls include:
- Disable password authentication.
- Disable direct root login where the administration model permits.
- Restrict accepted users.
- Use an Ed25519 key.
- Store the private key securely.
- Use Fail2ban or equivalent rate limiting.
- Keep the VPS provider console available for recovery.
- Restrict SSH using the VPS firewall where practical.
Confirm the current SSH listener using:
ss -lntp
Confirm SSH service health using:
systemctl is-active ssh
Expected result:
active
Do not place the private SSH key in BookStack.
Public DNS Management
Public DNS records are managed through WHC cPanel.
When adding a new public application:
- Create an A record for the new hostname.
- Point the record to
38.29.213.101. - Use a short TTL during the initial deployment.
- Create the matching Pi-hole split-DNS record.
- Create the Traefik router and service.
- Confirm the application backend is reachable from Traefik.
- Confirm certificate issuance.
- Test internally.
- Test externally using cellular data or another external network.
- Add Uptime Kuma monitoring.
- Update BookStack documentation.
Do not point public DNS directly to:
- A private home address.
- The application VM.
- Traefik’s private IP.
- Proxmox.
- Nextcloud AIO management.
Public Application Onboarding Checklist
Before exposing a new application through the VPS, confirm:
- The application works directly on its private backend.
- The application VM has a reserved IP.
- The Proxmox firewall allows Traefik to reach the backend.
- The public WHC record points to
38.29.213.101. - Pi-hole points the hostname to
192.168.2.182. - A Traefik route exists.
- The Traefik backend uses the correct current IP.
- A valid HTTPS certificate is issued.
- Authentik is configured if the application requires SSO.
- The application does not expose an administrative backend unintentionally.
- Uptime Kuma monitors the routed service.
- The VM is covered by the Proxmox backup job.
Service Validation
Confirm the VPS Public Address
Verify that public DNS resolves application hostnames to:
38.29.213.101
Confirm the WireGuard Tunnel
Use:
sudo wg show
Expected:
- Recent handshake.
- Increasing transfer counters.
Confirm Public Port 443
Use:
ss -lntp
Confirm that the intended ingress service or forwarding mechanism is listening on TCP port 443.
Confirm Routing to the Home Network
Test the intended WireGuard peer or private tunnel address.
A successful tunnel ping confirms network reachability but not application-level routing.
Confirm an Application Through the VPS
From an external connection, open a public application such as:
The request should reach Authentik without exposing the private backend port.
External Testing
External testing must use a network outside the home LAN.
Suitable test methods include:
- A phone with Wi-Fi disabled.
- A laptop connected through a mobile hotspot.
- A remote trusted network.
- A public external monitoring service.
Testing from the home LAN may use Pi-hole split DNS and therefore bypass the VPS.
To validate public ingress, confirm the client resolves the hostname to 38.29.213.101.
Monitoring
Recommended Uptime Kuma monitors include:
| Monitor | Target |
|---|---|
| VPS host | Public VPS address |
| Public HTTPS | TCP 443 on the VPS |
| WireGuard peer | Home tunnel peer |
| Authentik external route | portal.bytek.ca |
| Nextcloud external route | cloud.bytek.ca |
| BookStack external route | docs.bytek.ca |
| Vikunja external route | projects.bytek.ca |
Monitoring should distinguish:
- VPS host availability.
- Public port availability.
- WireGuard tunnel availability.
- Traefik routing.
- Application health.
A successful ping does not prove HTTPS or WireGuard forwarding is functioning.
Logging
Review logs for:
- SSH authentication failures.
- Firewall drops.
- WireGuard handshake loss.
- Forwarding failures.
- Unexpected public-port listeners.
- Repeated scans or brute-force attempts.
- Kernel networking errors.
Useful sources may include:
- System journal.
- SSH journal.
- Firewall logs.
- WireGuard status.
- Reverse-proxy or forwarding logs, depending on the VPS design.
Do not copy active tokens, private keys, or full authentication headers into BookStack.
Failure Impact
- External access to hosted applications fails.
- Internal LAN access should continue through Pi-hole and Traefik.
- Proxmox remains available internally.
- Nextcloud AIO management remains available internally.
- Pi-hole remains available internally.
- Authentik may remain available internally.
- Existing local application sessions may continue.
The VPS is therefore critical for external access but not for normal LAN access.
Common Failure Scenarios
Public DNS Resolves Incorrectly
Symptoms:
- External clients connect to the wrong host.
- Certificate issuance fails.
- Application is unreachable externally.
Check:
- WHC A record.
- Public resolver results.
- Record TTL.
- Accidental AAAA record.
WireGuard Handshake Is Missing
Symptoms:
- VPS is reachable.
- Public TCP 443 may be open.
- Home applications are unavailable through the VPS.
Check:
- Home internet connection.
- Home WireGuard gateway.
- Peer keys.
- Endpoint.
- Allowed IPs.
- UDP firewall rules.
- Persistent keepalive.
Tunnel Works but Application Fails
Symptoms:
- WireGuard handshake exists.
- Traffic counters increase.
- Public hostname returns timeout or gateway error.
Check:
- Forwarding rules.
- NAT rules.
- Traefik IP address.
- Traefik firewall.
- Application backend.
- Hostname routing.
- Certificate state.
Internal Access Works but External Access Fails
This usually indicates a problem with:
- WHC public DNS.
- VPS.
- WireGuard.
- Home gateway forwarding.
- Public firewalling.
Internal split DNS bypasses those components.
External Access Works but Internal Access Fails
This usually indicates a problem with:
- Pi-hole.
- Split-DNS records.
- Client DNS settings.
- Browser DNS over HTTPS.
- LAN firewall rules.
Recovery Procedure
If all public applications become unavailable:
- Confirm the VPS is running through the hosting-provider console.
- Confirm the public IP is still
38.29.213.101. - Confirm SSH access.
- Confirm the WireGuard interface.
- Confirm the latest home-peer handshake.
- Confirm transfer counters.
- Confirm IP forwarding and firewall rules.
- Confirm TCP 443 is listening.
- Confirm the home WireGuard gateway is running.
- Confirm Traefik is running.
- Test one application directly from Traefik.
- Test the public hostname from an external network.
- Review logs before changing configuration.
- Use the VPS provider console.
- Verify the SSH service.
- Verify the VPS firewall.
- Verify disk space.
- Verify the network interface.
- Restore SSH configuration from a known-good backup if required.
Backup and Recovery Data
Preserve the following VPS information:
- WireGuard configuration.
- WireGuard public and private keys.
- Firewall rules.
- SSH configuration.
- Authorized SSH keys.
- Network forwarding rules.
- NAT rules.
- Service configuration.
- Provider account and console access.
- Public IP information.
- Recovery procedure.
Private keys must remain in a password manager or encrypted backup.
BookStack should record the location of secrets, not the secret values.
Security Review Checklist
- Only approved public ports are open.
- SSH password authentication is disabled.
- SSH private keys are protected.
- Root SSH behavior matches the hardening policy.
- WireGuard keys are unique.
- WireGuard Allowed IPs are narrow.
- Public TCP 443 reaches only the intended ingress path.
- Proxmox TCP 8006 is not exposed.
- Application backend ports are not exposed.
- The Docker API is not exposed.
- Firewall and authentication logs are reviewed.
- Provider console access works.
- Recovery credentials are stored securely.
Document Control
- Owner: Bryan Gagne-Plante
- Public address:
38.29.213.101 - Primary role: Public HTTPS ingress
- Home transport: WireGuard
- Public DNS provider: WHC cPanel
- Last verified: YYYY-MM-DD
- Last external-access test: YYYY-MM-DD
- Last WireGuard recovery test: YYYY-MM-DD
- SSH recovery tested: Yes / No
- Known limitations: External application access depends on one VPS and one WireGuard tunnel
WireGuard Gateway
Purpose
The WireGuard gateway connects the public VPS to the Bytek home network through an encrypted tunnel.
The gateway allows public HTTPS traffic to reach Traefik without exposing individual home services directly through the Bell router.
The WireGuard gateway provides:
- Encrypted VPS-to-home connectivity.
- Controlled forwarding between the tunnel and the home LAN.
- Network address translation where required.
- Firewall enforcement between public ingress and private services.
- A private path from the VPS to Traefik.
- Separation between the public VPS and the rest of the home network.
Service Information
| Setting | Value |
|---|---|
| Service name | WireGuard Gateway |
| Private IP address | 192.168.2.64 |
| Primary role | VPS-to-home tunnel gateway |
| Home LAN | 192.168.2.0/24 |
| Default gateway | 192.168.2.1 |
| Public peer | VPS at 38.29.213.101 |
| Administrative access | SSH key authentication |
| Public exposure | WireGuard port only |
| Backup coverage | Proxmox scheduled backup |
| Guest type | Confirm VM or LXC |
| Proxmox guest ID | Confirm current VM or CT ID |
Architecture Role
The WireGuard gateway sits between the public VPS and the home LAN.
When an external user opens a hosted application:
- Public DNS resolves the application hostname to the VPS.
- The client connects to the VPS.
- The VPS forwards the approved connection through WireGuard.
- The WireGuard gateway receives the encrypted traffic.
- The gateway applies forwarding and firewall rules.
- The gateway sends the request to Traefik at
192.168.2.182. - Traefik routes the request to the correct internal application.
The WireGuard gateway does not host the applications.
The gateway only provides secure transport and controlled forwarding.
Primary Traffic Flow
The normal public application path includes:
| Stage | Component |
|---|---|
| Public DNS | WHC cPanel |
| Public entry point | VPS at 38.29.213.101 |
| Encrypted transport | WireGuard |
| Home tunnel endpoint | WireGuard gateway at 192.168.2.64 |
| HTTPS routing | Traefik at 192.168.2.182 |
| Application backend | Private VM or LXC |
Only required application traffic should pass through this path.
WireGuard Interface
The WireGuard interface contains:
- A private tunnel address.
- A listening port.
- A private key.
- A peer definition for the VPS.
- Allowed IP routes.
- Optional startup and shutdown firewall commands.
The existing interface name, tunnel subnet, listening port, and peer address should be recorded after checking the active configuration.
Useful checks:
sudo wg showsudo wg showconf wg0ip -br addrip route
If the interface is not named wg0, replace wg0 with the actual interface name.
Do not copy the private key into BookStack.
Key Management
WireGuard authentication uses public and private key pairs.
Gateway Private Key
The gateway private key:
- Must remain only on the WireGuard gateway.
- Must have restrictive filesystem permissions.
- Must not be copied into BookStack.
- Must not be sent through chat or email.
- Must be stored in an encrypted backup or password manager if recovery requires it.
Gateway Public Key
The gateway public key may be stored in documentation.
The public key identifies the gateway to the VPS peer.
VPS Public Key
The gateway configuration contains the VPS public key.
The VPS private key remains only on the VPS.
Key Rotation
If a private key is exposed:
- Generate a new key pair on the affected peer.
- Update the opposite peer with the new public key.
- Restart or reload the affected WireGuard interface.
- Confirm a new handshake.
- Revoke the compromised key.
- Update the encrypted recovery record.
- Document the rotation date.
Allowed IPs
WireGuard Allowed IPs control routing and peer address validation.
The gateway and VPS must use narrow Allowed IP entries.
Allowed IPs should contain only:
- The remote tunnel address.
- Explicit home or service routes required by the design.
- Any intentionally routed management destination.
Avoid using overly broad routes unless the architecture requires them.
Do not add the full home LAN to a peer merely for convenience without reviewing the security impact.
IP Forwarding
The gateway requires IPv4 forwarding.
Check the current value with:
sysctl net.ipv4.ip_forward
Expected result:
net.ipv4.ip_forward = 1
The persistent setting should be stored in a file under /etc/sysctl.d/.
If forwarding is disabled, the WireGuard handshake may succeed while application traffic still fails.
Network Address Translation
The gateway may use NAT when home-LAN devices do not have a route back to the WireGuard tunnel subnet.
NAT allows an internal destination to see the connection as originating from the WireGuard gateway’s LAN address.
Advantages:
- No static route is required on the Bell router.
- Existing LAN devices can return traffic normally.
- Deployment is simpler.
Limitations:
- Internal applications see the gateway address rather than the original tunnel source.
- Source-based application logging becomes less detailed.
- Firewall rules on the destination must allow the gateway address.
NAT rules should be narrow and limited to required source networks, destinations, and ports.
Firewall Policy
The WireGuard gateway must permit only required tunnel traffic.
Required Traffic
Typical required traffic includes:
- WireGuard UDP traffic between the VPS and gateway.
- Forwarded HTTPS traffic to Traefik.
- Established return traffic.
- SSH administration from the home LAN.
- Selected diagnostic traffic.
Restricted Traffic
The VPS should not automatically receive unrestricted access to:
- Proxmox.
- Pi-hole administration.
- Nextcloud AIO management.
- Uptime Kuma’s private backend.
- Authentik’s private backend.
- Vikunja’s private backend.
- BookStack’s private backend.
- SSH on every home service.
- The Docker API.
- Other LAN client devices.
Each additional route should have a documented purpose.
Traefik Forwarding
The primary application destination behind the WireGuard gateway is Traefik.
| Destination | Value |
|---|---|
| Traefik address | 192.168.2.182 |
| Public application port | TCP 443 |
| Purpose | HTTPS routing to internal applications |
The gateway should forward approved public HTTPS traffic to Traefik rather than directly to individual application VMs.
This keeps public routing centralized.
Proxmox Management Through the Tunnel
Proxmox management is not part of the normal public ingress path.
If emergency Proxmox access through the VPS is intentionally enabled, use a narrow route such as:
- VPS tunnel address to
192.168.2.254. - TCP port 8006 only.
- Optional TCP port 22 using a separate rule.
- SSH local port forwarding from the remote workstation.
Do not expose Proxmox TCP 8006 directly on the VPS public interface.
The preferred long-term remote-management method is a dedicated road-warrior VPN for the administrator’s laptop or phone.
Separation From a Future Remote-User VPN
The current WireGuard connection is used for VPS ingress.
A future laptop or phone VPN must use:
- A separate WireGuard interface.
- A separate UDP port.
- A separate VPN subnet.
- Separate peer keys.
- A separate firewall policy.
- Unique addresses for every device.
Do not reuse the VPS key pair or peer configuration for remote-user devices.
The VPS tunnel and a road-warrior VPN serve different purposes.
Service Startup
The WireGuard gateway should start early after a host reboot.
Preferred dependency order:
- Proxmox VE.
- Pi-hole.
- WireGuard gateway.
- Authentik.
- Traefik.
- Public applications.
The WireGuard service should be enabled at boot.
Check the active service using:
systemctl status wg-quick@wg0 --no-pager
If the interface name differs, replace wg0 with the correct name.
Expected service state:
- Active.
- Interface created.
- Peer loaded.
- No repeated startup errors.
Health Validation
Confirm the Interface
Use:
sudo wg show
Confirm:
- Interface exists.
- Listening port is present.
- VPS public key is listed.
- Endpoint is correct.
- Allowed IPs are correct.
- Latest handshake is recent.
- Transfer counters increase.
Confirm Tunnel Addressing
Use:
ip -br addr
The WireGuard interface should show the expected tunnel address.
Confirm Routes
Use:
ip route
The required tunnel and LAN routes should be present.
Confirm Forwarding
Use:
sysctl net.ipv4.ip_forward
Expected:
- Forwarding enabled.
Confirm Firewall
If UFW is used:
sudo ufw status numbered
If iptables NAT is used:
sudo iptables -t nat -L -n -v --line-numbers
If nftables is used:
sudo nft list ruleset
Review only the firewall system actually used by the gateway.
End-to-End Validation
A successful WireGuard handshake does not prove application forwarding works.
Validate the complete path.
From the VPS
Test the home WireGuard peer or tunnel gateway address.
Then test Traefik through the tunnel on the intended destination and port.
From an External Client
Use:
- Cellular data.
- A mobile hotspot.
- A remote network.
Open a public application such as:
The application should load through:
- VPS.
- WireGuard.
- Gateway.
- Traefik.
- Application backend.
From the Home LAN
The same hostname should resolve through Pi-hole and bypass the VPS.
This verifies that public and private paths both work.
Monitoring
Recommended Uptime Kuma monitors include:
| Monitor | Target |
|---|---|
| Gateway VM or LXC | Ping 192.168.2.64 |
| WireGuard tunnel peer | Tunnel address or supported monitor |
| Public VPS | 38.29.213.101 |
| Traefik through tunnel | Approved tunnel path |
| Public Authentik | portal.bytek.ca |
| Public Nextcloud | cloud.bytek.ca |
Monitoring should distinguish between:
Common Failure Scenarios
Handshake Is Missing
Possible causes:
- VPS is down.
- Home internet connection is down.
- Gateway is down.
- WireGuard service is stopped.
- UDP port is blocked.
- Peer endpoint changed.
- Public key mismatch.
- Private key was changed.
- Allowed IPs are incorrect.
Handshake Exists but Applications Fail
Possible causes:
- IP forwarding is disabled.
- Forwarding firewall rule is missing.
- NAT rule is missing.
- Traefik is unavailable.
- Traefik address changed.
- Destination firewall denies the gateway.
- Return traffic follows the wrong path.
- VPS forwarding configuration is incorrect.
Internal Applications Work but Public Applications Fail
This usually indicates a problem with:
- Public DNS.
- VPS.
- WireGuard.
- Gateway forwarding.
- VPS or home-end firewalling.
One Public Application Fails
If other public applications work, the tunnel is probably healthy.
Check:
- Traefik router.
- Certificate.
- Backend address.
- Backend firewall.
- Application health.
Tunnel Stops After a Power Failure
Check startup order:
- Confirm the gateway booted.
- Confirm WireGuard started.
- Confirm the network interface has its LAN address.
- Confirm the VPS peer.
- Confirm forwarding.
- Confirm firewall rules loaded.
- Confirm a new handshake.
- Confirm Traefik is available.
Troubleshooting Order
When public ingress fails:
- Confirm the VPS is running.
- Confirm the WireGuard gateway is running.
- Confirm the gateway LAN IP is
192.168.2.64. - Confirm the WireGuard interface exists.
- Confirm the latest handshake.
- Confirm transfer counters.
- Confirm IPv4 forwarding.
- Confirm forwarding firewall rules.
- Confirm NAT rules.
- Confirm Traefik at
192.168.2.182. - Test a Traefik backend directly.
- Test the public hostname externally.
- Review logs before changing keys.
Do not regenerate WireGuard keys as an early troubleshooting step.
Logging
Useful log sources include:
- WireGuard service journal.
- System journal.
- UFW logs.
- Kernel network logs.
- Traefik access logs.
- VPS firewall logs.
Review the WireGuard unit using:
journalctl -u wg-quick@wg0 --since "30 minutes ago" --no-pager
Replace the interface name if necessary.
Look for:
- Interface startup failures.
- Invalid configuration syntax.
- Address conflicts.
- Missing commands.
- Firewall command failures.
- Route conflicts.
Configuration Backup
Protect the following gateway data:
- WireGuard configuration.
- Private key.
- Public key.
- Peer definitions.
- Firewall rules.
- NAT rules.
- Sysctl forwarding configuration.
- SSH configuration.
- Authorized SSH keys.
- Network configuration.
- Recovery notes.
The VM or LXC is included in the Proxmox backup system.
The WireGuard private key should also exist in an encrypted recovery location.
Do not put the private key directly into BookStack.
Recovery Procedure
If the gateway VM or LXC is corrupted:
- Use Proxmox to identify the most recent good backup.
- Restore under a temporary guest ID if testing is required.
- Keep the restored guest disconnected from the LAN during initial inspection.
- Verify the WireGuard configuration and private key.
- Verify the LAN address.
- Verify forwarding and firewall rules.
- Shut down the failed production guest.
- Assign the expected production identity and network configuration.
- Start the replacement.
- Confirm a WireGuard handshake.
- Confirm Traefik reachability.
- Test an application externally.
- Generate a new gateway key pair.
- Update the VPS peer with the new gateway public key.
- Preserve the VPS key.
- Restart the WireGuard interfaces.
- Confirm the new handshake.
- Store the new private key securely.
Security Checklist
- WireGuard private key is not stored in BookStack.
- VPS and gateway use unique private keys.
- Allowed IPs are narrow.
- Public UDP exposure is limited to the WireGuard port.
- SSH uses keys.
- SSH is restricted to approved sources.
- IPv4 forwarding is enabled only because routing is required.
- NAT rules are narrow.
- VPS access to the LAN is limited.
- Proxmox is not publicly reachable.
- Pi-hole administration is not publicly reachable.
- AIO management is not publicly reachable.
- Docker API is not exposed.
- Backup coverage is active.
- Recovery keys are stored securely.
Validation Checklist
- Gateway is running.
- LAN address is
192.168.2.64. - WireGuard interface is active.
- VPS peer is listed.
- Latest handshake is recent.
- Transfer counters increase.
- IP forwarding is enabled.
- Required routes exist.
- Required firewall rules exist.
- NAT rules are active where needed.
- Traefik at
192.168.2.182is reachable. - Public Authentik works externally.
- Public Nextcloud works externally.
- Internal split-DNS access still works without the VPS.
- Proxmox backup includes the gateway.
- WireGuard recovery material is stored securely.
Document Control
- Owner: Bryan Gagne-Plante
- Private address:
192.168.2.64 - Primary role: VPS-to-home WireGuard gateway
- Public peer: VPS at
38.29.213.101 - Guest type: Confirm VM or LXC
- Guest ID: Confirm current ID
- WireGuard interface: Confirm current interface name
- Listen port: Confirm current WireGuard UDP port
- Tunnel subnet: Confirm current tunnel subnet
- Last verified: YYYY-MM-DD
- Last handshake test: YYYY-MM-DD
- Last external ingress test: YYYY-MM-DD
- Last restore test: YYYY-MM-DD
- Known limitation: External application access depends on one VPS-to-home WireGuard tunnel
Pi-hole
Purpose
Pi-hole provides DNS services for the Bytek home network.
Pi-hole is responsible for:
- Resolving public internet hostnames.
- Blocking selected advertising and tracking domains.
- Providing split-DNS records for Bytek applications.
- Providing DHCP reservations for infrastructure guests.
- Directing internal application traffic to Traefik.
- Resolving the private Proxmox hostname.
- Providing DNS to selected Docker containers.
Pi-hole is foundational infrastructure. Pi-hole must remain accessible independently of Traefik and Authentik so DNS can be repaired during an application or identity outage.
Service Information
| Setting | Value |
|---|---|
| Service name | Pi-hole |
| Private IP address | 192.168.2.65 |
| LAN subnet | 192.168.2.0/24 |
| DNS ports | TCP and UDP 53 |
| Primary role | LAN DNS and split DNS |
| Secondary role | DHCP reservations |
| Management scope | Home LAN or trusted VPN |
| Authentication | Local Pi-hole credentials |
| Proxmox guest type | LXC |
| Proxmox guest ID | Confirm current CT ID |
| Backup coverage | Proxmox scheduled backup |
Architecture Role
Pi-hole provides DNS to home-LAN clients and selected infrastructure containers.
When a LAN device opens a Bytek application:
- The device asks Pi-hole to resolve the application hostname.
- Pi-hole returns Traefik’s private address,
192.168.2.182. - The client connects directly to Traefik.
- Traefik routes the request to the correct private application backend.
This allows the same hostname and HTTPS certificate to be used internally and externally.
Pi-hole is not part of the public application path for external users.
External users resolve Bytek applications through WHC public DNS instead.
DNS Responsibilities
Pi-hole provides two types of DNS resolution.
Public Internet Resolution
Pi-hole forwards normal public DNS queries to its configured upstream resolvers.
Examples include:
- Software repositories.
- Linux package mirrors.
- Let’s Encrypt.
- Docker registries.
- Public websites.
- Public APIs.
Local Bytek Resolution
Pi-hole answers selected Bytek application hostnames using private addresses.
These local records create the split-DNS design.
Split-DNS Records
| Hostname | Internal Destination | Purpose |
|---|---|---|
cloud.bytek.ca |
192.168.2.182 |
Nextcloud through Traefik |
docs.bytek.ca |
192.168.2.182 |
BookStack through Traefik |
portal.bytek.ca |
192.168.2.182 |
Authentik through Traefik |
projects.bytek.ca |
192.168.2.182 |
Vikunja through Traefik |
proxy.bytek.ca |
192.168.2.182 |
Traefik dashboard |
status.bytek.ca |
192.168.2.182 |
Uptime Kuma through Traefik |
pve.bytek.ca |
192.168.2.254 |
Direct Proxmox management |
Application hostnames point internally to Traefik.
Proxmox is the exception because Proxmox does not sit behind Traefik.
Public and Private DNS Comparison
| Hostname | Public WHC Result | Internal Pi-hole Result |
|---|---|---|
cloud.bytek.ca |
38.29.213.101 |
192.168.2.182 |
docs.bytek.ca |
38.29.213.101 |
192.168.2.182 |
portal.bytek.ca |
38.29.213.101 |
192.168.2.182 |
projects.bytek.ca |
38.29.213.101 |
192.168.2.182 |
proxy.bytek.ca |
38.29.213.101 |
192.168.2.182 |
status.bytek.ca |
38.29.213.101 |
192.168.2.182 |
pve.bytek.ca |
No public record | 192.168.2.254 |
The split-DNS model provides:
- Lower latency for LAN clients.
- No unnecessary traffic through the VPS.
- No dependency on router hairpin NAT.
- Consistent application URLs.
- Consistent OIDC callback addresses.
- Valid HTTPS certificates on internal connections.
Proxmox DNS Exception
The Proxmox host intentionally does not use Pi-hole as its general DNS resolver.
Proxmox uses:
- DNS resolver:
9.9.9.9
This prevents the hypervisor from depending on a guest LXC for DNS.
As a result:
- LAN clients resolve
portal.bytek.cato192.168.2.182. - Proxmox normally resolves
portal.bytek.cato the VPS at38.29.213.101.
Do not change the Proxmox resolver to Pi-hole without reviewing the dependency impact.
If Proxmox eventually needs a direct local route to Authentik, use a specific /etc/hosts entry for portal.bytek.ca instead of replacing the general resolver.
DHCP Reservations
Infrastructure guests should receive stable addresses through DHCP reservations.
Reservations are based on the virtual NIC MAC address assigned by Proxmox.
Known Reservations
| Service | Reserved Address |
|---|---|
| Nextcloud AIO | 192.168.2.100 |
| Uptime Kuma | 192.168.2.115 |
| Vikunja | 192.168.2.121 |
| Authentik | 192.168.2.162 |
| Traefik | 192.168.2.182 |
| BookStack | Confirm current address |
| Plex | Confirm after deployment |
| Future game server | Confirm after deployment |
The WireGuard gateway uses 192.168.2.64.
Confirm whether the WireGuard address is configured through a reservation or static guest networking before editing it.
Why Stable Addresses Matter
Infrastructure addresses are referenced by:
- Traefik backend definitions.
- Proxmox firewall rules.
- Uptime Kuma monitors.
- Authentik Proxy Providers.
- Docker DNS settings.
- BookStack documentation.
- Administrative bookmarks.
- WireGuard forwarding rules.
- Application trusted-proxy settings.
An unexpected address change can break several services simultaneously.
Always reserve a service address before treating the address as permanent.
Finding a Guest MAC Address
For a Proxmox VM, inspect the net0 entry using:
qm config <VMID>
For an LXC, inspect the network entry using:
pct config <CTID>
Record the MAC address in Pi-hole when creating the reservation.
Do not manually duplicate a MAC address between guests.
DNS Clients
Pi-hole may provide DNS to:
- Windows workstations.
- Linux workstations.
- Mobile devices on the LAN.
- Service VMs.
- Service LXCs.
- Selected Docker containers.
- Future remote VPN clients.
- Uptime Kuma.
- Traefik.
- Nextcloud application containers.
- BookStack.
- Vikunja.
Not every infrastructure host must use Pi-hole.
Proxmox intentionally uses Quad9.
Other critical systems may also use an independent resolver if avoiding a dependency on Pi-hole is more important than split-DNS access.
Docker DNS
Some application containers require explicit Pi-hole DNS.
This is particularly important for containers that must resolve private Bytek hostnames.
Traefik
The Traefik container explicitly uses:
192.168.2.65
This was added after Docker’s embedded resolver failed to resolve the Let’s Encrypt ACME endpoint following a power interruption.
Uptime Kuma
The Uptime Kuma container explicitly uses:
192.168.2.65
This allows Kuma to monitor private Bytek application hostnames.
BookStack
BookStack may use Pi-hole explicitly so the container can resolve Authentik at portal.bytek.ca.
Nextcloud
Nextcloud containers must be able to resolve portal.bytek.ca for Authentik OIDC.
If the host resolves a name but the container does not, inspect the container’s Docker DNS configuration.
Docker DNS Validation
Confirm a container’s configured DNS servers using:
sudo docker inspect --format='DNS={{json .HostConfig.Dns}}' <container-name>
Test hostname resolution from inside a container using:
sudo docker exec <container-name> getent hosts portal.bytek.ca
Expected internal result:
portal.bytek.caresolves to192.168.2.182.
If the command returns no output, container DNS is failing.
Do not change OIDC client IDs or secrets before DNS is proven healthy.
Browser DNS Over HTTPS
Firefox-based browsers, including Zen, can bypass Pi-hole through DNS over HTTPS.
This previously prevented access to:
pve.bytek.ca
Pi-hole correctly resolved the private hostname, but Zen attempted to use protected public DNS instead.
Recommended setting:
- DNS over HTTPS: Off or Default Protection.
If a private hostname works by IP but not by name:
- Check the hostname from the operating system.
- Query Pi-hole directly.
- Disable forced browser DNS over HTTPS.
- Clear the operating-system DNS cache.
- Clear the browser DNS cache.
- Close idle browser sockets.
- Restart the browser.
Useful Windows commands include:
Resolve-DnsName pve.bytek.canslookup pve.bytek.ca 192.168.2.65Clear-DnsClientCacheipconfig /flushdns
DNS Validation
Test an Internal Application Record
Use:
nslookup portal.bytek.ca 192.168.2.65
Expected result:
portal.bytek.caresolves to192.168.2.182.
Test Proxmox Resolution
Use:
nslookup pve.bytek.ca 192.168.2.65
Expected result:
pve.bytek.caresolves to192.168.2.254.
Test Public Resolution
Use:
nslookup google.com 192.168.2.65
Expected result:
- One or more public addresses are returned.
Test DNS Over TCP
Use:
nc -zv -w 3 192.168.2.65 53
Test DNS Over UDP
Use:
nc -zvu -w 3 192.168.2.65 53
Both TCP and UDP DNS should be available to approved LAN clients.
Service Health
Confirm that the Pi-hole LXC is running from Proxmox.
Confirm the guest address using:
ip -br -4 addr
Confirm DNS listeners using:
ss -lntup | grep ':53'
Confirm the Pi-hole DNS service using the appropriate service command for the installed Pi-hole version.
Review recent service logs if DNS queries fail.
Management Access
Pi-hole management should remain private.
Approved access paths include:
- Home LAN.
- Trusted remote-access VPN.
- Proxmox console.
- SSH from an approved administrative source.
Do not route Pi-hole administration through:
- The public VPS.
- Traefik public HTTPS.
- Authentik ForwardAuth.
- A public WHC hostname.
- Direct Bell router port forwarding.
Why Pi-hole Is Not Behind Authentik
Pi-hole is part of the dependency chain for internal Authentik and application resolution.
If Pi-hole management depended on Authentik, the following circular failure could occur:
- Pi-hole DNS fails.
- Authentik’s hostname stops resolving internally.
- Authentik login fails.
- Pi-hole administration is protected by Authentik.
- The administrator cannot reach Pi-hole to repair DNS.
Pi-hole therefore uses local credentials and private network access.
Upstream DNS
Pi-hole forwards non-local queries to configured upstream resolvers.
The chosen upstream resolver configuration should be documented after verification.
When changing upstream DNS:
- Record the current configuration.
- Change only one resolver setting at a time.
- Test public DNS.
- Test internal local records.
- Test DNSSEC if enabled.
- Test IPv4 and IPv6 behavior separately.
- Confirm application containers still resolve external services.
Do not assume that an upstream failure means Pi-hole itself is unavailable.
IPv6 Considerations
The Bytek homelab mainly uses IPv4 addressing.
If IPv6 is not intentionally configured end to end:
- Avoid publishing unintended AAAA records.
- Verify clients are not receiving an unusable IPv6 DNS path.
- Check browser connection behavior.
- Check whether applications prefer IPv6 before IPv4.
- Document any intentional IPv6 disabling.
An incorrect public AAAA record can cause clients to attempt an unavailable path before falling back to IPv4.
Firewall Policy
Pi-hole must accept DNS from approved clients.
Typical requirements include:
- LAN clients to TCP 53.
- LAN clients to UDP 53.
- Approved Docker hosts to TCP and UDP 53.
- Future VPN clients to TCP and UDP 53.
- Administrative SSH from approved LAN sources.
- Private management access from the LAN.
Avoid exposing DNS publicly.
A publicly accessible recursive DNS resolver can be abused.
The Bell router must not forward public TCP or UDP port 53 to Pi-hole.
Monitoring
Recommended Uptime Kuma monitors include:
| Monitor | Target |
|---|---|
| Pi-hole guest | Ping 192.168.2.65 |
| Pi-hole DNS UDP | 192.168.2.65:53 |
| Pi-hole DNS TCP | 192.168.2.65:53 |
| Internal Authentik record | portal.bytek.ca |
| Internal Proxmox record | pve.bytek.ca |
| Public DNS resolution | Selected external hostname |
Monitoring should distinguish between:
Common Failure Scenarios
Pi-hole Guest Is Down
Symptoms:
- Internal hostnames fail.
- Containers using Pi-hole cannot resolve names.
- Uptime Kuma reports several services down.
- Browser applications may fail internally.
Check:
- Proxmox guest status.
- LXC startup.
- Guest network address.
- Pi-hole service.
- Backup availability.
Public DNS Fails but Local Records Work
Possible causes:
- Upstream resolver unavailable.
- Internet outage.
- DNSSEC issue.
- Firewall blocking outbound DNS.
- Incorrect upstream configuration.
Local Records Fail but Public DNS Works
Possible causes:
- Local record deleted.
- Typographical error.
- Different Pi-hole instance answering.
- Client using another DNS server.
- Browser DNS over HTTPS.
- Cached stale record.
VM Host Resolves but Container Does Not
Possible causes:
- Docker embedded DNS issue.
- Container started before Pi-hole.
- Explicit Docker DNS is missing.
- Docker network is unhealthy.
- Guest firewall blocks DNS.
Recovery may require recreating the container after Pi-hole is working.
One Host Uses the Wrong Address
Possible causes:
- Client DNS cache.
- Browser DNS cache.
- Forced DNS over HTTPS.
- Public resolver used instead of Pi-hole.
- Hosts-file override.
- Multiple active network adapters.
- VPN DNS override.
Power-Failure Recovery
After an electrical outage, Pi-hole should start before applications that depend on split DNS.
Recommended validation order:
- Confirm Proxmox is running.
- Confirm the Pi-hole LXC started.
- Confirm Pi-hole owns
192.168.2.65. - Confirm TCP and UDP port 53.
- Confirm one local record.
- Confirm one public hostname.
- Start or validate Traefik.
- Validate Authentik.
- Restart affected containers whose DNS remained broken.
- Confirm Uptime Kuma monitors recover.
Application containers may need to be recreated or restarted if Docker cached a broken DNS path during startup.
Backup
The Pi-hole LXC is included in the Proxmox scheduled backup job.
The backup should preserve:
- Pi-hole configuration.
- Local DNS records.
- DHCP reservations.
- Adlists.
- Allow and deny lists.
- Custom DNS settings.
- Network configuration.
- Administrative configuration.
A Pi-hole configuration export may be maintained in addition to the Proxmox backup.
The export should be stored securely because it may contain internal network details.
Recovery Procedure
- Open Proxmox using
192.168.2.254if private DNS is unavailable. - Confirm the Pi-hole LXC is running.
- Open the LXC console.
- Confirm the interface owns
192.168.2.65. - Confirm the default route.
- Confirm TCP and UDP port 53.
- Confirm the Pi-hole DNS service.
- Test a local record from inside the LXC.
- Test a public record.
- Review logs.
- Restore from a Proxmox backup if the configuration is damaged.
If Pi-hole is restored under a temporary CT ID:
- Keep the restored container disconnected from the live LAN initially.
- Verify the configuration.
- Do not run two Pi-hole instances with the same IP.
- Shut down the failed instance before activating the restored one.
Address-Change Procedure
Changing Pi-hole’s address would affect most of the environment.
Before changing 192.168.2.65:
- Document the current state.
- Update the Bell router or DHCP DNS settings.
- Update Docker Compose files with explicit DNS.
- Update Uptime Kuma.
- Update future VPN client DNS.
- Update firewall rules.
- Update service documentation.
- Flush client DNS caches.
- Recreate containers that use explicit Docker DNS.
- Test all split-DNS applications.
Avoid changing Pi-hole’s address unless required.
Security Checklist
- Pi-hole management is LAN or VPN only.
- Public TCP and UDP port 53 are not forwarded.
- Local administrator credentials are stored securely.
- SSH uses key-based authentication.
- DNS access is limited to approved networks.
- Local DNS records contain only intended hostnames.
- Proxmox does not depend on Pi-hole.
- Pi-hole is not behind Authentik.
- Backups include the Pi-hole LXC.
- A configuration export exists or is planned.
- Browser DNS over HTTPS behavior is documented.
- Upstream DNS settings are documented.
- Recovery by private IP has been tested.
Validation Checklist
- Pi-hole LXC is running.
- Pi-hole owns
192.168.2.65. - TCP port 53 responds.
- UDP port 53 responds.
- Public names resolve.
- Internal hostnames resolve to Traefik.
pve.bytek.caresolves directly to Proxmox.- No public WHC record exists for
pve.bytek.ca. - Traefik containers can use Pi-hole.
- Uptime Kuma can use Pi-hole.
- Nextcloud can resolve Authentik.
- BookStack can resolve Authentik.
- Vikunja can resolve Authentik.
- DNS over HTTPS is not bypassing Pi-hole on administrative browsers.
- Proxmox backup includes Pi-hole.
Document Control
- Owner: Bryan Gagne-Plante
- Private address:
192.168.2.65 - Primary role: LAN DNS and split DNS
- Secondary role: DHCP reservations
- Guest type: LXC
- Guest ID: Confirm current CT ID
- Management scope: LAN or trusted VPN
- Upstream resolvers: Confirm current configuration
- Last verified: YYYY-MM-DD
- Last DNS recovery test: YYYY-MM-DD
- Last backup test: YYYY-MM-DD
- Last configuration export: YYYY-MM-DD
- Known limitations: Internal application resolution depends on one Pi-hole instance
Traefik
Purpose
Traefik is the central HTTPS reverse proxy for the Bytek homelab.
Traefik receives HTTPS requests, selects the correct application according to the requested hostname, and forwards the request to the appropriate private backend.
Traefik provides:
- HTTPS termination.
- Hostname-based routing.
- Let’s Encrypt certificate issuance and renewal.
- ACME DNS-01 validation through the WHC cPanel API.
- Routing to private application backends.
- Authentik ForwardAuth for selected administrative services.
- A dashboard for routers, services, middlewares, and certificates.
- Consistent internal and external application URLs.
- Protection of private backend addresses from direct public exposure.
Service Information
| Setting | Value |
|---|---|
| Service name | Traefik |
| Private IP address | 192.168.2.182 |
| HTTPS entry point | TCP 443 |
| Public dashboard hostname | proxy.bytek.ca |
| Deployment directory | /opt/traefik |
| Container DNS | 192.168.2.65 |
| Certificate authority | Let’s Encrypt |
| ACME challenge type | DNS-01 |
| DNS automation | WHC cPanel API |
| Normal dashboard authentication | Authentik ForwardAuth |
| Secondary dashboard authentication | Basic Auth while retained |
| Backup coverage | Proxmox scheduled backup |
| Proxmox VM ID | Confirm current VM ID |
Dashboard:
Architecture Role
Traefik is the common application-routing layer for both external and internal clients.
External Request Path
- WHC public DNS resolves the application hostname to the VPS at
38.29.213.101. - The VPS receives HTTPS traffic.
- The VPS forwards the traffic through WireGuard.
- The home WireGuard gateway sends the request to Traefik at
192.168.2.182. - Traefik examines the requested hostname.
- Traefik forwards the request to the matching private backend.
Internal Request Path
- A LAN client queries Pi-hole.
- Pi-hole resolves the application hostname to
192.168.2.182. - The client connects directly to Traefik.
- Traefik forwards the request to the matching private backend.
The same application hostname is used internally and externally.
Application Routing Reference
| Hostname | Backend Destination | Authentication |
|---|---|---|
portal.bytek.ca |
192.168.2.162:9000 |
Authentik native authentication |
cloud.bytek.ca |
192.168.2.100:11000 |
Nextcloud native OIDC |
projects.bytek.ca |
192.168.2.121:3456 |
Vikunja native OIDC |
docs.bytek.ca |
BookStack private IP on TCP 6875 | BookStack native OIDC |
status.bytek.ca |
Uptime Kuma or Authentik embedded outpost | Authentik Proxy Provider |
proxy.bytek.ca |
Traefik internal dashboard service | Authentik ForwardAuth |
The BookStack private address must be confirmed and added to this page.
Configuration Locations
| Purpose | Location |
|---|---|
| Docker Compose file | /opt/traefik/compose.yml |
| Static Traefik configuration | /opt/traefik/traefik.yml |
| Environment variables | /opt/traefik/.env |
| Dynamic configuration | /opt/traefik/dynamic/ |
| Certificate state | /opt/traefik/data/acme.json |
| Traefik log | /opt/traefik/logs/traefik.log |
| Access log | Confirm current path |
| Additional persistent data | /opt/traefik/data/ |
The exact certificate and log paths should be confirmed against the current Compose file before relying on them during recovery.
Dynamic Configuration
Each application normally has its own dynamic configuration file.
Known files include:
| File | Purpose |
|---|---|
authentik.yml |
Authentik router and service |
authentik-forwardauth.yml |
Shared Authentik middleware and outpost service |
bookstack.yml |
BookStack router and service |
dashboard.yml |
Traefik dashboard router |
nextcloud.yml |
Nextcloud router and service |
uptime-kuma.yml |
Uptime Kuma router and service |
vikunja.yml |
Vikunja router and service |
Separating services into individual files makes configuration changes easier to review and reverse.
Before editing a working file:
- Create a dated or descriptive backup copy.
- Change only the required section.
- Validate the YAML indentation.
- Check the Traefik log.
- Test the route locally.
- Test the route from the LAN.
- Test the route externally if the service is public.
- Remove obsolete backup files after the change is documented.
Static Configuration
The static Traefik configuration defines platform-level settings such as:
- Entry points.
- File-provider location.
- Dashboard availability.
- Logging.
- Access logging.
- Certificate resolvers.
- ACME settings.
- Trusted forwarded headers.
- Provider behavior.
Static configuration changes normally require a Traefik container restart or recreation.
Dynamic routing changes are usually detected automatically by the file provider when file watching is enabled.
Docker DNS
The Traefik container explicitly uses Pi-hole at 192.168.2.65.
This configuration was added after Docker’s embedded resolver failed to resolve the Let’s Encrypt ACME API following a power interruption.
The observed error reported that the Docker resolver at 127.0.0.11 was misbehaving.
Explicit Pi-hole DNS allows Traefik to resolve:
- Let’s Encrypt endpoints.
- WHC API endpoints.
- Internal Bytek hostnames.
- External Docker and operating-system dependencies.
Verify the configured Docker DNS using:
sudo docker inspect --format='DNS={{json .HostConfig.Dns}}' traefik
Expected result:
192.168.2.65appears in the DNS list.
The container’s internal resolver file may still show Docker’s embedded resolver at 127.0.0.11.
That is normal when Docker forwards requests to the explicitly configured upstream DNS server.
Container Management
Move to the deployment directory before running Compose commands:
cd /opt/traefik
Check the stack:
sudo docker compose ps
View recent logs:
sudo docker compose logs --tail 100 traefik
Follow logs live:
sudo docker compose logs -f traefik
Validate the Compose file:
sudo docker compose config --quiet
Apply normal Compose changes:
sudo docker compose up -d
Recreate Traefik after changing container-level settings such as DNS:
sudo docker compose up -d --force-recreate traefik
Restart Traefik after a static configuration change:
sudo docker compose restart traefik
A normal restart does not apply changes to Docker-level settings such as container DNS, network mode, volume mounts, or environment variables. Those changes require container recreation.
Naming and Routing Standard
Every Traefik application should have:
- A descriptive router name.
- A descriptive service name.
- A hostname rule.
- The
websecureentry point. - TLS enabled.
- The correct certificate resolver.
- A private backend destination.
- Host-header forwarding where required.
- Authentication middleware only when appropriate.
A route should not contain Authentik ForwardAuth if the application already uses native OIDC and requires direct API or client access.
Applications That Must Not Use ForwardAuth
Do not attach Authentik ForwardAuth to:
- Nextcloud.
- Vikunja.
- BookStack.
- Authentik itself.
- Proxmox VE.
- Nextcloud AIO management.
- Plex.
- Game-server traffic.
Nextcloud
Nextcloud mobile clients, desktop clients, WebDAV, CalDAV, CardDAV, and application authentication must reach Nextcloud directly.
Nextcloud uses native OIDC.
Vikunja
Vikunja uses native Authentik OIDC.
BookStack
BookStack uses native Authentik OIDC.
Authentik
Authentik must never depend on its own ForwardAuth middleware.
Proxmox VE
Proxmox uses native OIDC and remains outside Traefik.
Plex
Plex clients use Plex authentication and Plex-specific APIs.
Applications That Use Authentik Proxy Integration
Traefik Dashboard
The Traefik dashboard uses single-application ForwardAuth.
The dashboard request is validated by the Authentik embedded outpost before access is granted.
Uptime Kuma
Uptime Kuma uses an Authentik Proxy Provider because Uptime Kuma does not provide the same native OIDC integration as the other applications.
Selected status-page and monitoring endpoints may bypass authentication when public access is intentionally required.
Traefik Dashboard Authentication
The dashboard is available at:
Access is restricted by:
- Authentik group
bytek-admin. - Authentik policy
Allow bytek.ca users. - Policy engine mode
ALL.
During the initial ForwardAuth validation, Traefik Basic Auth remains enabled as a second authentication layer.
The expected initial flow is:
- The administrator opens
proxy.bytek.ca. - Traefik invokes Authentik ForwardAuth.
- Authentik validates the user and MFA.
- Authentik checks the application bindings.
- Traefik receives the authenticated request.
- Traefik presents the existing Basic Auth challenge.
- The administrator enters the Traefik Basic Auth credentials.
- The dashboard opens.
Basic Auth may be removed only after ForwardAuth and recovery procedures are fully tested.
Authentik ForwardAuth Middleware
The ForwardAuth middleware sends authentication requests to the Authentik embedded outpost.
The outpost backend is hosted by Authentik at 192.168.2.162 on TCP port 9000.
The middleware should trust the forwarded request headers and return Authentik identity headers to the protected application.
Typical identity headers include:
- Authentik username.
- Authentik group list.
- Authentik entitlements.
- Email address.
- Display name.
- User identifier.
- Provider metadata.
- Application metadata.
- Outpost metadata.
Do not log full authentication headers in a location accessible to untrusted users.
Authentik Outpost Callback Route
The path under /outpost.goauthentik.io/ must remain reachable without the ForwardAuth middleware.
If the callback path is protected by the same middleware, an authentication loop can occur.
The callback router should:
- Match
proxy.bytek.ca. - Match the
/outpost.goauthentik.io/path prefix. - Use the Authentik outpost service.
- Have a higher routing priority than the dashboard router.
- Use HTTPS.
- Avoid the dashboard ForwardAuth middleware.
Test the outpost with:
curl -k -I https://proxy.bytek.ca/outpost.goauthentik.io/ping
Expected result:
- HTTP 204.
A normal browser link is not useful for this endpoint because an HTTP 204 response intentionally contains no page content.
Certificate Management
Traefik obtains HTTPS certificates from Let’s Encrypt.
The current design uses:
- ACME.
- DNS-01 validation.
- WHC cPanel API.
- Certificate resolver named
letsencrypt.
Each public router should reference the correct certificate resolver.
A router without the certificate resolver may use the Traefik default certificate instead of requesting the intended hostname certificate.
ACME DNS-01 Flow
Certificate issuance follows this sequence:
- A Traefik router requests a certificate.
- Traefik contacts the Let’s Encrypt ACME API.
- Traefik creates the required DNS challenge through the WHC API.
- Let’s Encrypt validates the challenge.
- Traefik receives the certificate.
- Traefik stores the certificate state in
acme.json. - Traefik serves the certificate for the matching hostname.
Traefik must have working DNS before this process can succeed.
Certificate Storage
Certificate state is stored in:
/opt/traefik/data/acme.json
The file must:
- Remain persistent across container recreation.
- Have restrictive permissions.
- Be included in backups.
- Never be committed to a public repository.
- Never be pasted into BookStack.
- Never be deleted during routine troubleshooting.
Deleting acme.json can remove all stored certificates and account state.
That may trigger unnecessary reissuance and certificate-rate-limit risk.
Certificate Validation
Inspect a certificate served by Traefik using:
openssl s_client -connect 127.0.0.1:443 -servername projects.bytek.ca </dev/null 2>/dev/null | openssl x509 -noout -subject -issuer -dates -ext subjectAltName
Verify:
- The subject or Subject Alternative Name contains the requested hostname.
- The issuer is Let’s Encrypt.
- The certificate is currently valid.
- The expiration date is reasonable.
- Traefik is not serving the default certificate.
Repeat with the relevant hostname when validating another service.
Certificate Troubleshooting
Certificate Missing From the Dashboard
Check:
- The dynamic router exists.
- The hostname rule is correct.
- TLS is enabled.
- The certificate resolver is named correctly.
- Traefik DNS works.
- The WHC API credentials work.
- The ACME log contains the hostname.
- The DNS challenge was validated.
ACME DNS Failure
A previously observed error reported:
- Failure to contact the Let’s Encrypt API.
- DNS lookup through
127.0.0.11. - Docker DNS server misbehaving.
The correction was to configure the Traefik container to use Pi-hole explicitly and recreate the container.
Wrong Certificate Served
Possible causes include:
- Router not loaded.
- Hostname typo.
- Wrong certificate resolver.
- Duplicate router rule.
- Default certificate served.
- Client or browser cache.
- DNS points to the wrong server.
Application Onboarding
When adding a new public application:
- Confirm the application backend works directly.
- Reserve the VM or LXC IP in Pi-hole.
- Add the public WHC A record pointing to
38.29.213.101. - Add the Pi-hole local DNS record pointing to
192.168.2.182. - Create a dynamic Traefik configuration file.
- Add the hostname router.
- Add the private backend service.
- Enable TLS with the correct resolver.
- Validate YAML formatting.
- Confirm Traefik loaded the router.
- Confirm certificate issuance.
- Test from the Traefik VM.
- Test from the home LAN.
- Test from an external network.
- Add Uptime Kuma monitors.
- Update BookStack documentation.
Backend Validation
Before troubleshooting an application through Traefik, test the direct backend from the Traefik VM.
Examples:
Nextcloud
nc -zv -w 5 192.168.2.100 11000
Vikunja
curl -i http://192.168.2.121:3456/health
Authentik
curl -I http://192.168.2.162:9000/-/health/ready/
BookStack
Use the confirmed BookStack IP on TCP port 6875.
A direct backend failure must be resolved before changing the Traefik router.
Local Router Validation
Traefik can be tested locally without relying on public DNS.
Example for Vikunja:
curl -k --resolve projects.bytek.ca:443:127.0.0.1 https://projects.bytek.ca/health
This forces the requested hostname to the local Traefik listener.
A successful response confirms:
- The router loaded.
- TLS negotiation works.
- Traefik selected the expected service.
- The backend is reachable.
- The application responded.
Logging
Review the main Traefik log using:
sudo tail -n 100 /opt/traefik/logs/traefik.log
Filter common issues using:
sudo grep -iE 'error|acme|certificate|middleware|service|router|dns' /opt/traefik/logs/traefik.log | tail -n 100
Look for:
- YAML parsing errors.
- Unknown fields.
- Missing services.
- Missing middlewares.
- Incorrect certificate resolver.
- ACME validation failures.
- DNS resolution failures.
- Backend connection failures.
- Router conflicts.
If access logging is enabled, use it to distinguish:
- Requests reaching Traefik.
- Router selection.
- Backend status.
- HTTP response code.
- Client source.
- Authentication redirects.
Do not copy session cookies, bearer tokens, or authorization headers into BookStack.
YAML Validation
YAML indentation must use spaces, not tabs.
Check dynamic configuration files using:
sudo grep -RnP '\t' /opt/traefik/dynamic/
Expected result:
- No output.
Review a specific file using:
sudo cat /opt/traefik/dynamic/<filename>.yml
Common YAML problems include:
- Incorrect indentation.
- Tabs.
- Misspelled field names.
- Router placed under the wrong section.
- Service placed under the wrong section.
- Incorrect middleware name.
- Incorrect backend URL.
- Old IP address.
- Duplicate router name.
IP Address Changes
If an application IP changes:
- Confirm the new reservation in Pi-hole.
- Confirm the VM owns the new address.
- Update the Traefik backend.
- Search
/opt/traefikfor the old address. - Update Proxmox firewall rules.
- Update Authentik internal hosts if applicable.
- Update Uptime Kuma monitors.
- Test the direct backend.
- Test the local Traefik route.
- Test the public route.
- Update BookStack documentation.
A stale backend address causes gateway errors even when the application itself is healthy.
Firewall Requirements
The Traefik VM must accept:
- TCP 443 from the home LAN.
- TCP 443 from the WireGuard gateway.
- Administrative SSH from approved LAN sources.
- Monitoring traffic where required.
Application VM firewalls must permit Traefik to reach their backend ports.
Known requirements include:
| Destination | Source | Port |
|---|---|---|
| Nextcloud | 192.168.2.182 |
TCP 11000 |
| Vikunja | 192.168.2.182 |
TCP 3456 |
| Authentik | 192.168.2.182 |
TCP 9000 |
| BookStack | 192.168.2.182 |
TCP 6875 |
| Uptime Kuma direct route, if retained | 192.168.2.182 |
TCP 3001 |
Do not allow public clients to connect directly to these backend ports.
Monitoring
Recommended Uptime Kuma monitors include:
| Monitor | Target |
|---|---|
| Traefik VM | Ping 192.168.2.182 |
| Traefik HTTPS | TCP 443 |
| Authentik route | portal.bytek.ca readiness endpoint |
| Nextcloud route | Nextcloud status endpoint |
| Vikunja route | Vikunja health endpoint |
| BookStack route | BookStack login endpoint |
| Certificate expiry | Each important public hostname |
| Public VPS to Traefik path | External application monitor |
Monitoring should distinguish between:
Power-Failure Recovery
After a power interruption:
- Confirm Pi-hole is running.
- Confirm the WireGuard gateway is running.
- Confirm Authentik is ready.
- Confirm the Traefik VM owns
192.168.2.182. - Confirm Docker is active.
- Confirm the Traefik container is running.
- Confirm the container uses Pi-hole DNS.
- Review Traefik logs for DNS errors.
- Confirm routers loaded.
- Confirm certificates are present.
- Test Authentik locally.
- Test an application locally.
- Test a public application externally.
- Restart or recreate Traefik only if required.
If Traefik started before Pi-hole and DNS remains broken, recreate the Traefik container after Pi-hole is healthy.
Backup
The Traefik VM is included in the Proxmox scheduled backup job.
Protect the following paths:
/opt/traefik/compose.yml/opt/traefik/traefik.yml/opt/traefik/.env/opt/traefik/dynamic//opt/traefik/data/acme.json- Relevant logs.
- Any authentication files.
- Any custom certificate files.
- Any dashboard Basic Auth configuration.
Secrets must remain in a password manager or encrypted backup.
BookStack should document the secret location, not the secret itself.
Recovery Procedure
If Traefik configuration is broken:
- SSH into the Traefik VM.
- Confirm Docker is active.
- Confirm the Traefik container state.
- Review the most recent log entries.
- Identify the most recently changed dynamic file.
- Restore the known-good backup copy.
- Confirm the file provider reloads the configuration.
- Test the affected router locally.
- Restart Traefik only if the static configuration changed or reload failed.
- Confirm certificates remain present.
- Test from the LAN.
- Test externally.
If the VM must be restored:
- Restore the most recent Proxmox backup under a temporary VM ID.
- Disconnect the restored VM network adapter.
- Verify
/opt/traefik. - Verify
acme.json. - Verify environment and dynamic configuration.
- Shut down the failed production VM.
- Assign the expected network identity.
- Start the restored VM.
- Confirm
192.168.2.182. - Confirm Docker and Traefik.
- Test all routers.
- Reconnect public traffic only after validation.
Security Checklist
- Traefik TCP 443 is the only intended public application entry point.
- Private backend ports are not publicly exposed.
- The Traefik dashboard requires
bytek-admin. - The dashboard callback path bypasses ForwardAuth.
- Authentik is not protected by its own ForwardAuth.
- Nextcloud uses native OIDC.
- Vikunja uses native OIDC.
- BookStack uses native OIDC.
- Certificate API credentials are protected.
acme.jsonhas restrictive permissions.- Container DNS points to Pi-hole.
- The Docker socket is mounted read-only where supported.
- The Docker API is not publicly exposed.
- SSH uses keys.
- Dynamic configuration is backed up.
- Basic Auth recovery credentials are stored securely.
- Proxmox backup includes the Traefik VM.
Validation Checklist
- Traefik VM owns
192.168.2.182. - Docker is active.
- Traefik container is running.
- TCP 443 is listening.
- Pi-hole DNS works inside the container.
- Dynamic YAML contains no tabs.
- Authentik router works.
- Nextcloud router works.
- Vikunja router works.
- BookStack router works.
- Uptime Kuma router works.
- Dashboard authentication works.
- Outpost ping returns HTTP 204.
- Certificates match every public hostname.
- Certificate renewal works.
- Public ingress works through the VPS and WireGuard.
- Internal split-DNS access works directly.
acme.jsonis included in backup.- A known-good dynamic configuration backup exists.
Document Control
- Owner: Bryan Gagne-Plante
- Private address:
192.168.2.182 - Public dashboard:
proxy.bytek.ca - Primary entry point: TCP 443
- Deployment directory:
/opt/traefik - Certificate authority: Let’s Encrypt
- ACME challenge: DNS-01 through WHC cPanel API
- Container DNS:
192.168.2.65 - Dashboard authentication: Authentik ForwardAuth
- Secondary authentication: Basic Auth while retained
- Proxmox VM ID: Confirm current VM ID
- Last verified: YYYY-MM-DD
- Last certificate-renewal test: YYYY-MM-DD
- Last ForwardAuth test: YYYY-MM-DD
- Last restore test: YYYY-MM-DD
- Known limitation: Public applications depend on one Traefik VM and one certificate store
Authentik
Purpose
Authentik provides centralized identity and access management for the Bytek homelab.
Authentik allows users to access multiple applications with one account while applying consistent authentication, multi-factor authentication, group membership, and access policies.
Authentik provides:
- Central user accounts.
- Multi-factor authentication.
- OpenID Connect.
- OAuth2 providers.
- Proxy Providers.
- ForwardAuth.
- Group-based application access.
- Email-domain policies.
- Application entitlements.
- An embedded proxy outpost.
- Central application launch links.
- Administrative auditing and event records.
Service Information
| Setting | Value |
|---|---|
| Service name | Authentik |
| Private IP address | 192.168.2.162 |
| Backend port | TCP 9000 |
| Public hostname | portal.bytek.ca |
| Public access | Traefik |
| Deployment directory | /opt/authentik |
| Database | PostgreSQL |
| Supporting service | Redis |
| Proxy component | Embedded outpost |
| Normal user group | bytek-users |
| Administrator group | bytek-admin |
| Backup coverage | Proxmox scheduled backup |
| Proxmox VM ID | Confirm current VM ID |
Authentik portal:
Architecture Role
Authentik is the trusted identity provider for the Bytek environment.
Applications rely on Authentik to answer these questions:
- Who is the user?
- Has the user completed authentication?
- Has the user completed MFA?
- Is the user a member of the required group?
- Does the user satisfy the application policy?
- Should the user be allowed to continue to the application?
Authentik does not normally replace application-specific permissions.
For example:
- Authentik authenticates a Proxmox user, but Proxmox controls the user’s ACL.
- Authentik authenticates a BookStack user, but BookStack controls the user’s roles.
- Authentik authenticates a Nextcloud user, but Nextcloud controls shares and application permissions.
- Authentik authenticates a Vikunja user, but Vikunja controls projects and task permissions.
Request Flow
A normal OIDC login follows this process:
- The user opens an application.
- The application redirects the browser to
portal.bytek.ca. - Traefik forwards the request to Authentik at
192.168.2.162:9000. - Authentik identifies the requested application.
- Authentik requests credentials if no valid session exists.
- Authentik requests MFA according to the authentication flow.
- Authentik evaluates the application’s group and policy bindings.
- Authentik issues a signed authorization response.
- Authentik redirects the browser to the application callback.
- The application validates the response and creates or matches the local account.
- The application applies its own permissions.
Core Components
Authentik Server
The Authentik server provides:
- The web interface.
- Login and authorization flows.
- OAuth2 and OIDC endpoints.
- Provider endpoints.
- Administrative interfaces.
- API services.
- User-facing application portal.
Authentik Worker
The worker performs background tasks such as:
- Scheduled processing.
- Event handling.
- Email-related tasks.
- Outpost-related processing.
- Provider maintenance.
- Background synchronization.
PostgreSQL
PostgreSQL stores Authentik configuration and identity data.
PostgreSQL contains critical information including:
- Users.
- Groups.
- Policies.
- Applications.
- Providers.
- Flows.
- Stages.
- Events.
- Outpost configuration.
- Authentication settings.
PostgreSQL is the most important Authentik data component to protect.
Redis
Redis supports Authentik’s runtime and task-processing requirements.
Redis is required for normal stack operation but PostgreSQL remains the authoritative persistent data source.
Embedded Outpost
The embedded outpost provides:
- ForwardAuth.
- Proxy Provider routing.
- Authentication callbacks.
- Identity-header forwarding.
- Access enforcement for applications without native OIDC.
Application Portal
The Authentik user portal displays applications available to the signed-in user.
The portal should show only applications that the user is allowed to access.
Normal users may see:
- Nextcloud.
- Vikunja.
- BookStack.
Administrators may additionally see:
- Proxmox VE.
- Traefik dashboard.
- Uptime Kuma.
Application visibility is controlled by:
- Group bindings.
- Policy bindings.
- Policy engine mode.
- Application launch URL.
- User authentication state.
Group Model
bytek-users
The bytek-users group grants access to normal user-facing applications.
Applications using this group include:
- Nextcloud.
- Vikunja.
- BookStack.
Users should be added to bytek-users only when access to normal Bytek applications is required.
bytek-admin
The bytek-admin group grants access to administrative applications.
Applications using this group include:
- Proxmox VE.
- Traefik dashboard.
- Uptime Kuma dashboard.
Membership in bytek-admin must be limited to trusted infrastructure administrators.
Administrator Membership
An administrator may belong to both groups:
bytek-usersbytek-admin
This allows access to both normal applications and administrative interfaces.
Shared Email-Domain Policy
Applications also use the policy:
Allow bytek.ca users
The policy validates the user according to the configured Bytek email-domain rules.
The application policy engine is normally set to ALL.
For a normal application, access requires:
- Membership in
bytek-users. - Successful evaluation of
Allow bytek.ca users.
For an administrative application, access requires:
- Membership in
bytek-admin. - Successful evaluation of
Allow bytek.ca users.
Policy Engine Mode
Authentik applications normally use policy engine mode ALL.
With ALL, every enabled binding must pass.
A normal application should therefore have:
| Binding Type | Binding |
|---|---|
| Group | bytek-users |
| Policy | Allow bytek.ca users |
An administrative application should have:
| Binding Type | Binding |
|---|---|
| Group | bytek-admin |
| Policy | Allow bytek.ca users |
Do not attach both bytek-users and bytek-admin to the same application using ALL unless every permitted user must belong to both groups.
An earlier access-denied event occurred because both groups were attached to the same application with ALL.
Application Integration Matrix
| Application | Integration Type | Required Group |
|---|---|---|
| Nextcloud | Native OIDC | bytek-users |
| Vikunja | Native OIDC | bytek-users |
| BookStack | Native OIDC | bytek-users |
| Proxmox VE | Native OIDC | bytek-admin |
| Traefik dashboard | Single-application ForwardAuth | bytek-admin |
| Uptime Kuma | Proxy Provider | bytek-admin |
Native OIDC Applications
Nextcloud
| Setting | Value |
|---|---|
| Application slug | nextcloud |
| Integration | OpenID Connect user backend |
| Callback | https://cloud.bytek.ca/apps/user_oidc/code |
| Subject mode | User UUID |
| Scopes | openid profile email |
| Required group | bytek-users |
Nextcloud uses native OIDC so desktop clients, mobile clients, WebDAV, CalDAV, and CardDAV can communicate directly with Nextcloud.
Do not add ForwardAuth to the Nextcloud Traefik router.
Vikunja
| Setting | Value |
|---|---|
| Application slug | vikunja |
| Integration | Native OIDC |
| Callback | https://projects.bytek.ca/auth/openid/authentik |
| Subject mode | User UUID |
| Scopes | openid profile email |
| Required group | bytek-users |
Vikunja creates or matches users after a successful Authentik login.
BookStack
| Setting | Value |
|---|---|
| Application slug | bookstack |
| Integration | Native OIDC |
| Callback | https://docs.bytek.ca/oidc/callback |
| Subject mode | User UUID |
| Required group | bytek-users |
| Signing | RSA signing key |
| Token encryption | Disabled |
BookStack does not automatically link users solely by matching email addresses.
BookStack links an OIDC identity using the token’s sub claim.
The local BookStack administrator must use a different email address from the normal Authentik account unless the account is deliberately linked using the correct external authentication ID.
Proxmox VE
| Setting | Value |
|---|---|
| Application slug | proxmox |
| Integration | Native OIDC |
| Callback | https://pve.bytek.ca:8006 |
| Subject mode | User UUID |
| Required group | bytek-admin |
| Selected scopes | openid, email, and profile |
Proxmox authentication and authorization are separate.
Authentik allows the user to authenticate, but Proxmox requires a separate ACL before the user can see or manage VMs.
OIDC Provider Standard
New OIDC providers should normally use:
| Provider Setting | Standard Value |
|---|---|
| Client type | Confidential |
| Subject mode | Based on the user’s UUID |
| Authorization flow | Default implicit-consent provider flow |
| Signing key | Selected |
| Encryption key | None |
| Redirect type | Strict Authorization |
| Policy engine | ALL |
A signing key is required so applications can validate tokens.
An encryption key should remain empty unless the target application explicitly supports encrypted OIDC tokens.
BookStack login failed when an encryption key was selected.
Clearing the encryption key while retaining the RSA signing key resolved the token-validation failure.
OIDC Scope Mappings
Providers must include the scopes required by the application.
Common scopes include:
openidemailprofile
The mapping names may appear as Authentik default OAuth scope mappings.
Missing scope mappings can allow the initial browser authorization to complete while causing the application to fail later when requesting profile or userinfo data.
Proxmox Scope Issue
Proxmox initially returned an authentication failure because the Authentik provider did not have the expected scopes selected.
The detailed Proxmox log reported a failure while contacting the userinfo endpoint.
Selecting the required mappings resolved the issue.
Scope Review Procedure
When an OIDC application fails:
- Open the Authentik provider.
- Review selected scope mappings.
- Confirm
openid. - Confirm
email. - Confirm
profile. - Review any application-specific mappings.
- Save the provider.
- Retry in a completely new private browser session.
- Review the application log.
Redirect URI Requirements
Redirect URIs must match the application exactly.
A mismatch can cause:
- Invalid redirect errors.
- Authorization rejection.
- Login loops.
- Callback failures.
- Token validation failures.
Known Redirect URIs
| Application | Strict Authorization URI |
|---|---|
| Nextcloud | https://cloud.bytek.ca/apps/user_oidc/code |
| Vikunja | https://projects.bytek.ca/auth/openid/authentik |
| BookStack | https://docs.bytek.ca/oidc/callback |
| Proxmox VE | https://pve.bytek.ca:8006 |
Do not add unneeded wildcard redirect URIs.
Strict redirect matching is preferred.
Post-Logout Redirects
Where supported, providers should include approved post-logout destinations.
BookStack uses destinations such as:
- BookStack home.
- BookStack login page.
- BookStack login page with automatic OIDC initiation prevented.
Post-logout redirects must use the actual production hostname.
Do not use obsolete provisional hostnames such as wiki.bytek.ca.
ForwardAuth Applications
Traefik Dashboard
The Traefik dashboard uses a Proxy Provider configured for single-application ForwardAuth.
| Setting | Value |
|---|---|
| Application slug | traefik-dashboard |
| External host | https://proxy.bytek.ca |
| Required group | bytek-admin |
| Shared policy | Allow bytek.ca users |
| Outpost | Embedded outpost |
The Traefik middleware sends authentication checks to Authentik.
The callback path under /outpost.goauthentik.io/ must remain reachable without applying the same ForwardAuth middleware.
The outpost ping endpoint should return HTTP 204.
Uptime Kuma
Uptime Kuma uses an Authentik Proxy Provider.
| Setting | Value |
|---|---|
| Application slug | uptime-kuma |
| External host | https://status.bytek.ca |
| Internal host | http://192.168.2.115:3001 |
| Required group | bytek-admin |
| Shared policy | Allow bytek.ca users |
| Outpost | Embedded outpost |
Public status-page, badge, push, and asset paths may require selected unauthenticated-path exceptions.
Do not disable Uptime Kuma’s local authentication until the Authentik proxy path has been tested successfully.
Embedded Outpost
The embedded outpost handles Authentik proxy integrations.
Applications assigned to the embedded outpost include:
- Traefik dashboard.
- Uptime Kuma.
The outpost must be able to reach each protected application backend.
For Uptime Kuma, Authentik at 192.168.2.162 must be permitted to reach 192.168.2.115 on TCP port 3001.
The outpost callback path must remain accessible through Traefik.
Outpost Health
The outpost health endpoint should return HTTP 204.
For the Traefik dashboard, test:
curl -k -I https://proxy.bytek.ca/outpost.goauthentik.io/ping
Expected result:
- HTTP 204.
A 204 response contains no page body and is expected.
If the endpoint redirects to login or loops repeatedly, review:
- Callback router priority.
- Middleware assignment.
- Outpost application assignment.
- External host.
- Traefik service destination.
- Host header forwarding.
Reverse-Proxy Requirements
Traefik must preserve the original request information for Authentik.
Important forwarded values include:
- Original host.
- Original HTTPS scheme.
- Client forwarding information.
- Forwarded protocol.
- WebSocket compatibility.
Incorrect forwarded headers can cause:
An Authentik CSRF error previously reported that the CSRF cookie was not set.
When diagnosing a CSRF error, review:
DNS Requirements
Authentik must be reachable from:
- User browsers.
- Traefik.
- Nextcloud containers.
- Vikunja.
- BookStack.
- Proxmox.
- Uptime Kuma where required.
- The Authentik embedded outpost.
Internal Resolution
LAN clients using Pi-hole resolve:
portal.bytek.cato192.168.2.182.
Proxmox Resolution
Proxmox uses Quad9 and normally resolves:
portal.bytek.cato38.29.213.101.
This sends Proxmox’s server-to-server OIDC requests through:
- VPS.
- WireGuard.
- Traefik.
- Authentik.
Container Resolution
Application containers that require private split DNS should use Pi-hole at 192.168.2.65.
If an OIDC discovery endpoint becomes unreachable after a power failure, verify DNS from inside the application container before changing provider credentials.
Health Endpoints
Direct Readiness
Direct backend:
http://192.168.2.162:9000/-/health/ready/
Expected result:
- HTTP 200.
Routed Readiness
Public hostname:
Expected result:
- HTTP 200.
Embedded Outpost
The outpost ping endpoint should return:
- HTTP 204.
Container Management
Move to the Authentik deployment directory:
cd /opt/authentik
Check container state:
sudo docker compose ps
List Compose service names:
sudo docker compose config --services
View recent logs:
sudo docker compose logs --tail 100
View server logs:
sudo docker compose logs --tail 100 server
View worker logs:
sudo docker compose logs --tail 100 worker
The exact service names should be confirmed using the Compose service listing before running service-specific commands.
Expected Container State
The Authentik stack should have healthy or running equivalents of:
- Authentik server.
- Authentik worker.
- PostgreSQL.
- Redis.
The server should not be considered ready until PostgreSQL and Redis are available.
A running Docker container does not necessarily mean the application is ready.
Use the readiness endpoint for application-level validation.
User Administration
When creating a user:
- Create or confirm the user’s email address.
- Add the user to the required groups.
- Confirm MFA enrollment.
- Confirm the user appears in the application portal.
- Test one user-facing application.
- Test application logout.
- Confirm no duplicate account is created.
- Review application-specific permissions.
Do not add normal users to bytek-admin.
Administrator Administration
An Authentik administrator should:
- Belong to
bytek-admin. - Belong to
bytek-usersif normal applications are required. - Have MFA enabled.
- Use a unique password.
- Have recovery methods stored securely.
- Avoid using the local break-glass accounts for daily work.
Administrative group membership should be reviewed periodically.
MFA
Authentik provides MFA for applications using OIDC or proxy authentication.
MFA should be required for:
- Proxmox.
- Traefik dashboard.
- Uptime Kuma.
- Nextcloud.
- Vikunja.
- BookStack.
- Authentik administration.
Preserve recovery codes or backup authentication devices.
Do not rely on one physical authenticator without a documented recovery method.
Local Application Recovery Accounts
Authentik must not be the only recovery path.
Proxmox
Use:
root@pam
Nextcloud
Use:
- Local Nextcloud administrator.
- Direct local login path.
BookStack
Switch:
AUTH_METHODfromoidctostandard.
Then sign in using the dedicated local administrator.
Uptime Kuma
Restore direct private access and re-enable local authentication.
Traefik
Restore a known-good dashboard file or use retained Basic Auth.
Common Failure Scenarios
Application Shows Permission Denied
Possible causes:
- User is not in the required group.
- An extra group binding is attached.
- Policy engine is
ALL. - One binding returns false.
- Email-domain policy fails.
- Application is not assigned to the user.
Review the Authentik denial explanation.
A binding shown as None in the explanation may correspond to a direct group-membership check.
Discovery Endpoint Is Unreachable
Possible causes:
- Application container DNS failure.
- Pi-hole unavailable.
- Traefik unavailable.
- Authentik unavailable.
- Certificate issue.
- Local-address protection inside the application.
- Wrong application slug.
Test discovery from the application host and container.
CSRF Cookie Not Set
Possible causes:
- Stale browser session.
- Browser cookie blocking.
- Wrong Origin header.
- Wrong Host header.
- Incorrect reverse-proxy forwarding.
- Proxy or VPN interference.
Test using a new private browser window.
Token Payload Cannot Be Parsed
Possible cause:
- Authentik provider encryption key is selected.
Correction:
- Keep the signing key.
- Clear the encryption key.
- Start a fresh authorization flow.
User’s Email Is Already Taken
The application may not automatically link an OIDC account to a local account based only on email.
For BookStack:
- Use a separate local break-glass administrator email.
- Allow Authentik to create the normal OIDC account.
- Assign BookStack roles separately.
Authentication Works but Application Is Empty
Authentication succeeded, but application authorization is missing.
For Proxmox:
- Assign an ACL at
/. - Select the required role.
- Enable propagation.
OIDC Troubleshooting Order
When an OIDC application fails:
- Keep the local administrator session open.
- Confirm Authentik readiness.
- Confirm Traefik routing.
- Confirm the application provider.
- Confirm the application slug.
- Confirm client ID and client secret.
- Confirm redirect URI.
- Confirm selected scope mappings.
- Confirm signing key.
- Confirm encryption key is empty.
- Confirm user group membership.
- Confirm policy results.
- Test the discovery endpoint.
- Test DNS from the application container.
- Review the application log.
- Review Authentik events.
- Retry from a completely new private browser session.
Do not recreate the provider until the detailed failure is understood.
Monitoring
Recommended Uptime Kuma monitors include:
| Monitor | Target |
|---|---|
| Authentik VM | Ping 192.168.2.162 |
| Direct readiness | http://192.168.2.162:9000/-/health/ready/ |
| Routed readiness | https://portal.bytek.ca/-/health/ready/ |
| Authentik certificate | portal.bytek.ca |
| PostgreSQL availability | Internal service-level check |
| Embedded outpost | Outpost ping endpoint |
Monitoring should distinguish between:
Uptime Kuma
Purpose
Uptime Kuma provides availability monitoring for the Bytek homelab.
Uptime Kuma monitors services at multiple layers so an outage can be isolated quickly.
Monitoring can determine whether a failure is caused by:
- A stopped VM or LXC.
- A network problem.
- A Proxmox firewall rule.
- A stopped Docker container.
- An unhealthy application.
- A database problem.
- Pi-hole DNS.
- Traefik routing.
- An expired or invalid certificate.
- Authentik proxy authentication.
- The WireGuard tunnel.
- The public VPS.
Service Information
| Setting | Value |
|---|---|
| Service name | Uptime Kuma |
| Private IP address | 192.168.2.115 |
| Backend port | TCP 3001 |
| Public hostname | status.bytek.ca |
| Deployment directory | /opt/uptime-kuma |
| Container name | uptime-kuma |
| Persistent data | /app/data inside the container |
| Database | Embedded MariaDB |
| Container DNS | 192.168.2.65 |
| Public routing | Traefik |
| Target authentication | Authentik Proxy Provider |
| Required Authentik group | bytek-admin |
| Backup coverage | Proxmox scheduled backup |
| Proxmox VM ID | Confirm current VM ID |
Dashboard:
Architecture Role
Uptime Kuma monitors both private backends and routed application hostnames.
A routed monitor follows this path:
- Uptime Kuma resolves the application hostname through Pi-hole.
- Pi-hole returns Traefik’s private IP address,
192.168.2.182. - Uptime Kuma connects to Traefik.
- Traefik selects the application router.
- Traefik forwards the request to the private backend.
- Uptime Kuma records the response status and latency.
A direct backend monitor bypasses Traefik and connects directly to the application VM.
Using both monitor types helps distinguish infrastructure failures from reverse-proxy failures.
Monitoring Layers
Each important service should have up to three monitoring layers.
VM or LXC Monitor
A ping monitor verifies that the guest is reachable on the network.
A successful ping proves:
- The guest is running.
- The virtual network interface is active.
- The network path permits ICMP.
A successful ping does not prove that the application is healthy.
Direct Backend Monitor
A direct backend monitor connects to the private application address and port.
A successful backend monitor proves:
- The guest is reachable.
- The application port is open.
- The application or web service responds.
A direct backend monitor bypasses:
- Pi-hole hostname resolution.
- Traefik routing.
- Public certificates.
- The VPS.
- WireGuard public ingress.
Routed Application Monitor
A routed monitor uses the normal HTTPS application hostname.
A successful routed monitor proves:
- Pi-hole resolves the hostname.
- Traefik is reachable.
- The router is loaded.
- The certificate is valid.
- The backend is reachable.
- The application responds.
Failure Interpretation
| VM Monitor | Backend Monitor | Routed Monitor | Likely Failure |
|---|---|---|---|
| Down | Down | Down | VM, LXC, Proxmox, or network failure |
| Up | Down | Down | Docker, application, database, or backend firewall failure |
| Up | Up | Down | Pi-hole, Traefik, TLS, router, or Authentik failure |
| Up | Up | Up | Service is operating normally |
| Up | Down | Up | Monitor target or direct-backend firewall configuration may be incorrect |
| Down | Up | Up | ICMP is blocked, but the application is available |
A failed ping monitor does not always mean the VM is down. The guest or Proxmox firewall may block ICMP while allowing application traffic.
Docker Deployment
The Uptime Kuma deployment is managed using Docker Compose.
Deployment directory:
/opt/uptime-kuma
Before running Compose commands, move into the deployment directory using:
cd /opt/uptime-kuma
Check container state using:
sudo docker compose ps
View recent logs using:
sudo docker compose logs --tail 100 uptime-kuma
Follow logs live using:
sudo docker compose logs -f uptime-kuma
Validate the Compose configuration using:
sudo docker compose config --quiet
Apply normal configuration changes using:
sudo docker compose up -d
Recreate the container after changing Docker-level settings such as DNS, volumes, environment variables, or networking using:
sudo docker compose up -d --force-recreate uptime-kuma
Persistent Data
Uptime Kuma stores its application data under /app/data inside the container.
The persistent host mapping should be confirmed from the current Compose file.
The persistent data includes information such as:
- Monitors.
- Monitor history.
- Notifications.
- Status pages.
- Maintenance windows.
- Application settings.
- User configuration.
- Embedded database files.
- Uploaded status-page assets.
The persistent-data directory must remain mounted across container recreation.
Never remove the persistent volume while troubleshooting a container-startup problem.
Database
The current Uptime Kuma deployment uses embedded MariaDB.
Database health is reported by the container health check.
The container should not be considered fully healthy until the database is available.
Check container health using:
sudo docker inspect --format='{{.State.Health.Status}}' uptime-kuma
Expected result:
healthy
If the result is starting, allow the health check to continue while reviewing logs.
If the result is unhealthy, inspect the Uptime Kuma logs before restarting or recreating the container.
Docker DNS
The Uptime Kuma container explicitly uses Pi-hole at 192.168.2.65.
This allows Uptime Kuma to resolve internal split-DNS records.
Verify container DNS using:
sudo docker inspect --format='DNS={{json .HostConfig.Dns}}' uptime-kuma
Expected result:
192.168.2.65appears in the DNS list.
Test an internal hostname from inside the container using:
sudo docker exec uptime-kuma getent hosts portal.bytek.ca
Expected result:
portal.bytek.caresolves to192.168.2.182.
Test another internal hostname using:
sudo docker exec uptime-kuma getent hosts projects.bytek.ca
Expected result:
projects.bytek.caresolves to192.168.2.182.
DNS Failure After a Power Interruption
Docker DNS previously failed after an electrical outage.
Symptoms included:
- Monitors failing after services had restarted.
- Internal hostnames not resolving inside containers.
- Application hosts resolving correctly while container resolution failed.
- OIDC or certificate operations reporting unreachable endpoints.
Recommended recovery sequence:
- Confirm Pi-hole is running.
- Confirm Pi-hole owns
192.168.2.65. - Confirm the Uptime Kuma VM resolves internal hostnames.
- Confirm the Uptime Kuma container resolves internal hostnames.
- Verify the container’s explicit DNS configuration.
- Restart the Uptime Kuma container.
- Recreate the container if Docker-level DNS configuration changed.
- Confirm the monitors recover.
Do not rebuild Uptime Kuma or delete persistent data because of a DNS-only failure.
Public Dashboard Routing
The Uptime Kuma dashboard is available at:
Internal clients resolve status.bytek.ca to Traefik at 192.168.2.182.
External clients resolve status.bytek.ca to the public VPS at 38.29.213.101.
The public path includes:
- WHC public DNS.
- Public VPS.
- WireGuard.
- Home WireGuard gateway.
- Traefik.
- Authentik embedded outpost when enabled.
- Uptime Kuma at
192.168.2.115:3001.
Authentication Design
Uptime Kuma does not use the same native OIDC design as Nextcloud, Vikunja, BookStack, and Proxmox.
The target design uses an Authentik Proxy Provider.
The expected authentication flow is:
- The administrator opens
status.bytek.ca. - Traefik forwards the request to the Authentik embedded outpost.
- Authentik checks the existing authentication session.
- Authentik requests credentials and MFA if required.
- Authentik evaluates the application bindings.
- Authentik proxies the request to Uptime Kuma.
- Uptime Kuma displays the dashboard.
Authentik Application
| Setting | Value |
|---|---|
| Application name | Uptime Kuma |
| Application slug | uptime-kuma |
| Provider type | Proxy Provider |
| Provider mode | Proxy |
| External host | https://status.bytek.ca |
| Internal host | http://192.168.2.115:3001 |
| Required group | bytek-admin |
| Required policy | Allow bytek.ca users |
| Policy engine | ALL |
| Outpost | Authentik Embedded Outpost |
Only users who satisfy both the group and policy requirements should reach the dashboard.
Embedded Outpost Connectivity
The embedded outpost runs through the Authentik service at 192.168.2.162.
Authentik must be able to reach Uptime Kuma at:
192.168.2.115- TCP port 3001
The Uptime Kuma VM firewall must allow:
- Source
192.168.2.162 - Destination TCP port 3001
Test from the Authentik VM using:
curl -I http://192.168.2.115:3001/
A healthy Uptime Kuma response may redirect to /dashboard.
Authentication Migration Safety
Do not disable Uptime Kuma’s local authentication before the Authentik proxy works.
Use this migration order:
- Create the Authentik application and Proxy Provider.
- Assign the application to the embedded outpost.
- Allow Authentik to reach TCP port 3001.
- Route
status.bytek.cathrough the outpost. - Test Authentik authentication.
- Confirm the Uptime Kuma local login still appears behind Authentik.
- Test with the
bytek-adminaccount. - Test denial with a non-administrator account.
- Confirm public status pages still work if required.
- Disable Uptime Kuma local authentication.
- Enable Trust Proxy.
- Restrict direct TCP 3001 access.
- Test recovery.
During the intermediate state, both Authentik and Uptime Kuma authentication may appear.
That is intentional until the Authentik path is validated.
Disabling Local Authentication
Only disable local Uptime Kuma authentication after Authentik is proven reliable.
Before disabling local authentication:
- Record the Uptime Kuma administrator password.
- Confirm Proxmox backup coverage.
- Create a Proxmox snapshot if desired.
- Confirm direct private access.
- Confirm Authentik access.
- Confirm a non-admin user is denied.
- Confirm public status pages.
- Document the recovery process.
After disabling local authentication:
- Enable Trust Proxy.
- Restrict direct TCP 3001 access to the Authentik VM.
- Remove unnecessary direct Traefik-to-Kuma access if Traefik now routes to the outpost.
- Retain the original administrator password for recovery.
Direct Backend Security
When Uptime Kuma local authentication is disabled, direct access to 192.168.2.115:3001 must be restricted.
Otherwise, a LAN client could bypass Authentik and reach an unauthenticated dashboard.
The final firewall should permit TCP port 3001 only from approved sources such as:
| Source | Purpose |
|---|---|
192.168.2.162 |
Authentik embedded outpost |
| Administrative workstation during testing | Temporary recovery access |
| Approved monitoring source | Only if required |
Remove temporary direct access after validation.
Public Status Pages
Some Uptime Kuma status pages may be intended for unauthenticated public viewing.
Authentik Proxy Provider exclusions may be required for:
- Published status pages.
- Status-page API requests.
- Static assets.
- Uploaded status-page files.
- Badge endpoints.
- Push-monitor endpoints.
- Public icons.
Unauthenticated-path exclusions must be as narrow as practical.
Do not exclude the entire Uptime Kuma API.
After configuring exclusions:
- Open a public status page in a private browser.
- Confirm no Authentik login is required.
- Open the dashboard.
- Confirm Authentik login is required.
- Test a push monitor.
- Test a status badge if used.
- Review Authentik and Traefik logs.
Push Monitors
Push monitors rely on a unique URL that an external process calls to report success.
If Uptime Kuma sits behind Authentik, the push path must remain reachable without an interactive login.
Protect push-monitor URLs as secrets.
Do not publish push URLs in BookStack.
If a push monitor stops updating after enabling Authentik:
- Confirm the push path is excluded.
- Confirm Traefik routes the request correctly.
- Confirm the unique token is unchanged.
- Review the Uptime Kuma monitor history.
- Review Traefik access logs.
- Review Authentik outpost logs.
Monitor Naming Standard
Use consistent names so the dashboard is easy to scan.
Recommended patterns include:
Service VMService Backend DirectService Through TraefikService ExternalService CertificateService DNS
Examples:
Nextcloud VMNextcloud AIO ApacheNextcloud Through TraefikVikunja VMVikunja Backend DirectVikunja Through TraefikBookStack VMBookStack Backend DirectBookStack Through Traefik
Core Infrastructure Monitors
Recommended core monitors include:
| Monitor | Suggested Type | Target |
|---|---|---|
| Proxmox VE | HTTPS or TCP | 192.168.2.254:8006 |
| Pi-hole VM or LXC | Ping | 192.168.2.65 |
| Pi-hole DNS TCP | TCP | 192.168.2.65:53 |
| Pi-hole DNS UDP | UDP or DNS | 192.168.2.65:53 |
| WireGuard gateway | Ping | 192.168.2.64 |
| Public VPS | Ping or TCP | 38.29.213.101 |
| Public VPS HTTPS | TCP | 38.29.213.101:443 |
| Traefik VM | Ping | 192.168.2.182 |
| Traefik HTTPS | TCP | 192.168.2.182:443 |
| Authentik direct | HTTP | Direct readiness endpoint |
| Authentik routed | HTTPS | Routed readiness endpoint |
Nextcloud Monitors
| Monitor | Type | Target |
|---|---|---|
| Nextcloud VM | Ping | 192.168.2.100 |
| Nextcloud AIO Apache | TCP | 192.168.2.100:11000 |
| Nextcloud Through Traefik | HTTPS | https://cloud.bytek.ca/status.php |
Expected routed status:
- HTTP 200.
Vikunja Monitors
| Monitor | Type | Target |
|---|---|---|
| Vikunja VM | Ping | 192.168.2.121 |
| Vikunja Backend Direct | HTTP | http://192.168.2.121:3456/health |
| Vikunja Through Traefik | HTTPS | https://projects.bytek.ca/health |
Expected health status:
- HTTP 200.
The Vikunja VM firewall must allow Uptime Kuma at 192.168.2.115 to reach TCP port 3456.
BookStack Monitors
| Monitor | Type | Target |
|---|---|---|
| BookStack VM | Ping | Confirm BookStack IP |
| BookStack Backend Direct | HTTP | BookStack IP on port 6875 |
| BookStack Through Traefik | HTTPS | https://docs.bytek.ca/login |
Use accepted status codes from 200 through 399 if the application redirects to authentication.
The BookStack VM firewall must allow Uptime Kuma at 192.168.2.115 to reach TCP port 6875.
Authentik Monitors
| Monitor | Type | Target |
|---|---|---|
| Authentik VM | Ping | 192.168.2.162 |
| Authentik Direct Readiness | HTTP | http://192.168.2.162:9000/-/health/ready/ |
| Authentik Routed Readiness | HTTPS | https://portal.bytek.ca/-/health/ready/ |
| Authentik Certificate | Certificate | portal.bytek.ca |
| Authentik Outpost | HTTP | Outpost ping endpoint |
Expected results:
- Direct readiness returns HTTP 200.
- Routed readiness returns HTTP 200.
- Outpost ping returns HTTP 204.
Traefik Monitors
| Monitor | Type | Target |
|---|---|---|
| Traefik VM | Ping | 192.168.2.182 |
| Traefik HTTPS | TCP | 192.168.2.182:443 |
| Traefik Dashboard | HTTPS | https://proxy.bytek.ca/ |
| Traefik Certificate | Certificate | proxy.bytek.ca |
The dashboard monitor must account for Authentik and Basic Auth redirects if those protections are enabled.
Do not store Basic Auth credentials in BookStack.
Proxmox Monitor Considerations
Proxmox may return a response that is valid but not HTTP 200 for some request methods.
Avoid relying on an unsupported HTTP HEAD request.
A TCP monitor on port 8006 can verify listener availability.
An HTTPS monitor can verify the login page if configured with an appropriate method and accepted status range.
Proxmox remains private and should be monitored using its private address.
Certificate Monitoring
Important public hostnames should have certificate-expiry monitoring.
Recommended hostnames include:
portal.bytek.cacloud.bytek.caprojects.bytek.cadocs.bytek.castatus.bytek.caproxy.bytek.ca
Certificate monitoring should alert before expiration.
A valid application response does not guarantee that certificate renewal automation remains healthy.
Notification Channels
Uptime Kuma can notify administrators when a monitor changes state.
The configured notification methods should be recorded after verification.
Potential channels may include:
- Email.
- Microsoft Teams webhook.
- Discord webhook.
- Matrix.
- Telegram.
- Other supported notification services.
Notification credentials must remain outside BookStack.
BookStack should document:
- Notification channel name.
- Intended recipients.
- Severity policy.
- Test date.
- Secret-storage location.
Notification Policy
Recommended notification behavior:
Critical Infrastructure
Immediate notification for:
- Proxmox.
- Pi-hole DNS.
- WireGuard.
- Traefik.
- Authentik.
- Public VPS.
Applications
Notify after enough failed checks to avoid alerts from brief application restarts.
Maintenance
Create maintenance windows before:
- Proxmox reboots.
- Application upgrades.
- Docker stack recreation.
- Firewall maintenance.
- Planned internet outages.
- Storage maintenance.
This prevents expected maintenance from generating unnecessary alerts.
Monitor Timing
Monitor intervals should balance timely detection with unnecessary load.
Suggested principles:
- Critical service checks may run more frequently.
- Application backends can use moderate intervals.
- Certificate checks need less frequent execution.
- Avoid aggressively monitoring database internals without a clear operational need.
- Use retries before marking services down.
- Configure heartbeat intervals based on expected update frequency.
These values should be tuned after observing false positives and actual recovery behavior.
Status Pages
Status pages provide a consolidated view of selected monitors.
A public status page should include only services appropriate for public disclosure.
Avoid publishing:
- Private IP addresses.
- Proxmox details.
- Pi-hole details.
- Authentik backend details.
- Internal database status.
- Hypervisor storage status.
- Internal firewall information.
A private administrative status page may include more detail behind Authentik.
Maintenance Windows
Use maintenance windows for planned outages.
Common maintenance events include:
- Proxmox host reboot.
- Electrical maintenance.
- Docker upgrades.
- Authentik upgrades.
- Nextcloud AIO upgrades.
- Traefik configuration changes.
- Storage work.
- Firewall work.
- Backup restoration testing.
Record:
- Reason for maintenance.
- Affected monitors.
- Date and time.
- Expected service impact.
- Actual result.
Firewall Requirements
Uptime Kuma requires outbound access to monitored services.
Application firewalls may require narrow inbound rules from:
192.168.2.115
Known direct-monitor requirements include:
| Destination | Port |
|---|---|
| Pi-hole | TCP and UDP 53 |
| Proxmox VE | TCP 8006 |
| Traefik | TCP 443 |
| Authentik | TCP 9000 |
| Nextcloud | TCP 11000 |
| Vikunja | TCP 3456 |
| BookStack | TCP 6875 |
ICMP must be allowed if ping monitors are used.
A failed ping monitor with a healthy HTTP monitor normally indicates blocked ICMP rather than a service outage.
Health Validation
Check the VM address using:
ip -br -4 addr
Check the container state using:
sudo docker compose ps
Check container health using:
sudo docker inspect --format='{{.State.Health.Status}}' uptime-kuma
Confirm direct access using:
curl -I http://192.168.2.115:3001/
Confirm DNS inside the container using:
sudo docker exec uptime-kuma getent hosts portal.bytek.ca
Confirm the public route using:
curl -I https://status.bytek.ca/
Interpret redirects according to the currently enabled authentication layers.
Logging
Review Uptime Kuma logs using:
sudo docker compose logs --tail 100 uptime-kuma
Follow logs live using:
sudo docker compose logs -f uptime-kuma
Review logs for:
- Database startup failures.
- Monitor connection failures.
- DNS errors.
- Certificate errors.
- Notification failures.
- Proxy-header errors.
- Authentication errors.
- File-permission problems.
- Persistent-volume errors.
Do not paste access tokens, notification secrets, cookies, or push-monitor URLs into BookStack.
Common Failure Scenarios
Many Hostname Monitors Fail Simultaneously
Likely causes:
Check direct IP monitors before assuming every application failed.
Direct Backends Work but Routed Monitors Fail
Likely causes:
- Pi-hole split DNS.
- Traefik router.
- Certificate.
- Authentik proxy.
- Hostname mismatch.
VM Ping Fails but HTTP Works
Likely cause:
- ICMP blocked by Proxmox or guest firewall.
The VM is likely available.
Kuma Dashboard Works by IP but Not by Hostname
Check:
- Pi-hole.
- Traefik.
- Certificate.
- Authentik provider.
- Browser DNS over HTTPS.
Authentik Login Works but Kuma Is Unreachable
Check:
- Internal host in the Authentik Proxy Provider.
- Authentik VM firewall access to TCP 3001.
- Uptime Kuma container.
- Embedded outpost assignment.
- Host-header forwarding.
Public Status Page Requires Login
Check:
- Authentik unauthenticated-path patterns.
- Status-page slug.
- Static asset exclusions.
- Status API exclusions.
- Traefik routing.
Push Monitor Stops Working
Check:
- Push path exclusion.
- Push token.
- Traefik access logs.
- Authentik outpost logs.
- Monitor heartbeat interval.
Power-Failure Recovery
After a power interruption:
- Confirm Proxmox.
- Confirm Pi-hole.
- Confirm the WireGuard gateway.
- Confirm Authentik.
- Confirm Traefik.
- Confirm the Uptime Kuma VM owns
192.168.2.115. - Confirm Docker.
- Confirm the container.
- Confirm container DNS.
- Confirm embedded MariaDB health.
- Confirm direct dashboard access.
- Confirm the routed dashboard.
- Confirm monitors recover.
- Restart or recreate the container only if DNS remains broken.
Uptime Kuma should start after the core DNS, identity, and routing services when practical.
Backup
The Uptime Kuma VM is included in the Proxmox scheduled backup job.
Protect:
- Persistent
/app/data. - Docker Compose file.
- Environment file, if used.
- Any custom certificates.
- Notification configuration.
- Status-page assets.
- Monitor history.
- Embedded database.
A stopped Proxmox backup provides the strongest whole-VM consistency for a baseline.
Snapshot-mode backup may be used for routine operation where downtime is undesirable.
Recovery Procedure
If Uptime Kuma is corrupted or unavailable:
- Confirm the VM is running.
- Confirm
192.168.2.115. - Confirm Docker.
- Confirm the persistent-data mount.
- Confirm the container.
- Review logs.
- Confirm embedded database health.
- Test direct TCP port 3001.
- Test Pi-hole DNS.
- Test the Traefik route.
- Test the Authentik proxy.
If the VM must be restored:
- Restore the latest backup under a temporary VM ID.
- Disconnect the restored VM network adapter.
- Verify Docker and persistent data.
- Verify monitor configuration.
- Shut down the failed production VM.
- Assign the expected network identity.
- Start the restored VM.
- Confirm
192.168.2.115. - Confirm the dashboard.
- Confirm notifications and monitors.
- Reconnect the Authentik route.
Authentik Recovery
If the Authentik proxy prevents access:
- Restore the known-good direct Traefik route.
- Temporarily permit the administrative workstation to reach TCP 3001.
- Access Uptime Kuma using the private IP.
- Re-enable Uptime Kuma local authentication.
- Repair the Authentik Proxy Provider.
- Test Authentik with a private browser.
- Confirm
bytek-adminaccess. - Confirm a normal user is denied.
- Disable local authentication again only after validation.
- Restrict TCP 3001 again.
Record the original administrator password securely even after local authentication is disabled.
Security Checklist
- Uptime Kuma is not directly exposed publicly on TCP 3001.
- Dashboard access requires
bytek-admin. - Authentik policy engine uses
ALL. - Direct backend access is restricted after local authentication is disabled.
- Trust Proxy is enabled when required.
- Public status-page exclusions are narrow.
- Push URLs are treated as secrets.
- Notification credentials are protected.
- Container DNS is
192.168.2.65. - Persistent data is backed up.
- Local recovery credentials are stored securely.
- Proxmox backup includes the Uptime Kuma VM.
- Public status pages do not reveal sensitive infrastructure details.
Validation Checklist
- Uptime Kuma VM owns
192.168.2.115. - Docker is active.
- Uptime Kuma container is running.
- Container health is
healthy. - Embedded MariaDB is available.
- Persistent data is mounted.
- Container DNS uses Pi-hole.
- Internal Bytek names resolve.
- Direct TCP 3001 responds.
- Routed dashboard responds.
- Authentik Proxy Provider works.
bytek-adminis allowed.- Normal users are denied.
- Public status pages work as intended.
- Push monitors work.
- Notifications are tested.
- Certificate monitoring works.
- Proxmox backup includes the VM.
- Recovery access has been tested.
Document Control
- Owner: Bryan Gagne-Plante
- Private address:
192.168.2.115 - Backend port: TCP 3001
- Public hostname:
status.bytek.ca - Deployment directory:
/opt/uptime-kuma - Database: Embedded MariaDB
- Container DNS:
192.168.2.65 - Authentication: Authentik Proxy Provider
- Required group:
bytek-admin - Proxmox VM ID: Confirm current VM ID
- Last verified: YYYY-MM-DD
- Last notification test: YYYY-MM-DD
- Last Authentik proxy test: YYYY-MM-DD
- Last public status-page test: YYYY-MM-DD
- Last restore test: YYYY-MM-DD
- Known limitation: Monitoring, status history, and alerting depend on one Uptime Kuma VM