Own domain issues on namecheap to yunohost

Hello guys, I’m having a hard time trying to setup my own domain on yunohost.

I’ve followed all the instructions from the dns_config page and the admin’s page for mydomain recommend configuration to set namecheap’s dns to my yunohost’s services. After that ‘https://www.mydomain.net’ now takes me to yunohost’s admin, but without ‘www’ part it takes me nowhere and after installing nextcloud app, I am not able to access it anywhere, which should be on ‘https://mydomain.net/nextcloud’ and putting the ‘www’ part would take me again to yunohost’s admin page.

Can anyone please help?

So which domains did you register / add in yunohost ? Did you add mydomain.net, www.mydomain.net, or both ?

Just mydomain.net, as I understood from the docs? Should I also do something for www.mydomain.net ? What to add to the dns conf?

If you want to be able to access your server on that address, yes. Otherwise, the server (nginx) acts as it does not know this domain (even though it knows yourdomain.tld)

Keep in mind that for YunoHost, there’s no concept of domain and subdomains, for “domain.tld” and “www.domain.tld” are just like two different domains with no relationship. So if you install nextcloud on domain.tld, it won’t be available via www.domain.tld anyway. Though you can setup a redirection from www.domain.tld to domain.tld …

In terms of DNS setup, I don’t think you have anything more to do apart from adding a A record for www or * (wildcard) poiting to your IP adress. This is among the stuff recommended in the doc so maybe you already did it :wink:

Regarding your nextcloud not being accessible, that’s probably a different issue, but let’s already confirm that we understand the www thing

First of all, thanks for you reply.

As I mentioned I did this [1] for mydomain.net (without ‘www’) on Namecheap. So you say I should add www.mydomain.net on yunohost’s admin interface only? I should not do anything on namecheap’s side for now right?

OK I managed to get nextcloud working. I just needed to add a new domain on yunohost (cloud.mydomain.net) and install on it.
I was not sure I should be adding this subdomains (www, cloud, etc) via yunohost interface, that’s were I missed the point.
Thanks for showing me the right directions.
Feel free to add additional comments for improving my actual DNS clueless state i live in :).

1 Like

Hello again,

now for emails, I can get a working email service configuring the address ‘email@cloud.mydomain.net’ but can’t for ‘email@mydomain.net’ which is what I really want…When sending an email to this address I get this error:

DNS Error: 5990009 DNS type ‘mx’ lookup of mydomain.net responded with code NXDOMAIN Domain name not found: mydomain.net

What should be the DNS config?

OK, i managed to solve it. This was due to a configuration problem on namecheap. CNAME records were inverted host-value and for hostname instead of @ had to put mydomain.net because for them @ only works in a host field.

Hello Aleprovencio! I’m trying to configure YunoHost using a NameCheap domain, and I see you managed. Perhaps you could help me a bit? I have set the recommended DNS records, but when I try to generate the Let’s Encrypt certificate, I get “Exception: [Errno 22] Signing the new certificate failed”.

Following yunohost.org/#/certificate_en, I have tried:

How did you manage to make NameCheap work?

Please provide the full log (ideally with the command ran with --debug) :s

Hi Aleks.
I run this: yunohost domain cert-install my.domain --no-checks
Then I get this:

  • Error: Wrote file to /tmp/acme-challenge-public/LONG–STRING, but couldn’t download http://my.domain/.well-known/acme-challenge/LONG-STRING

  • Warning: Debug information:
    ** domain ip from DNS my.IP.address
    ** domain ip from local DNS my.IP.address
    ** public ip of the server my.IP.address

  • Warning: Debug information:
    ** domain ip from DNS 192.64.119.196
    ** domain ip from local DNS my.IP.address
    ** public ip of the server my.IP.address

Thank you for looking into this. What would you recommend?

Are you able to access your server from outside your local network ? Have you checked that your ports are correctly forwarded ?

Good eye, Aleks. I cannot access from outside the local network, and I thought that this was due to the certificate error. This is what I have tried:

  • port-forwarding rules don’t open ports 80 nor 443 (ISP most likely blocks them)
  • in my home router, placing the server on the DMZ opens all ports except 80 and 443
  • in the server, I opened 8080 and 4433
  • in the server, I replaced 80 and 443 with 8080 and 4433 in my.domain.conf
  • in the DNS records, I created a redirect URL record to mydomain:8080
  • in the server, in /etc/hosts/, I have tried replacing the 127.0.0.1 or 127.0.1.1 values with my.domain, as suggested here
  • I am also aware that changing 443 for another value can be a problem, as suggested here

In sum: ISP blocks ports 80 and 443, I have failed at opening or changing these ports, cannot access the server from outside the local network. I found threads about how to use different ports, such as this, but have had no luck. Any advice or documentation on how to handle this “port 80 blocked” problem would be largely appreciated!

Configuration:

  • raspberry pi 3
  • up-to-date yunohost version
  • NameCheap domain with recommended DNS records

Hmmm well if your ISP blocks 80 and 443, I would say you should use a VPN… Trying to change the port is not a good idea, you don’t want to have to tell your visitors that they should go to domain.tld:8080 instead of just domain.tld (though that might depend on the purpose of your server)

Noted, I will proceed as you suggest. Thank you for taking the time to go through my comments and replying so fast. This forum is great.

1 Like