Skip to content

.env variables

The entire lab is configured through .env (copied from .env.example). The tables below group the variables by concern.

VariableDefaultPurpose
COMPOSE_PROJECT_NAMEsamba-dcContainer and volume namespace, so this stack does not clash with others
SAMBA_REALMad.example.comDNS realm, upper-cased internally for Kerberos. Use a subdomain you control, never your bare public domain
SAMBA_DOMAINADNetBIOS short name. 15 chars or fewer, no dots, conventionally upper-case
SAMBA_ADMIN_PASSWORDChangeMe123!Domain Administrator password. Must meet AD complexity: 8+ chars with three of upper, lower, digit, symbol
VariableDefaultPurpose
SAMBA_DNS_BACKENDSAMBA_INTERNALSAMBA_INTERNAL (recommended) or BIND9_DLZ if you run BIND
SAMBA_DNS_FORWARDER1.1.1.1Upstream resolver for everything outside the AD zone
VariableDefaultPurpose
SAMBA_HOST_IP(blank)The LAN IP the DC advertises in SRV/A records and referrals. Strongly recommended on a multi-homed host
SAMBA_INTERFACES(blank)Bind the DC to only these interfaces plus loopback, space-separated. Keeps Samba off port 53 on a bridge another resolver owns
SAMBA_HOSTNAMEdc1The DC’s machine name; becomes dc1.<realm>
VariableDefaultPurpose
SAMBA_HOME_SHAREhomePer-user home share name. Leave blank to disable home directories entirely
SAMBA_HOME_DRIVEH:The Windows drive letter the home maps to
VariableDefaultPurpose
PRINT_HOSTNAMEprint1The print server’s hostname
PRINT_NETBIOSPRINT1The print server’s NetBIOS name
PRINT_LAN_IP10.0.0.23Static macvlan IP. Must be free and outside your DHCP pool
PRINT_LAN_PARENTbr0The real LAN interface macvlan attaches to (e.g. br0, eth0, enp3s0)
PRINT_LAN_SUBNET10.0.0.0/24The LAN subnet the print server lives on
PRINT_LAN_GATEWAY10.0.0.1The LAN gateway
VariableDefaultPurpose
RODC_HOSTNAMErodc1The RODC’s hostname
RODC_LAN_IP10.0.0.24Static macvlan IP for the RODC. Reuses the PRINT_LAN_* parent, subnet, and gateway
VariableDefaultPurpose
SNMP_LAN_IP10.0.0.25Static macvlan IP for the SNMP sidecar
IPP_LAN_IP10.0.0.26Static macvlan IP for the IPP sidecar
SNMP_COMMUNITYpublicSNMPv2c community for the default device. Per-device communities are the lowercased queue names (e.g. bmh12-plab)
VariableDefaultPurpose
TZUTCContainer timezone
SAMBA_LDAP_REQUIRE_STRONG_AUTHyesRequire transport encryption for LDAP simple binds. Set no only if a sibling must bind read-only over plaintext LDAP on the private bridge