Introduction
This guide covers making your deployed eCommerce Builder accessible to the public using your own domain and HTTPS.
By the end of this phase:
-
your domain will point to your server
-
HTTPS will be enabled
-
traffic will be securely proxied to your application
-
your site will be live and accessible to customers
Domain and DNS Setup
Your eCommerce Builder requires a domain name to be reachable by customers.
You can purchase domains from providers such as:
-
Namecheap
-
GoDaddy
-
Cloudflare
-
Google Domains
Step 1: Point Your Domain to Your Server
Log in to your domain registrar and locate the DNS settings for your domain.
Common locations:
-
Namecheap: Domain List → Manage → Advanced DNS
-
GoDaddy: My Products → DNS
-
Cloudflare: Select domain → DNS tab
Step 2: Create A Records
Create two A records pointing to your server’s IP address.
|
Host |
Type |
Value |
TTL |
|
@ |
A |
Your server IP |
Auto / 3600 |
|
www |
A |
Your server IP |
Auto / 3600 |
Example:
If your domain is myshop.com and your server IP is 192.0.2.100, both records should point to 192.0.2.100.
Important Note for Cloudflare Users
If you use Cloudflare:
-
Set both A records to DNS only
-
Ensure the orange cloud icon is disabled (grey)
Cloudflare’s proxy can prevent SSL certificates from being issued correctly.
Step 3: Wait for DNS Propagation
DNS changes usually propagate within 10–30 minutes, but may take up to 48 hours in rare cases. You can check propagation at:
Both the root domain and www should resolve to your server IP.
Reverse Proxy and HTTPS Setup (Caddy)
Your application runs internally on a local port and should not be exposed directly to the internet. A reverse proxy handles HTTPS and forwards requests securely.
Caddy is the recommended reverse proxy because it:
-
automatically provisions SSL certificates
-
renews certificates automatically
-
requires minimal configuration
Step 4: Install Caddy
On Ubuntu, install Caddy from the official repository:
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy
Verify Caddy is running:
sudo systemctl status caddy
Step 5: Configure Caddy
Edit the Caddy configuration file:
sudo nano /etc/caddy/Caddyfile
Replace the contents with:
yourdomain.com {
reverse_proxy localhost:8000
}
Replace yourdomain.com with your actual domain name.
Do not include http:// or www.
If your application runs on a different internal port, replace 8000 accordingly.
Save and exit the editor.
Step 6: Reload Caddy
Apply the configuration:
sudo systemctl reload caddy
Confirm Caddy is running - the status should be all green. If anything is red you have an error and need to investigate. See troubleshooting guide.
sudo systemctl status caddy
Step 7: Verify SSL Certificate
Caddy will automatically request and install an SSL certificate.
To view recent activity:
sudo journalctl -u caddy -n 50
You should see messages confirming successful certificate issuance.
Port Configuration
By default, the eCommerce Builder runs internally on port 8000.
If Port 8000 Is Already in Use
Check what is using the port: sudo lsof -i :8000
If another service is using it, choose an alternative internal port (for example 8010) and update:
-
The application startup configuration (systemd service)
-
The Caddy configuration: reverse_proxy localhost:8010
In your Caddyfile (Step 5) you add this instead
yourdomain.com {
reverse_proxy localhost:8010
}
Restart the application service and reload Caddy after making changes.
Firewall Configuration
Ensure your firewall allows required traffic:
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 22/tcp
sudo ufw enable
You do not need to open port 8000 externally.
Caddy handles all incoming traffic.
Testing the Installation
After completing the server configuration, perform the following checks.
Test 1: Homepage Loads
Visit: https://yourdomain.com
You should see your eCommerce Builder homepage with a secure HTTPS connection.
Test 2: Admin Panel Access
Visit: https://yourdomain.com/admin
Log in using your admin credentials.
Confirm the admin interface loads correctly.
Test 3: Static Files Load Correctly
Verify:
-
site styling is applied
-
admin interface is styled correctly
If styling is missing:
python manage.py collectstatic --no-input
Then hard refresh your browser.
Test 4: Database Write Test
In the admin panel:
-
Create a test page or blog post
-
Save it successfully
If content is saved correctly, the database is working.
Common Issues
Site Shows “502 Bad Gateway”
Ensure the application service is running:
sudo systemctl status ebuilder
Restart the service if needed:
sudo systemctl restart ebuilder
“Invalid HTTP_HOST Header” Error
Verify ALLOWED_HOSTS in your .env includes your domain
SSL Not Working
Confirm DNS has propagated
Reload Caddy: sudo systemctl reload caddy
Next Steps
With your server configured and HTTPS enabled, your site is now live. Congrats.
You are now ready to:
-
Configure site settings in the admin panel
-
Set up Stripe payment processing
-
Configure email delivery
-
Add products and content
-
Customize your store’s appearance
Refer to the Self-Hosted Quick Start guide - it has links to help you set that all up.