Troubleshooting Guide
This guide covers common issues and solutions for FOG Docker.
Container Issues
Container Won’t Start
- Check container logs:
docker compose logs fog-server docker compose logs fog-db - Verify environment variables:
cat .env - Check port conflicts:
netstat -tulpn | grep -E ':(80|443|69|21|2049)' - Verify Docker resources:
docker system df docker system prune # Clean up if needed
Database Connection Issues
- Check database container status:
docker compose ps fog-db - Test database connectivity:
docker exec fog-server mysql -h fog-db -u root -p$FOG_DB_ROOT_PASSWORD - Check database logs:
docker compose logs fog-db - Verify database environment variables:
grep FOG_DB_ .env
Default Admin Login (fog/password) Not Working
If the default credentials fog / password don’t work, follow these steps to diagnose and fix the issue.
Step 1: Verify the Admin User Exists
Check if the admin user was created in the database:
docker exec fog-server mysql -h fog-db -u fogmaster -pfogmaster123 -e "SELECT uName, uId FROM fog.users WHERE uName='fog';"
Expected output: Should show a row with uName='fog' and a uId number.
If empty: The admin user wasn’t created during schema initialization.
Step 2: Check Schema Initialization Logs
Review the container logs for schema initialization:
docker compose logs fog-server | grep -i "schema\|admin\|user" | tail -20
Look for:
- “Database schema is up to date” or “Database schema check/update completed successfully”
- “FATAL: FOG database schema install/update failed” (container exits on purpose)
On FOG 1.5.10.18xx+, schema deploy requires FOG_SCHEMA_INSTALL_TOKEN. The entrypoint writes this into config.class.php and posts it unattended. Success is judged by the schemaVersion row in the database (not by scraping FOG’s HTML/JSON response). FOG still has no CLI schema installer — if upstream renames the web form fields, the POST may be ignored and the DB check will fail loudly.
If migration fails, the container exits instead of starting workers against an outdated schema.
Step 3: Manually Trigger Schema Initialization
If the admin user doesn’t exist and the container is not auto-migrating, complete installation manually:
- Open your browser and go to:
http://your-server-ip/fog/management/index.php?node=schemaIf you set a stable
FOG_SCHEMA_INSTALL_TOKENin.env, append&fogtoken=<your-token>. -
You should see a page titled “Database Schema Installer / Updater”
-
Click the “Install/Update Now” button
-
Wait for the success message
- Try logging in again with
fog/password
Step 4: Verify After Manual Installation
After completing Step 3, verify the user exists:
docker exec fog-server mysql -h fog-db -u fogmaster -pfogmaster123 -e "SELECT uName, uId FROM fog.users WHERE uName='fog';"
Step 5: Check Database Connection
If schema initialization fails, verify the database connection:
# Check if database container is running
docker compose ps fog-db
# Check database logs
docker compose logs fog-db --tail 50
# Test database connection from fog-server
docker exec fog-server mysql -h fog-db -u fogmaster -pfogmaster123 -e "SELECT 1;"
Note: Future versions will automatically verify and report admin user creation status in the logs to make this easier to diagnose.
Login Loops Back to Empty Form (No Error)
If submitting fog / password returns you to blank login fields with no error message, the admin user may exist and credentials may be correct — the session cookie is not sticking.
Cause: The URL in your browser does not match your FOG_TLS_MODE. See TLS Modes.
| You browse | Set |
|---|---|
https://host/... direct (self-signed) | FOG_TLS_MODE=standard |
https://fqdn/... via Traefik only | FOG_TLS_MODE=reverse-proxy |
http://host:port/... | FOG_TLS_MODE=http-only |
Using reverse-proxy but opening plain http://container-ip:80/... makes FOG set Secure cookies while the browser connection is not HTTPS — login loops.
Fix for HTTP access (e.g. custom port 89):
FOG_TLS_MODE=http-only
FOG_APACHE_EXPOSED_PORT=89
Fix for direct HTTPS (default):
FOG_TLS_MODE=standard
Recreate the container, then use https://your-host/fog/management/ and accept the self-signed certificate.
Verify: Browser devtools → Network → login POST → Set-Cookie: PHPSESSID with Secure on an http:// URL confirms the mismatch.
Also ensure FOG_STORAGE_HOST matches FOG_WEB_HOST for single-server setups (do not leave a placeholder FQDN from the example).
iPXE Fails Chaining to boot.php (HTTPS / certificate errors)
Symptom: PXE loads iPXE, then fails on https://…/fog/service/ipxe/boot.php (e.g. iPXE error 0216eb8f, or “permission denied”).
Cause: Netboot was using HTTPS while the certificate is not trusted by stock iPXE (typical with self-signed Apache certs).
Fix: Use the default mode (matches upstream FOG 1.6 standard):
FOG_TLS_MODE=standard
Recreate the container and confirm /tftpboot/default.ipxe chains to http:// your host. Open the UI at https://. See TLS Modes.
For HTTPS netboot, use FOG_TLS_MODE=reverse-proxy or public-cert with an FQDN and a publicly trusted certificate.
Network Issues
Storage Node Connectivity Issues
- Verify
FOG_STORAGE_HOSTis reachable from client machines - Check that the FQDN resolves correctly from client machines
- Verify firewall rules allow access to ports 80, 443, 69, 2049, 21
- Test connectivity:
ping fog.example.com telnet fog.example.com 80 telnet fog.example.com 443
PXE Boot Issues
- Ensure
FOG_TFTP_HOSTis reachable from client machines - Check that port 69/UDP is open and accessible
- Verify DHCP is configured to point to the correct TFTP server
- Check that DHCP option 66 (next-server) points to
FOG_TFTP_HOST - Verify DHCP option 67 (filename) is set to the correct boot file
- For UEFI clients, ensure the boot file is configured:
- UEFI 32-bit:
FOG_DHCP_BOOTFILE_UEFI32(default:i386-efi/snponly.efi) - UEFI 64-bit:
FOG_DHCP_BOOTFILE_UEFI64(default:snponly.efi) - UEFI ARM64:
FOG_DHCP_BOOTFILE_ARM64(default:arm64-efi/snponly.efi) - Legacy variable:
FOG_DHCP_BOOTFILE_UEFI(maps to UEFI64 for backward compatibility)
- UEFI 32-bit:
- For HTTPBoot clients, verify that the iPXE files are accessible via HTTP (automatically available)
TFTP Boot Files Missing (only default.ipxe in /tftpboot)
Symptom: Host bind mount or browsed /tftpboot directory contains only default.ipxe, not undionly.kkpxe, ipxe.efi, etc. TFTP may connect but clients fail with “file not found”.
Cause: A host bind mount replaces the image’s baked-in /tftpboot at container start. On older images, the entrypoint copied boot files into a nested /tftpboot/tftp/ subdirectory; if flattening failed (permissions on NFS/host mounts), only default.ipxe (written separately) remains visible at the top level.
Fix:
- Ensure the host tftpboot directory is writable by the container (e.g.
chmod 775or matching UID). - Empty the host tftpboot directory (keep a backup if needed) and restart the container — the entrypoint repopulates all boot files on start.
- Verify inside the container:
docker exec fog-server ls -la /tftpboot/ | head -20 tftp -m binary YOUR_HOST -c get undionly.kkpxe /tmp/test.kpxe - Check for a legacy nested directory:
docker exec fog-server ls /tftpboot/tftp/— if files are there, upgrade to the latest image and restart.
Atheros / Legacy NIC: “No configuration method succeeded”
Symptom: iPXE loads but DHCP fails with err:040ee1 on certain Atheros or older NICs. Other .kpxe files may fail earlier with TFTP “file not found” if boot files are missing (see above).
Upstream fix: FOG upstream recommends updating to dev-branch for this class of hardware (forum thread). Stable images update when upstream cuts a stable release.
Options without breaking a working deployment:
- Wait for stable — pre-built images rebuild when upstream stable is updated (
ghcr.io/88fingerslukee/fog-docker:latest). - Dev / custom FOG ref — use a published tag, or build locally from any FOG git ref (including
working-1.6or an RC):# In .env FOG_VERSION=working-1.6 docker compose -f docker-compose-dev.yml up -d --build - Try vendor-specific boot files (if TFTP files are present) — set in
.env:FOG_DHCP_BOOTFILE_BIOS=realtek.kkpxe # some Atheros/Realtek legacy NICsRestart the container so DHCP config is regenerated.
- Spanning tree — enable PortFast/edge on the switch port if DHCP timeouts occur (forum reference).
Capture finishes but task fails on “Updating Database” (Post_Stage2 HTTP 500)
FOG 1.6 Post_Stage2.php moves the capture from /images/dev/<mac>/ into the image directory over SSH/SFTP. If that step fails, the upload data may still be on disk under dev/ while the task shows Failed.
Check Apache/PHP error log:
docker exec fog-server grep Post_Stage2 /opt/fog/log/apache2_error.log | tail -5
| Log message | Fix |
|---|---|
Call to undefined function ... ssh2_connect() | Image missing PHP ssh2 — rebuild/pull current fog-docker (Debian php8.4-ssh2 package). |
Unable to connect to ssh during move upload | openssh-server not running in the container, or storage node hostname wrong. |
| SSH auth failure | Storage node IP/Hostname in FOG must match a host where FOG_USER/FOG_PASS work over SSH. |
Docker (single container):
FOG_STORAGE_HOST=<IP or FQDN clients use for NFS/FTP> # often same as FOG_WEB_HOST
FOG_STORAGE_NODE_SSH_HOST=127.0.0.1 # Post_Stage2 SFTP only (not on clients)
Restart the container after upgrading fog-docker so ngmHostname is synced from FOG_STORAGE_HOST and TaskQueue.php uses FOG_STORAGE_NODE_SSH_HOST for SSH without overwriting the client storage IP.
NFS mount fails: storageip=127.0.0.1 / Connection refused
FOG builds ftp=, storage=, and storageip= from the master storage node nfsGroupMembers.ngmHostname. If that value is 127.0.0.1, each imaging client tries to NFS-mount its own loopback and fails before upload.
Fix: set FOG_STORAGE_HOST (and FOG_WEB_HOST) to the server IP or FQDN clients can route to, pull a current fog-docker image (Post_Stage2 SSH override), restart, then re-PXE or refresh boot.php so kernel args update. One-off SQL:
UPDATE nfsGroupMembers SET ngmHostname='your.imaging.host' WHERE ngmIsMasterNode=1;
Manual finalize (if capture data remains under dev/ and task failed): fix ssh2/sshd/hostname, set the task back to In-Progress in the DB if needed, then retry from the client or POST Post_Stage2.php with mac= and type=up. Success body is ##.
HTTPBoot Issues
- Verify iPXE files are accessible via HTTP/HTTPS
- Check protocol matches your TLS mode (
FOG_TLS_MODE) - Test URLs directly in a browser
- Verify reverse proxy configuration (if using)
FTP Issues
Passive Mode Problems
- Ensure FTP passive port range (21100-21110) is open in firewall
- Check
FOG_FTP_PASV_MIN_PORTandFOG_FTP_PASV_MAX_PORTconfiguration - Verify
FOG_WEB_HOSTresolves correctly from client machines - Test FTP connectivity:
ftp fog.example.com # Try passive mode
Connection Issues
- Verify
FOG_WEB_HOSTresolves correctly from client machines - Check FTP server is running:
docker exec fog-server systemctl status vsftpd - Check FTP logs:
docker exec fog-server tail -f /var/log/vsftpd.log
Permission Errors
- Check that FOG user has proper permissions on image directories
- Verify file ownership:
docker exec fog-server ls -la /images/ - Check FOG user configuration:
grep FOG_USER .env grep FOG_PASS .env
“Cannot Create File” Errors
Usually indicates passive mode configuration issues:
- Check passive mode configuration in vsftpd
- Verify passive port range is open in firewall
- Check
FOG_WEB_HOSTsetting for FQDN resolution
NFS Issues
Permission Problems
- NFS exports use
root_squashwithanonuid=999,anongid=33mapping - Check NFS export configuration:
docker exec fog-server cat /etc/exports - Verify NFS server is running:
docker exec fog-server supervisorctl status nfs-kernel-server unfsdKernel mode runs
nfs-kernel-server.FOG_NFS_MODE=unfs3runsunfsdinstead and does not use port 32765.
Image Capture Issues
- If captured images create files instead of directories, check NFS export configuration
- Verify proper ownership mapping in NFS exports
- Check FOG user permissions on image directories
Mount Failures
- Verify NFS server is running and exports are properly configured
- Check NFS port accessibility (2049)
- Test NFS mount:
mount -t nfs fog.example.com:/images /mnt/test
DHCP Configuration Issues
- Verify all DHCP network variables match your actual network configuration
- Ensure
FOG_DHCP_SUBNETandFOG_DHCP_NETMASKare correct for your network - Check that
FOG_DHCP_ROUTERpoints to your actual gateway - Verify IP address range (
FOG_DHCP_START_RANGEtoFOG_DHCP_END_RANGE) doesn’t conflict with existing devices - Ensure
FOG_DHCP_DNScontains valid DNS servers - Check that all required boot files are present in
/tftpboot/(BIOS, UEFI)
SSL/HTTPS Issues
Certificate Issues
- Check certificate file paths in
FOG_APACHE_SSL_CERT_FILEandFOG_APACHE_SSL_KEY_FILE - Verify volume mounts are correct
- Check file permissions on certificate files
- Verify certificate and key match
SSL Handshake Failed
- Check certificate validity dates
- Ensure proper certificate chain
- Verify SSL configuration in Apache
Edge/Chrome: ERR_SSL_KEY_USAGE_INCOMPATIBLE (standard TLS / self-signed)
The browser reached HTTPS but rejected the Apache server.crt Key Usage (common on WSL and FOG_TLS_MODE=standard). Pull a current fog-docker image and recreate the container so managed server.crt is regenerated with digitalSignature. See SSL/HTTPS — self-signed and Windows (WSL2).
WSL2 on Windows
See Windows (WSL2) for ports, FOG_WEB_HOST, HTTPS vs HTTP, and PXE limitations.
Mixed Content Warnings
- Use a TLS mode with HTTPS for the UI (
FOG_TLS_MODE=standard,mounted-certs,public-cert, orreverse-proxy) and open the matching URL — see TLS Modes - Check for hardcoded HTTP URLs in configuration
Image Management Issues
Image Capture/Deploy Failures
- Check that
FOG_STORAGE_HOSTis accessible from client machines - Verify NFS exports are working (port 2049)
- Check FTP connectivity (port 21)
- Verify FTP passive mode is working (ports 21100-21110)
- Check NFS permissions - captured images should create directories, not files
Client Download Issues
- Verify FOG client files are accessible at
/fog/client/ - Check CA certificate is accessible at
/fog/management/other/ca.cert.der - Verify server public certificate at
/fog/management/other/ssl/srvpublic.crt
FOG Agent enrollment / certificate name errors
FOG Agent checks that srvpublic.crt matches the server name you use to enroll (stricter than the legacy FOG Client).
- Set
FOG_WEB_HOSTto the primary FQDN or IP clients/agents use. - Add any other names (short hostname, extra DNS zone, LAN IP) to
FOG_CERT_SANas a comma-separated list — see SSL/HTTPS — FOG Client Certificates. - Enroll using a name that appears on the cert (same string as in the URL).
- Change
FOG_WEB_HOSTorFOG_CERT_SANand restart/recreate the container — fog-docker compares a saved fingerprint on/opt/fog/configand regeneratessrvpublic.crtwhen the values changed (see SSL/HTTPS).
Common Error Messages
“Cannot create file line 709”
- Cause: FTP passive mode configuration issues
- Solution: Check passive mode configuration and port range
“Undefined array key 8” in fogftp.class.php
- Cause: FTP directory listing issues
- Solution: Check FTP server configuration and passive mode
“Chainloading permission denied”
- Cause: iPXE file permission issues
- Solution: Check file permissions and accessibility
“Failed to download nbp file”
- Cause: HTTPBoot URL accessibility issues
- Solution: Check HTTPBoot URL and file accessibility
Debug Commands
Container Debugging
# Check container status
docker compose ps
# View container logs
docker compose logs -f fog-server
# Execute shell in container
docker exec -it fog-server bash
# Check service status
docker exec fog-server supervisorctl status
Network Debugging
# Test connectivity
ping fog.example.com
telnet fog.example.com 80
telnet fog.example.com 443
telnet fog.example.com 69
# Check DNS resolution
nslookup fog.example.com
dig fog.example.com
File System Debugging
# Check file permissions
docker exec fog-server ls -la /images/
docker exec fog-server ls -la /tftpboot/
# Check NFS exports
docker exec fog-server cat /etc/exports
# Check FTP configuration
docker exec fog-server cat /etc/vsftpd.conf
Getting Help
If you’re still experiencing issues:
- Check the logs for specific error messages
- Search existing issues on GitHub
- Create a new issue with detailed information:
- FOG Docker version
- Docker version
- Operating system
- Error messages and logs
- Configuration details (sanitized)
Next Steps
After resolving issues:
- Configuration Guide - Review and optimize configuration
- Network Boot Setup - Verify network boot configuration
- SSL/HTTPS Setup - Check SSL configuration if using HTTPS