This document captures the practical steps needed to spin up the full stack locally, manage certificates, and configure browsers or operating-system DNS clients during development.
- Docker & Docker Compose
- Make
- mkcert (or an equivalent CA generation tool)
- dnsmasq (or another DNS forwarder that supports wildcard overrides)
- Access to
/etc/hostsand/etc/resolv.conf(Linux/macOS) or the Windows hosts file
-
Generate or trust the provided certificates (see the next section).
-
From the repository root, run:
make up
This builds containers, seeds databases, and exposes the web UI via Nginx at
https://ivpndns.com. -
Use
make logsto tail container output, andmake downto stop everything when you are done hacking.
- Create or reuse a local Certificate Authority (CA).
- Trust that CA in your OS (e.g.,
/usr/local/share/ca-certificates/on Ubuntu, Keychain Access on macOS). - Generate a wildcard certificate and sign it with your CA.
- Convert the resulting
.crt+.keyinto.pemfiles and place them incerts/.
./mkcert ivpndns.com "*.ivpndns.com" localhost 127.0.0.1 ::1mkcert automatically installs its root CA into the system trust store, so browsers accept https://ivpndns.com when the dev proxy serves it locally.
/etc/hosts cannot express wildcard records, so we rely on dnsmasq:
sudo systemctl disable systemd-resolved # disable Ubuntu's stub resolver
sudo systemctl enable dnsmasq.service
sudo systemctl start dnsmasq.service/etc/dnsmasq.conf snippet:
# Map every *.ivpndns.com host to localhost for HTTPS and DoT/DoQ tests
address=/ivpndns.com/127.0.0.1
cache-size=1000
Helpful /etc/hosts entries (in addition to dnsmasq):
# DNS check entry for local testing
127.0.0.1 123.test.localdnsleaktest.com
127.0.0.1 ivpndns.com
Tip
docker network inspect bridge reveals the "Gateway" IP. Export that value as API_ALLOW_IP. Set API_ALLOW_IP="*" to bypass IP-based access control while developing.
-
Point your browser or OS DNS setting to the local DoH endpoint:
https://ivpndns.com:443/dns-query/<profile-id> -
Import
certs/ivpndns.com+4.pem(or the certificate generated via mkcert) into the browser's trust store:- Chrome/Edge: Settings → Privacy and Security → Security → Manage certificates → Authorities
- Firefox: Settings → Privacy & Security → Certificates → View Certificates → Authorities
-
If you need DoT/DoQ validation, ensure your DNS client trusts the same certificate.
- TLS errors: confirm the CA is trusted and the certificate's SAN includes the host you're testing (
*.ivpndns.com). - Wildcard not resolving: restart dnsmasq after editing the config (
sudo systemctl reload dnsmasq). - API allow list failures: verify
API_ALLOW_IPmatches the docker bridge gateway or set it to*for local-only usage.
Keep this guide close when onboarding new contributors so the local environment stays reproducible.