swiftwave-org / swiftwave

Self-hosted lightweight PaaS solution to deploy and manage your applications on any VPS [Your own self-hosted Heroku, Vercel]
https://swiftwave.org
Apache License 2.0
439 stars 37 forks source link

bug: swiftwave core ssl generation issue #986

Open markwylde opened 2 months ago

markwylde commented 2 months ago

Describe the bug

When I run the swiftwave tls generate command, it just fails without giving any additional information.

$ swiftwave tls generate
✓ Local postgres server already running at port 3335
✓ Database migrated successfully
⇒ Already running swiftwave service will be used to solve http-01 challenge
unable to obtain certificate
✗ Failed to generate certificate

Can we add more information to the logging here?

Also, is there a way for me to just provide the certificate? Where does it look/store the keypairs?

Are you working on this issue?

No

tanmoysrt commented 2 months ago

Hi @markwylde , thanks for trying out swiftwave first of all.

Follow the steps, it might help you to resolve the issue -

  1. Please validate the dns records on your server for the specific domain. It might happen that dns records yet not poining correctly or cached on your server.
  2. If you are using cloudflare dns, try to set the mode to Direct instead of DNS. That will help in troubleshooting.
  3. As per the stack trace, it looks like proxy is already up. Although visit your server ip. If the proxy is setup perfectly, it should show a 505/504 error page.

    Sometimes, proxy fails to activate, common issue is some service is already running at port 80 or 443


If you want to put ssl cert manually follow this -

  1. Put the private key here -> /var/lib/swiftwave/cert/private.key
  2. Put the certificate here (it should contain full chain) -> var/lib/swiftwave/cert/certificate.crt

It's recommended to use swiftwave's ssl generator as it will handle renewal of ssl certs.