Total beginner here trying to install Cozy. I have a couple of questions.


#1

Hi! I have tried to install cozy-stack on Debian in a VM and I think I kinda got it right. I can access domains like drive.cozy.mydomain.com over HTTPS, and on those sites are an Nginx welcome screen. (?)

How do I install the actual applications on these subdomains? I don’t really understand how this works.

Also i can not reach the base domain. cozy.mydomain.com. Is there supposed to be anything there?

Thanks and any help is appreciated!


#2

Hi and welcome on Cozy !
Did you use cozy-coclyco ? Or install it by hand ?

Have you followed this documentation : https://docs.cozy.io/en/tutorials/selfhost-debian/#setup


#3

Yes i followed that tutorial!

I had some issues in the " ACME (Let’s Encrypt)" step but i run nginxproxymanager on my server so i got an SSL certificate from there.

I ran the “Create instances” and it seemed like it installed. I tried add-instance like photos and drive but they seem to already be installed.


#4

Oh, so you got certificates without the use of cozy-coclyco ?

the command :

cozy-coclyco create cozy.example.org me@example.org

provides SSL certificate generation as well as instance creation + deployment (home.cozy, photos.cozy, etc.).

What does this command return for you ?


#5

Aha, i see, so maybe, because it failed for me, it didn’t continue the installation?
Did it again and edited the nginx file.
I get this error:

requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://home.cozy.mydomain.com/.well-known/acme-challenge/CFUJm6UWwKuT-F1w_adCWz8wmLkCjRjcHSWnp-aUKls


#6

@cpique I posted an answer above


#7

I guess you have an issue with your nginx configuration.

Dont hesitate to post your Nginx config file

Maybe @Aeris and @Clochix will be able to help you


#8

Took it straight from the instructions:

server {
listen 80 default_server;
listen [::]:80 default_server;

root /var/www/html;
server_name _;

location /.well-known/acme-challenge/ {
    alias /etc/ssl/private/acme-challenge/;
}

location / {
    return 301 https://$host$request_uri;
}
}

#9

Hello!

Are you sure your DNS is correct and point to the right IP and on the right nginx?
You can’t have another nginx in front of the provided one by cozy with our standard setup.


#10

@aeris don’t know. I followed the exact steps exactly as stated. How could i check that? Thank you


#11

Steps we provide are only one related to Cozy software.
You have to set up correctly all others requirements, like buying a domain name, configuring your DNS to point it to your Cozy device, opening your firewall, configuring your modem NAT to forward traffic to your future Cozy device, etc.
Those points are too generic and depend of too much parameters that we can’t provide support to do that. Each of them must be addressed by the related provider (registrar, DNS provider, ISP…).


#12

@aeris So I have all the domains set up with my provider:

I have forwarded the ports 80/443 to the IP of the Debian VM. (also should not be a problem).


#13

These are the steps i did:

What am i missing?


#14

Don’t know, but here Let’s Encrypt is not able to join the nginx you set up.
And this is not really related to Cozy, but more to DNS or NAT or wrong nginx end point or…


#15

If you have multiple others domains, be sure to not have any other reverse proxy in front of your Cozy nginx.
We don’t officially support configuration without a Cozy nginx directly available on the Internet.


#16

These are not in the same Debian VM, they are on my unRAID server. The IPs are different and they have different port forwarding rules.

What do you mean with “in front of” ?


#17

You need to have your Cozy nginx directly available on the Internet, with no other reverse proxy in front of it.
Generally speaking, you need reverse proxying if you host multiple services on the same IP(v4) address.


#18

Have you tried this step :

  • You can regenerate the nginx vhost with
cozy-coclyco vhost <fqdn>

#19

Because LE seems not able to issue a certificate, vhost command will break the nginx because certificate not available and so nginx will refuse to start or reload…


#20

I did everything over again and for some reason, I got this instead:

requests.exceptions.ConnectionError: HTTPConnectionPool(host='cozy.mydomain.com', port=80): Max 
retries exceeded with url: /.well-known/acme-challenge/- 
aMtlH6SMuuGDQ7dWht8M07yNMXYJlATj9DWV0L8Eqo (Caused by 
NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f7686279470>: 
Failed to establish a new connection: [Errno -2] Name or service not known',))