Setting up a tunnel to my NAS

Sorry for this n00b question. I'm having some issues, probably with my DNS records. * I have a wordpress site running in docker on my NAS * I have a cloudflare tunnel container up and running * In my cloudflare dashboard, I can see that it's connected * I can access my wordpress app localy I'm using Cloudflare for basically everything, but not the hosting of the domain. So I have changed my hosts nameservers to the ones from Cloudflare. When I set it up, I think it got all the DNS records automatically, but then when I set up the tunnel, I got this error message in attached. So now I removed all my records and I could save the configuration, but I guess I need to configure my DNS records somehow? Sorry if this is super confusing, this is not my area of expertise :S
No description
23 Replies
Alf
Alf3mo ago
This means there is already a dns record pointing to that domain, either a, aaaa, or a cname. Look for it, remove it, and try again. : D
joesoes
joesoes3mo ago
Thanks. I’ve gotten as far as everything should be fine, but now for some reason, my server (I think) adds the port number at the end of the domain name. Not sure why.
Alf
Alf3mo ago
Oh so like yoursite:port That should not be happening I believe Do you mind sharing your site where that happens
joesoes
joesoes3mo ago
stockholmunderhive.se
Alf
Alf3mo ago
Ok let me check
joesoes
joesoes3mo ago
This is btw the youtube guide I followed: https://www.youtube.com/watch?v=Q5dG8g4-Sx0. I had a chat with him, and he set up basically the same wordpress container and everything worked just fine for him. That makes me think that it must be some odd configuration on my NAS
Alf
Alf3mo ago
So it's supposed to be up in stockholmunderhive.se but instead it's up in stockholmunderhive.se:someport?
joesoes
joesoes3mo ago
Correct
Alf
Alf3mo ago
Can I see how you configured the tunnel?
joesoes
joesoes3mo ago
No description
joesoes
joesoes3mo ago
8171 is the port to the wordpress container
Alf
Alf3mo ago
In dns records, it's just a cname to a cloudflare site right
joesoes
joesoes3mo ago
Yepp
Alf
Alf3mo ago
Hm Did you install WordPress on your local machine via HTTP and before moving / configuring cloudflared tunnel? I'm using forums to help
joesoes
joesoes3mo ago
No, I just installed it in docker and then set up the tunnel I've tried to reinstall it, but no dice
joesoes
joesoes3mo ago
I don't think it's related to wordpress honestly. If I point to any other of my services on my NAS, those does not work either. I tried setting up a subdomain, <app name>.stockholmunderhive.se, then I get "bad gateway"
Chaika
Chaika3mo ago
probably just fun docker things. I'm no docker expert, I would try running curl with docker exec and seeing if it's reachable or not from the cloudflared container. If cloudflared is running in a container, the other container wouldn't be localhost whenever I've used docker in the past I've just set cloudflared up on the host and not containerized it to avoid some of that internal networking mess but I can see why people might not want to do that
joesoes
joesoes3mo ago
Thanks. I need to check that out. Not sure how exactly, but I’ll manage 🙂
Chaika
Chaika3mo ago
to execute inside of the container, something like:
docker exec smokeping curl https://127.0.0.1:8171 -vvv
Akama Aka
Akama Aka3mo ago
@joesoes is it fixed?
joesoes
joesoes3mo ago
It is. Not sure exactly what it was that solved it, but I bought a second domain and set up all their subdomains, removed their reverse proxies, then the first one started working as well 🤷🏻‍♂️
Akama Aka
Akama Aka3mo ago
Ah okay