Adding a Service to the Homelab: Stirling PDF Step by Step

A worked example of giving a new LXC service an address, a DNS name, a DHCP lease, and a narrowly scoped firewall rule, using Stirling PDF with Technitium DNS and Sophos XG.

A new service in the homelab needs more than a running container. It needs a stable address, a name, and a firewall rule that lets the right clients reach it, and nothing else. The general checklist lists the steps. This post walks through them once with concrete values, using Stirling PDF running in an LXC container.

All values below are examples. Replace them with your own.

1. Decide on address and name

Before touching any configuration, fix two things:

ItemExample
IP address10.0.10.130
Canonical namepdf in the subnet cs.manzana.home

The resulting fully qualified name is pdf.cs.manzana.home. A short, service-oriented name works better than a host-oriented one. If the container is later replaced, the name can stay the same.

2. Create the DNS record in Technitium

  1. Open the Technitium web console and go to Zones.
  2. Select the zone, here cs.manzana.home.
  3. Click Add Record.
  4. Fill in the form:
    • Name: pdf
    • Type: A
    • IPv4 Address: 10.0.10.130
  5. Save the record.

Check it from a client:

nslookup pdf.cs.manzana.home

The answer should contain 10.0.10.130.

3. Configure Sophos XG

Four objects are needed: a DHCP lease, a service, an IP host, and the firewall rule. Create them in that order, because each one is referenced by the next.

Add the DHCP lease

Reserve the address so the container always gets it. In the DHCP server settings, add a static lease:

FieldExample
HostnameCT-Stirling-PDF
MAC addressaa:bb:cc:dd:ee:ff
IP address10.0.10.130

Use the MAC address of the container’s network interface. Proxmox shows it in the container’s network settings. After saving, restart the container’s network or renew its lease.

Add the service

The service object describes the port the application listens on.

  1. Go to System > Hosts and services > Services.
  2. Click Add service.
  3. Fill in:
    • Name: Stirling PDF Web UI. Name it after the service and its purpose.
    • Description: Access to Stirling PDF
    • Protocol and ports: TCP, destination port 8080

Add the IP host

The IP host represents the container, so rules can name it instead of an address.

  1. Go to System > Hosts and services > IP host.
  2. Click Add IP host.
  3. Fill in:
    • Name: LXC Stirling PDF
    • Description: Stirling PDF LXC container
    • IP address: 10.0.10.130

Add the firewall rule

  1. Go to Protect > Rules and policies.
  2. Click Add firewall rule > New firewall rule.
  3. Fill in:
FieldExample
Rule nameOffice → Stirling PDF : Web-Access (HTTP)
DescriptionAccess Stirling PDF App
Rule groupOffice & Media → CoreServices
Source zonesLAN
Source networks and devicesNetwork Office 10.0.20.0/24
Destination zonesLAN
Destination networksLXC Stirling PDF
ServicesStirling PDF Web UI

The rule name says who may reach what and how. Only the Office network, only this one host, and only TCP 8080 are allowed. Avoid selecting Any for services, even if it saves a minute now.

Rules are evaluated top to bottom, and the first match wins. If the new rule does not take effect, check whether an earlier rule in a different group already matches and blocks the traffic.

4. Verify

From a client in the Office network, open the service by name:

http://pdf.cs.manzana.home:8080/

If it fails, test in layers, starting at the bottom:

  1. ping 10.0.10.130 shows whether the lease took effect and the host is reachable. ICMP may be blocked by the rule, so a missing reply is not conclusive.
  2. http://10.0.10.130:8080/ tests the firewall rule and the service port without DNS.
  3. nslookup pdf.cs.manzana.home tests the DNS record.

If the IP address works and the name does not, the problem is in DNS. If neither works, look at the firewall rule, the service port, and whether Stirling PDF is listening on the expected interface.

Summary

For every new service, the sequence stays the same:

  1. Choose IP address and canonical name.
  2. Add the A record in Technitium.
  3. Add the DHCP lease, service, IP host, and firewall rule in Sophos XG.
  4. Test by IP address first, then by name.