Skip to main content

Overview

Dokploy leverages Docker networking and Traefik to provide flexible, secure networking for your applications. Understanding networking is crucial for multi-container applications, microservices, and production deployments.

Automatic Routing

Traefik automatically routes traffic to your services

Service Discovery

DNS-based discovery for inter-service communication

Network Isolation

Isolated networks for security and organization

Network Types

Docker provides several network drivers:
Default network for standalone containers:
  • Isolated from host network
  • Containers can communicate by name
  • Suitable for single-host deployments
  • Port mapping required for external access

Dokploy Network Architecture

Dokploy creates these networks automatically:

dokploy-network

The main network for all Dokploy services:
  • Traefik runs on this network
  • Applications attach to this network for routing
  • Enables communication between projects

Project Networks

Each project can have isolated networks:

Service Communication

Internal Communication

Services in the same network communicate using service names:
docker-compose.yml

Cross-Project Communication

Services in different projects can communicate if they share a network:
Project A
Project B

Traefik Routing

Traefik is Dokploy’s built-in reverse proxy and load balancer.

Automatic Routing

Dokploy automatically configures Traefik labels:

Custom Routing Rules

Advanced routing based on:
Route by domain:

Multiple Domains

Route multiple domains to one service:

Path-Based Routing

Route different paths to different services:
Higher priority rules are evaluated first.

Network Security

Internal Networks

Create internal-only networks for sensitive services:

Firewall Rules

Use Docker’s built-in firewall (iptables):

Network Policies

For advanced control, use Docker’s network policies:

Load Balancing

Traefik provides automatic load balancing:

Round Robin (Default)

Weighted Load Balancing

Sticky Sessions

Route users to the same backend:

Health Checks

Configure health checks for automatic recovery:

Custom DNS

Add custom DNS entries:

IPv6 Support

Enable IPv6 in Docker daemon:
/etc/docker/daemon.json
Then in your compose file:

Debugging Network Issues

Inspect Networks

Test Connectivity

View Traefik Configuration

Access Traefik dashboard:

Performance Optimization

For latency-sensitive applications:
Trade-offs: No isolation, port conflicts
Match your network’s MTU:
Encrypt overlay network traffic:
Use custom DNS servers:

Common Networking Patterns

Frontend-Backend Separation

Service Mesh Pattern

Troubleshooting

  • Verify both containers are on the same network
  • Check network exists: docker network ls
  • Inspect network: docker network inspect network_name
  • Try using IP address instead of hostname
  • Check container’s DNS config: docker exec container cat /etc/resolv.conf
  • Verify service name is correct
  • Restart Docker daemon: systemctl restart docker
  • Check for DNS conflicts with host
  • Verify container has correct labels
  • Check Traefik logs: docker logs traefik
  • Ensure container is on dokploy-network
  • Verify domain DNS points to server
  • Check firewall rules allow ports 80/443
  • Check MTU settings
  • Monitor network usage: docker stats
  • Consider host network mode
  • Check for DNS resolution delays
  • Verify no packet loss: ping -c 100 service_name

Next Steps

Domains & Routing

Configure domain routing

Multi-Node

Deploy across multiple servers

Docker Swarm

Swarm networking configuration

Security

Network security best practices