local.dev

The local.dev proxy provides automatic routing and load balancing for your local services.

Overview

The reverse proxy integrates with your development workflow to route traffic to your services.

Features

  • Automatic discovery - Detects services automatically
  • SSL termination - Handle HTTPS at the proxy
  • Load balancing - Distribute traffic
  • Middleware - Auth, rate limiting, etc.

Dashboard

Access the proxy dashboard:

http://proxy.local.test/dashboard/

Configuration

Basic Router

# proxy/config.yml
http:
  routers:
    my-app:
      rule: "Host(`app.local.test`)"
      service: my-app
      entryPoints:
        - web
  services:
    my-app:
      loadBalancer:
        servers:
          - url: "http://localhost:3000"

With SSL

http:
  routers:
    my-app-secure:
      rule: "Host(`app.local.test`)"
      service: my-app
      entryPoints:
        - websecure
      tls:
        certResolver: local

Entrypoints

NamePortProtocol
web80HTTP
websecure443HTTPS

Middleware

Basic Auth

http:
  middlewares:
    my-auth:
      basicAuth:
        users:
          - "admin:$apr1$..."
  routers:
    my-app:
      middlewares:
        - my-auth

Rate Limiting

http:
  middlewares:
    rate-limit:
      rateLimit:
        average: 100
        burst: 50

Best Practices

  1. Use labels - For Docker-based services
  2. Separate configs - One file per service
  3. Health checks - Monitor service availability
  4. Access logs - Enable for debugging

On this page