It seems that I am not getting the certificates from Lets Encrypt, I also do not get any logs or output regarding it. But changing all URLs to HTTP solves it, at least for now.
I’ve been trying what you suggested but it has not worked for me. Changing all URLs to HTTP still returns the same “internal server error”. Using HTTPS still fails.
I have some doubts regarding Let’s Encrypt that are not addressed at all in the Getting Started guide. For what I’ve read, I understand Let’s Encrypt works (basically) by making sure the domain belongs to the person requesting the certificate.
If that’s so, then how can I prove the domain thethings.example.com belongs to me when it does not exist? I’ve tried adding an entry to my local /etc/hosts file so that thethings.example.com forwards to my local machine, but this has not worked. Do I really need to own a domain? How else can I make Let’s Encrypt work?
You can not. You need a valid domain name with a system that can be reached from the internet to use let’s encrypt.
You also need to modify the file and substitute thethings.example.com with your own valid name for things to work.
So, you mean a domain name needs to be registered for me to complete the “Getting Started” guide? This is not stated anywhere in the guide. Moreover, it is stated in the Configuration section that, and I quote, “In this guide we’ll set environment variables in the docker-compose.yml file to configure The Things Stack as a private deployment on thethings.example.com.”.
@agispert could you post your docker-compose.yml file?
Also, you could just use an IP instead of a domain name, as a domain name will get resolved to an IP anyway. You can also try and redo the docker-compose run --rm stack is-db create-oauth-client step for the console and see if you entered the correct secret.
Hi fluffybucket,
Here you have my docker-compose.yml.
About the secret, in the logs it says that there is none defined and that it generates one. Is that the problem?
Without looking at what the two different requests actually sends, it is hard to know exactly. But I expect that in your cache there is some old token stored that it is using (for oauth). And in the incognito, it does not use that.
I can only think that there has been some configuration error, try and redo everything from scratch.
I have redone the configuration many times. Is there any step that has to be done and is not in the guide? Is anything that I’m forgetting in the docker-compose.yml?
I was looking at your docker-compose-yml file. I did not use any of the ${DEV_DATA_DIR:-.env/data} instead I set them explicit. i.e. ./data/cockroach:/cockroach/cockroach-data. They do it explicitly in the guide as well, other than that I can’t see anything in particular.
Quick sanity check:
All the containers have started and are healthy.
You can find entries in the DB about the added user and OAuth clients
The word example does not provide a hint to you that these are example settings that will not work in real life? As you found example.com does not work with let’s encrypt because you don’t own it.
So for use with let’s encrypt you need to substitute the hostname with one you own.
First of all, there’s no need to be mean. The truth is that the tutorial and the logs of the containers leave a lot of unanswered questions and are as ambiguous as they can get. What is this 500 “Internal Server Error” I’m getting? I would not know solely based on the logs. There’s no info online either.
Second, do I really need to own a domain to follow a tutorial? Is it really that crazy that I need to ask this when there is no mention of this fact in the tutorials? I’m just trying to test the TTN stack, I’m not willing to buy a domain, and the self-signed certificates do not seem to work either. Maybe the problem is completely unrelated to the certificates stuff, but again, how would I know?
So let me put it straight: How can I deploy the TTN stack using Docker Compose, with or without HTTPS, without the need of having a domain?
Thank you so much @fluffybucket for your honest help, I’ll try that out ASAP
The tutorial has been written by developers that are very busy creating software you get for free. However as this is an open source project anyone, including you, can help by providing updates and additional documentation. Feel free to help improve the tutorial as you seem know what information is lacking.