Configure a domain and HTTPS on CapRover

Procédure

To secure and customize access to CapRover, you need to link your domain name via a wildcard DNS record and enable the HTTPS certificate. CapRover is an open source application deployment platform (PaaS) that simplifies Docker container management on your server. This guide walks you step by step from a simple connection by IP address to a secure interface with your own domain name.

Steps

  1. Find your VPS's IPv4 address

    Log in to your LWS client area and click the Servers tab. In the summary table, find the line corresponding to your CapRover machine (with the green status indicating that the server is on) and note its public address shown in the Ipv4 column (for example 203.0.113.10).

    Configure a domain and HTTPS on CapRover
  2. Create the wildcard DNS record

    Go to the Domain(s) & Hosting(s) section, click Manage next to your domain, then access DNS zone management. Select the A type, enter *.caprover in the subdomain field, enter your VPS's IPv4 address in the destination field, then click Add.

    Configure a domain and HTTPS on CapRover
  3. Check DNS propagation

    Open a terminal on your computer and perform a ping test to captain.caprover.learnlws.fr (adjusting it to your domain). Make sure the command correctly resolves the IPv4 address of your server noted previously.

  4. Access CapRover via its IP address

    Open your web browser and go to http://IP_DE_VOTRE_VPS:3000 replacing it with your machine's IP. Enter your administrator password to log in to the dashboard.

  5. Set the Root Domain in CapRover

    In the CapRover admin interface, go to the Settings section and find the Change Root Domain box. Enter your root domain in the form caprover.learnlws.fr (without the captain prefix or the asterisk) and click the Update Domain button.

  6. Reconnect on the new subdomain

    Your browser is automatically redirected to http://captain.caprover.learnlws.fr. Log back in with your admin credentials to continue the configuration.

  7. Enable the Let's Encrypt SSL certificate

    In the CapRover settings, locate the HTTPS section and enter a valid email address for SSL renewal notifications. Then click Enable HTTPS to automatically generate and install the free Let's Encrypt certificate.

  8. Force secure HTTPS connections

    Reconnect to your dashboard via the secure URL https://captain.caprover.learnlws.fr. Go back to the domain settings and enable the Force HTTPS option to automatically redirect all HTTP requests to HTTPS.

Frequently asked questions

Why use a wildcard record (*.caprover)?

The wildcard allows CapRover to assign a unique subdomain to each new container or deployed application (for example mon-app.caprover.learnlws.fr) without having to manually create a new DNS record each time.

What should I do if Let's Encrypt certificate generation fails?

Check that DNS propagation is fully complete and that ports 80 and 443 are not blocked by a firewall. Let's Encrypt needs to query these ports on your server to validate domain ownership.

Do I need to change ports in the URL once HTTPS is enabled?

No, adding the domain and SSL certificate allows access to the interface through the standard web ports (80 and 443). Port 3000 is no longer needed in your address bar.

Can I use a subdomain other than caprover?

Yes, you are free to choose another term (for example apps.yourdomain.com). You will simply need to adapt the wildcard DNS record (*.apps) and the Root Domain entered in CapRover accordingly.

Does the Let's Encrypt SSL certificate renew automatically?

Yes, CapRover includes an automatic background renewal mechanism for all Let's Encrypt certificates installed on your domains and subdomains.

Useful links

help.lws.net/a/7946
Was this article helpful?

Yes

No

Read 1 times

Thank you! Feel free to ask questions about our documentation if you would like more information, and help us improve it.

Similar articles

A question about this article?

Ask the LWS team and the community. Answers are published after moderation.

Ask the LWS team and its community a question

GDPR: Controller: LWS-Ligne Web Services. Purpose: moderation and public publication of your question, possible notification of an answer. Legal basis: consent (Art. 6(1)(a) GDPR). Email retention: 90 days after notification, 12 months maximum without an answer. To exercise your rights, see the GDPR section of our Terms and Conditions.