caprover / caprover-cli

Command Line Interface for https://github.com/caprover/caprover
72 stars 40 forks source link

Setup issue with DNS for Caprover #71

Closed rishiosaur closed 3 years ago

rishiosaur commented 3 years ago

Hi!

I've been working on hosting my own Caprover instance over at o.rishi.cx, and accessing it works perfectly—I've set up my DNS config properly too (you can check the MX records). However, I keep getting a Verification Failed error, even though it looks like everything's just fine on the outside. What can I do to fix this?

image
rishiosaur commented 3 years ago

I think this might be a cache issue; that's the one thing I haven't tried out yet.

rishiosaur commented 3 years ago

Here's what my DNS records look like:

image
rishiosaur commented 3 years ago

Note: verification also isn't working through the web ui, so I think I might've set the dns wrong

githubsaturn commented 3 years ago

Who is your VPS provider? Do you have anything special with regards to your network config?

rishiosaur commented 3 years ago

@githubsaturn I'm running it using a reverse proxy on Raspberry pi; nothing out of the usual in terms of port forwarding

githubsaturn commented 3 years ago

I see. So yes, in that case the domain verification can fail. You need to make sure that captain.o.rishi.cx gets router to your rasberrypie if it's behind a NAT. You need to port forward 80/443 from your router to your RPie. When I visit captain.o.rishi.cx I see an nginx response which tells me the routing is not done right at your setup. You first need to be make sure the routing is done right. Then retry.

If the routing is done right, meaning that captain.o.rishi.cx points to your rasberry pie's CapRover page, and you still cannot verify your domain, then you can skip verification:

echo  "{\"skipVerifyingDomains\":\"true\"}" >  /captain/data/config-override.json
docker service update captain-captain --force

Note that this doesn't "fix" any routing problems if there is any. It just disables the extra verification that CapRover does. It is only useful if there is no problems other than CapRover not being able to verify its own domain - which can happen due to being behind a NAT/reverse proxy.