File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 142142
143143 firewall = {
144144 trustedInterfaces = [ "tailscale0" "br-vms" ] ;
145+ # Open 80 (ACME HTTP challenge) and 443 (HTTPS) for Caddy on the host
146+ allowedTCPPorts = [ 80 443 ] ;
145147 } ;
146148
147149 # NAT: VMs reach the internet through the host's public interface
178180 } ;
179181 } ;
180182
183+ # ---------------------------------------------------------------------------
184+ # Caddy: TLS termination on the host, reverse-proxying to the API VM
185+ #
186+ # Caddy uses ACME (Let's Encrypt) auto-HTTPS by default.
187+ # Port 80 must be open externally for the HTTP-01 challenge.
188+ # ---------------------------------------------------------------------------
189+ services . caddy = {
190+ enable = true ;
191+ virtualHosts . "api.stackpanel.com" = {
192+ extraConfig = ''
193+ reverse_proxy 10.0.100.11:3000
194+ '' ;
195+ } ;
196+ } ;
197+
181198 # ---------------------------------------------------------------------------
182199 # microVM definitions
183200 # ---------------------------------------------------------------------------
Original file line number Diff line number Diff line change 149149 firewall = {
150150 # Trust the VM bridge and Tailscale (inter-VM traffic unrestricted)
151151 trustedInterfaces = [ "tailscale0" "br-vms" ] ;
152+ # Open 80 (ACME HTTP challenge) and 443 (HTTPS) for Caddy on the host
153+ allowedTCPPorts = [ 80 443 ] ;
152154 } ;
153155
154156 # NAT: VMs reach the internet through the host's public interface
187189 } ;
188190 } ;
189191
192+ # ---------------------------------------------------------------------------
193+ # Caddy: TLS termination on the host, reverse-proxying to the API VM
194+ #
195+ # Caddy uses ACME (Let's Encrypt) auto-HTTPS by default.
196+ # Port 80 must be open externally for the HTTP-01 challenge.
197+ # ---------------------------------------------------------------------------
198+ services . caddy = {
199+ enable = true ;
200+ virtualHosts . "api.stackpanel.com" = {
201+ extraConfig = ''
202+ reverse_proxy 10.0.100.11:3000
203+ '' ;
204+ } ;
205+ } ;
206+
190207 # ---------------------------------------------------------------------------
191208 # microVM definitions
192209 # ---------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments