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:
| Item | Example |
|---|---|
| IP address | 10.0.10.130 |
| Canonical name | pdf 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
- Open the Technitium web console and go to Zones.
- Select the zone, here
cs.manzana.home. - Click Add Record.
- Fill in the form:
- Name:
pdf - Type:
A - IPv4 Address:
10.0.10.130
- Name:
- 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:
| Field | Example |
|---|---|
| Hostname | CT-Stirling-PDF |
| MAC address | aa:bb:cc:dd:ee:ff |
| IP address | 10.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.
- Go to System > Hosts and services > Services.
- Click Add service.
- 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 port8080
- Name:
Add the IP host
The IP host represents the container, so rules can name it instead of an address.
- Go to System > Hosts and services > IP host.
- Click Add IP host.
- Fill in:
- Name:
LXC Stirling PDF - Description:
Stirling PDF LXC container - IP address:
10.0.10.130
- Name:
Add the firewall rule
- Go to Protect > Rules and policies.
- Click Add firewall rule > New firewall rule.
- Fill in:
| Field | Example |
|---|---|
| Rule name | Office → Stirling PDF : Web-Access (HTTP) |
| Description | Access Stirling PDF App |
| Rule group | Office & Media → CoreServices |
| Source zones | LAN |
| Source networks and devices | Network Office 10.0.20.0/24 |
| Destination zones | LAN |
| Destination networks | LXC Stirling PDF |
| Services | Stirling 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:
ping 10.0.10.130shows whether the lease took effect and the host is reachable. ICMP may be blocked by the rule, so a missing reply is not conclusive.http://10.0.10.130:8080/tests the firewall rule and the service port without DNS.nslookup pdf.cs.manzana.hometests 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:
- Choose IP address and canonical name.
- Add the A record in Technitium.
- Add the DHCP lease, service, IP host, and firewall rule in Sophos XG.
- Test by IP address first, then by name.