Damp

Custom Domains

Beautiful local domains for every project with automatic hosts file management

DAMP gives every project its own beautiful local domain using the Windows hosts file. Access your sites with clean URLs like myapp.local instead of localhost:8080.

Automatic Domain Management

DAMP generates custom domains for each project and automatically manages your Windows hosts file - no manual editing required.

How It Works

When you create a new site named "myapp", DAMP automatically:

Generates Domain

Creates myapp.local domain for your project

Updates Hosts File

Adds entry to Windows hosts file pointing to 127.0.0.1

Configures Caddy

Sets up reverse proxy from domain to your container

Ready to Use

Access your site at https://myapp.local immediately!

Default .local Domain

By default, DAMP uses the .local top-level domain:

Project Name: myapp

Generated Domains:
  • https://myapp.local       (main site)
  • https://vite.myapp.local  (Vite dev server for React/Vue)

Why .local?

The .local TLD is reserved for local networks and won't conflict with real internet domains. It's perfect for development!

Benefits

Clean URLs

Use memorable URLs like blog.local instead of localhost:3000

Multiple Projects

Run many projects simultaneously, each with its own domain

Production-Like

Test with real domain names, not ports and localhost

Automatic Setup

No manual hosts file editing - DAMP handles everything

Domain Features

Automatic Hosts File Management

DAMP uses the hostie utility to manage your Windows hosts file:

127.0.0.1   myapp.local
127.0.0.1   vite.myapp.local
127.0.0.1   blog.local
127.0.0.1   vite.blog.local
127.0.0.1   shop.local
127.0.0.1   vite.shop.local
  • Automatic Addition - Domains added when sites are created
  • Automatic Removal - Domains cleaned up when sites are deleted
  • Admin Privileges - Uses UAC elevation for secure modification
  • Safe Operations - No manual editing or typos

UAC Prompt Expected

When creating or deleting sites, you'll see a UAC (User Account Control) prompt. This is normal - DAMP needs administrator permission to modify the hosts file.

Vite Dev Server Support

For React, Vue, and other Vite-based projects, DAMP creates an additional domain:

Main Site:        https://myapp.local       → PHP/Laravel
Vite Dev Server:  https://vite.myapp.local  → React/Vue Hot Reload

This allows you to:

  • Access backend API at myapp.local
  • Access frontend at vite.myapp.local
  • Keep hot module reloading working
  • Maintain separate HTTPS certificates

Customizable Domain Extension

Want to use a different domain extension? You can configure it!

Change Default Domain

Open Settings

Navigate to Settings → General in DAMP

Set Custom Domain (Coming Soon)

Enter your preferred domain extension (e.g., .dev, .test, .localhost)

Apply to New Sites

New sites will use your custom domain extension

Future Feature

Custom domain configuration is coming in a future update. Currently, all projects use .local by default.

How Domains Resolve

Here's the complete flow when you access myapp.local:

1. Browser Request
   └─> User types: https://myapp.local


2. DNS Resolution
   └─> Windows checks hosts file
   └─> Finds: 127.0.0.1 myapp.local


3. Local Connection
   └─> Browser connects to localhost:443


4. Caddy Reverse Proxy
   └─> Caddy receives request
   └─> Forwards to: myapp_devcontainer:8080


5. Your Application
   └─> PHP app responds


6. Response
   └─> Caddy returns response to browser ✅

Multi-Site Benefits

With custom domains, running multiple projects is seamless:

Running Projects:
  🌐 portfolio.local      (PHP 8.2 + MySQL)
  🌐 blog.local           (PHP 8.1 + MySQL)
  🌐 shop.local           (PHP 8.3 + PostgreSQL)
  🌐 api.local            (PHP 8.2 + Redis)

Each project:

  • Has its own unique domain
  • Runs in isolation
  • Uses different PHP/database versions
  • Can be accessed simultaneously

Cleanup on Delete

When you delete a site, DAMP automatically:

  1. ✅ Removes domain from hosts file
  2. ✅ Removes vite subdomain from hosts file
  3. ✅ Updates Caddy configuration
  4. ✅ Stops and removes containers
  5. ✅ Cleans up Docker volumes (if requested)

No Manual Cleanup

DAMP handles all domain management automatically - you never need to manually edit the hosts file.

Troubleshooting


Need Help?

If you're experiencing domain resolution issues, check the DAMP troubleshooting guide or open an issue on GitHub.