Domain Configuration

Instantly.run provides seamless public domain integration for all deployed containers. This page explains how to configure your domains and access your services.

Setting Up a Domain

  1. Create an A Record:

    • In your DNS hosting service, create an A record pointing your domain or subdomain to Instantly.run's public IP address: 34.34.69.80.

    Example for a subdomain app.example.com:

    • Name: app
    • Type: A
    • Value: 34.34.69.80
  2. Run the Deployment Command:

    • Ensure that your --domainname parameter matches the domain or subdomain configured in your DNS.

    Example:

    docker run --context=instantly --name my-container --domainname app.example.com \
    -e ENV_VAR=value -p 8080:80 -v ssd:/data
    
  3. Access Your Service:

    • After deployment, your service will be accessible at https://app.example.com.
    • HTTP traffic will automatically redirect to HTTPS.

Automatic SSL Certificates

  • Instantly.run automatically generates SSL certificates for all configured domains.
  • No manual configuration is required.
  • Certificates are renewed automatically.

Internal Networking

Each container is assigned an internal hostname derived from its domain, with dots replaced by hyphens. This is useful for non-HTTP services:

  • Public Domain: db.example.com
  • Internal Hostname: db-example-com

You can use the internal hostname for accessing services like databases within the same network.


Non-HTTP Services

While only HTTP services are exposed publicly on ports 80 and 443, non-HTTP services (e.g., databases) are still accessible internally using their internal hostname on the specified port.

Example:

# MongoDB Deployment
Internal Hostname: db-example-com
Port: 27017