Stop Command
Stop all NexoralDNS services without removing any data or configurations. Services can be restarted later with the start command.
Command
curl -fsSL https://raw.githubusercontent.com/nexoral/NexoralDNS/main/Scripts/install.sh | bash -s stopWhat It Does
The stop command gracefully shuts down all NexoralDNS services while preserving all data, configurations, and settings. It performs the following operations:
Stop Process:
- Verifies NexoralDNS installation exists
- Sends graceful shutdown signals to all containers
- Stops the DNS server (port 53 becomes available)
- Stops the cache manager
- Stops the web dashboard (port 4000 becomes available)
- Restores original system DNS configuration
- Confirms all containers are stopped
- Leaves all data volumes intact
When to Use
Use the stop command in these scenarios:
System Maintenance
When performing system updates, hardware maintenance, or other administrative tasks that require DNS services to be temporarily offline.
Troubleshooting
When diagnosing network issues or testing alternative DNS configurations.
Resource Management
To free up system resources (RAM, CPU) when NexoralDNS is not needed temporarily.
Port Conflicts
When you need to temporarily use port 53 or 4000 for another service.
Before Updates
Although the update command handles this automatically, you may want to manually stop services before performing manual updates.
Data Preservation:
The stop command does NOT delete any data. All configurations, DNS records, cache data, statistics, and settings are preserved. Use the start command to resume services with all your data intact.
Expected Output
When services stop successfully, you'll see output similar to:
[â] NexoralDNS installation found
[â] Stopping services...
Stopping nexoraldns-dashboard ... done
Stopping nexoraldns-cache ... done
Stopping nexoraldns-dns-server ... done
[â] All services stopped successfully
[â] Original DNS configuration restored
Services Status:
DNS Server: Stopped
Cache Manager: Stopped
Web Dashboard: Stopped
Note: All data and configurations preserved.
Run start command to resume services.What Happens to Services
DNS Server
- DNS resolution on port 53 stops
- All custom DNS records and configurations remain saved
- Block lists and filtering rules are preserved
- Query logs are retained in the database
Cache Manager
- Cache service stops processing requests
- In-memory cache is cleared (will rebuild on restart)
- Persistent cache data remains in volumes
- Cache statistics and history are preserved
Web Dashboard
- Web interface becomes inaccessible at port 4000
- User accounts and settings are preserved
- Session data may expire but can be re-authenticated
- All dashboard configurations remain intact
Network Configuration
- System DNS reverts to previous configuration
- Your network continues working with original DNS servers
- Docker networks created by NexoralDNS remain (inactive)
Verifying Services Stopped
Check Container Status
Verify all containers are stopped:
sudo docker compose ps -aAll services should show status as Exited:
NAME STATUS
nexoraldns-dns-server Exited (0)
nexoraldns-cache Exited (0)
nexoraldns-dashboard Exited (0)Check Port Availability
Verify ports 53 and 4000 are no longer in use:
sudo netstat -tulpn | grep :53\nsudo netstat -tulpn | grep :4000These commands should return no output if ports are free.
Verify Data Preservation
Check that data volumes still exist:
sudo docker volume ls | grep nexoraldnsAlternative Stop Methods
Using Docker Compose Directly
If you prefer to use Docker Compose commands directly:
cd /path/to/NexoralDNS/Scripts\nsudo docker compose stopStop Specific Service
To stop only a specific service while keeping others running:
cd /path/to/NexoralDNS/Scripts\nsudo docker compose stop dashboardForce Stop (Not Recommended)
If services don't respond to graceful shutdown:
sudo docker compose killForce Stop Warning:
Using docker compose kill forcefully terminates containers without graceful shutdown. This may result in data corruption or incomplete transactions. Only use this if normal stop command fails.
Resuming Services
To restart NexoralDNS services after stopping:
curl -fsSL https://raw.githubusercontent.com/nexoral/NexoralDNS/main/Scripts/install.sh | bash -s startAll your data, configurations, and settings will be exactly as you left them.
Troubleshooting
Services Won't Stop
Check for active connections:
sudo docker compose logsWait a few moments for graceful shutdown, then retry. If still hanging, use force stop.
DNS Not Restored
Manually restore DNS:
# Check current DNS\ncat /etc/resolv.conf\n\n# Edit if needed\nsudo nano /etc/resolv.conf\n\n# Add your preferred DNS (e.g., Google)\nnameserver 8.8.8.8\nnameserver 8.8.4.4Containers Restart Automatically
Problem: Containers restart after stopping due to restart policy.
Solution: Use down instead of stop to remove containers:
cd /path/to/NexoralDNS/Scripts\nsudo docker compose downDown vs Stop:
docker compose down stops AND removes containers (but preserves volumes). Use stop to keep containers for faster restarts. Use down to completely remove containers while preserving data.
Related Commands
- Start Command - Resume NexoralDNS services
- Remove Command - Completely uninstall NexoralDNS
- Update Command - Update to latest version
- Troubleshooting - Common issues and solutions