Hi all, I've been trying to deploy the stack using the docker-compose YAML file, as shown in the "how to get started" guide

Hi wasn,

Thanks for the response but that wasn’t the case for us. :grin:

@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?

Thanks alot!!!

I am assuming that you have generated a secret for this:

- TTN_LW_CONSOLE_OAUTH_CLIENT_SECRET=<gen_secret> # generate a good one (openssl rand -hex 32)

But this needs to be the same secret used when you create the oauth client for the console, i.e.

docker-compose run --rm stack is-db create-oauth-client \
  --id console \
  --name "Console" \
  --owner admin \
  --secret <gen_secret>\
  --redirect-uri "https://thethings.example.com/console/oauth/callback" \
  --redirect-uri "/console/oauth/callback"

Hi flufybucket,
I did what you said and I still get the same error:

image

Try and clear cookies and the cache. Just in case it has saved some old token.

Sorry but I wrote it wrong the previus message, I get a different error “Bad Request”. I’ll try to clear the coockies and cache.

I’ve try it. The left window is right after clearing the cookies and cache. The right one is just in incognito mode. Why are they different errors?

image

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.

1 Like

Hi kersing,

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

I am trying to get you rethink your assumptions.

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.

1 Like

@agispert just try what @fluffybucket explained.
use the ip of your server instead of the domain name.

@agispert you could also increase the log level to “debug”, it might provide you with more info about the issue.
Append the following to your docker-compose.yml under the environment: tag (ref: 1):
TTN_LW_LOG_LEVEL=debug

Hey @agispert had you solved your issue. I’m facing same issue while login through console. I’m able to login using CLI and can use CLI commands for now. But at the Console side part facing same issue as you.
Please let me know if you already tackled that issue. and if there is another suggestions.

Thanks in advance.
Sagar

Hi @sagar, no I have not solved the issue. Sorry about that. :expressionless:

Thanks for reply. I also did’t got any solution. if am able to resolve that I’ll let you know and if you got solution please let me know.

Thanks

This topic was automatically closed after 30 days. New replies are no longer allowed.