Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Deployment Issue] - Self Signed Certificate and Appending Captain to Server Domain. #1970

Open
TonyGibson opened this issue Dec 27, 2023 · 11 comments

Comments

@TonyGibson
Copy link

TonyGibson commented Dec 27, 2023

Hi all!

I'm currently trying to deploy a SvelteKit application and my GitHub Actions workflow seems to be failing because it's using a self-signed Caprover certificate during the build process (first image)

During deploying I can see it's appending 'captain' to my domain like this: 'captain.buildershield.server.buildershield.com.au' whereas in the tutorial it appends his 'appname' to the domain like this: 'appname.domain.com'

I can access the domain buildershield.server.buildershield.com.au and the certificate is valid (screenshots of both domains below).

I have my A records set up for the server subdomain as so, as well as a * on the root and the domain is managed from Hostinger.

The end goal here is to have the same app (a customer specific safety portal) running on unique sub-domains for each user like this: user1.buildershield.com.au, user2.buildershield.com.au etc...

I'm completely stumped and any help is greatly appreciated :)

image image image image

image

@maietta
Copy link

maietta commented Dec 27, 2023

You have to overcome the default self signed certificate by enabling SSL for the full caprover hostname.

I don't know if the LetsEncrypt service will issue an SSL cert with hostnames multiple levels deep, but it's worth trying.

@TonyGibson
Copy link
Author

Thanks @maietta! I'm looking at switching to an alternative like Render instead where I don't need to deal with these issues haha. Leaving it here in case anyone else runs into this issue.

@TonyGibson
Copy link
Author

For full transparency, I'm not a devops guy and this was a tough intro to how hard deployment can be. Really appreciate everything that has been done in this space.

Quicl update: Deplpyed to Render in the time between this message and the previous - 5 minutes or so. Really simple, less control, way less of a headache for me as the devops noob I am haha.

@githubsaturn
Copy link
Collaborator

@TonyGibson

The first step is to fully set up your CapRover so that you can access your caprover dashboard using captain.maybe.somthing.com - have you done this step?

@githubsaturn
Copy link
Collaborator

I tried to access your domain, but I see a cloudflare error. So looks like you've jumped a few steps.

image

@cmjoseph07
Copy link

@githubsaturn

I have been struggling with this for quite sometime trying to test out using CapRover and running into this exact same error message. However, my DNS passes the HTTPS check and I am able to go to login to the dashboard and setup HTTPS for the app.

image

When I attempt to troubleshoot and run commands like:

docker service logs captain-captain --since 5m --follow

There is nothing that is indicating this error. Is there something else I can log out to figure what is going on. I am using a this guide to setup everything. https://caprover.com/docs/ci-cd-integration/deploy-from-github.html

@githubsaturn
Copy link
Collaborator

@cmjoseph07 - what's the error you're facing? Can you access captain.domain.com on your browser?

@cmjoseph07
Copy link

cmjoseph07 commented Jun 17, 2024

@githubsaturn

I am facing the Error: self signed cert

Yes, I am about to login if I go to https://captain.devapp.[domain] and DNS is showing good. I used the captain server setup in which I selected devapp.[domain] for the domain on this setup which gave it SSL and allowed me to turn on HTTPS for my app. However, when I try to deploy from github like this example it I get this self signed cert error. It is a private repo but I did setup private reg like the guide here. https://caprover.com/docs/run-locally.html

@cmjoseph07
Copy link

cmjoseph07 commented Jun 17, 2024

Additionally I tried to not use caprover serverlogin and use caprover login, update the root domain and then enable HTTPS as run locally says but still get self signed cert issue on every build. If I do a curl -Iv https://captain.devapp.[domain], I get the cert verified as ok

@githubsaturn
Copy link
Collaborator

It is a private repo but I did setup private reg like the guide here. https://caprover.com/docs/run-locally.html

I am confused. What do you mean it's a private repo? The link you provided is about running locally on a local server, it has nothing to do with private or public repositories.

Can you share the actual domain name? You can email if you don't want to share on github.

@cmjoseph07
Copy link

@githubsaturn

I ended up just using the webhook instead of building it on github and pushing it to Caprover. It works fine now and everything is building smoothly. Sorry I meant to include the 'Deploy to Github' guide. I was trying to use both that and the local server setup together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants