Hello,
I followed the getting started guide, how to install The Things Stack on localhost.
[localhost starting guide]
(Installing The Things Stack on Localhost - YouTube)
I created the self-signed certificats and installed docker desktop.
I changed “thethings.exemple.com” to my IP address.
When i run “docker-compose up” and enter my IP address in the navigator the login page appears.
As soon as i login i get :
Error ID: error:pkg/oauth:invalid_redirect_uri
Correlation ID: 7803a23229c34c38b0ef8359c1a5cd03
I am on Windows 10.
Here is my docker-compose.yml :
version: '3.7'
services:
# If using CockroachDB:
cockroach:
# In production, replace 'latest' with tag from https://hub.docker.com/r/cockroachdb/cockroach/tags
image: cockroachdb/cockroach:latest
command: start-single-node --http-port 26256 --insecure
restart: unless-stopped
volumes:
- ${DEV_DATA_DIR:-.env/data}/cockroach:/cockroach/cockroach-data
ports:
- "127.0.0.1:26257:26257" # Cockroach
- "127.0.0.1:26256:26256" # WebUI
# If using PostgreSQL:
# postgres:
# image: postgres
# restart: unless-stopped
# environment:
# - POSTGRES_PASSWORD=root
# - POSTGRES_USER=root
# - POSTGRES_DB=ttn_lorawan
# volumes:
# - ${DEV_DATA_DIR:-.env/data}/postgres:/var/lib/postgresql/data
# ports:
# - "127.0.0.1:5432:5432"
redis:
# In production, replace 'latest' with tag from https://hub.docker.com/_/redis?tab=tags
image: redis:latest
command: redis-server --appendonly yes
restart: unless-stopped
volumes:
- ${DEV_DATA_DIR:-.env/data}/redis:/data
ports:
- "127.0.0.1:6379:6379"
stack:
# In production, replace 'latest' with tag from https://hub.docker.com/r/thethingsnetwork/lorawan-stack/tags
image: thethingsnetwork/lorawan-stack:latest
entrypoint: ttn-lw-stack -c /config/ttn-lw-stack-docker.yml
command: start
restart: unless-stopped
depends_on:
- redis
# If using CockroachDB:
- cockroach
# If using PostgreSQL:
# - postgres
volumes:
- ./blob:/srv/ttn-lorawan/public/blob
- ./config/stack:/config:ro
# If using Let's Encrypt:
# - ./acme:/var/lib/acme
environment:
TTN_LW_BLOB_LOCAL_DIRECTORY: /srv/ttn-lorawan/public/blob
TTN_LW_REDIS_ADDRESS: redis:6379
# If using CockroachDB:
TTN_LW_IS_DATABASE_URI: postgres://root@cockroach:26257/ttn_lorawan?sslmode=disable
# # If using PostgreSQL:
# TTN_LW_IS_DATABASE_URI: postgres://root:root@postgres:5432/ttn_lorawan?sslmode=disable
ports:
# If deploying on a public server:
- "80:1885"
- "443:8885"
# - "1881:1881"
# - "8881:8881"
# - "1882:1882"
# - "8882:8882"
# - "1883:1883"
# - "8883:8883"
# - "1884:1884"
# - "8884:8884"
# - "1885:1885"
# - "8885:8885"
# - "1887:1887"
# - "8887:8887"
# - "1700:1700/udp"
# If using custom certificates:
secrets:
- ca.pem
- cert.pem
- key.pem
# If using custom certificates:
secrets:
ca.pem:
file: ./ca.pem
cert.pem:
file: ./cert.pem
key.pem:
file: ./key.pem
Here is my ttn-lw-stack-docker.yml :
# Identity Server configuration
# Email configuration for "192.168.1.146"
is:
email:
sender-name: 'The Things Stack'
sender-address: 'noreply@192.168.1.146'
network:
name: 'The Things Stack'
console-url: 'https://192.168.1.146/console'
identity-server-url: 'https://192.168.1.146/oauth'
# If sending email with Sendgrid
# provider: sendgrid
# sendgrid:
# api-key: '...' # enter Sendgrid API key
# If sending email with SMTP
# provider: smtp
# smtp:
# address: '...' # enter SMTP server address
# username: '...' # enter SMTP server username
# password: '...' # enter SMTP server password
# Web UI configuration for "192.168.1.146":
oauth:
ui:
canonical-url: 'https://192.168.1.146/oauth'
is:
base-url: 'https://192.168.1.146/api/v3'
# https server configuration
https:
cookie:
block-key: '' # generate 32 bytes (openssl rand -hex 32)
hash-key: '' # generate 64 bytes (openssl rand -hex 64)
metrics:
password: 'metrics' # choose a password
pprof:
password: 'pprof' # choose a password
# If using custom certificates:
tls:
source: file
root-ca: /run/secrets/ca.pem
certificate: /run/secrets/cert.pem
key: /run/secrets/key.pem
# Let's encrypt for "192.168.1.146"
# tls:
# source: 'acme'
# acme:
# dir: '/var/lib/acme'
# email: 'you@192.168.1.146'
# hosts: ['192.168.1.146']
# default-host: '192.168.1.146'
# If Gateway Server enabled, defaults for "192.168.1.146":
gs:
mqtt:
public-address: '192.168.1.146:1882'
public-tls-address: '192.168.1.146:8882'
mqtt-v2:
public-address: '192.168.1.146:1881'
public-tls-address: '192.168.1.146:8881'
# If Gateway Configuration Server enabled, defaults for "192.168.1.146":
gcs:
basic-station:
default:
lns-uri: 'wss://192.168.1.146:8887'
the-things-gateway:
default:
mqtt-server: 'mqtts://192.168.1.146:8881'
# Web UI configuration for "192.168.1.146":
console:
ui:
canonical-url: 'https://192.168.1.146/console'
is:
base-url: 'https://192.168.1.146/api/v3'
gs:
base-url: 'https://192.168.1.146/api/v3'
gcs:
base-url: 'https://192.168.1.146/api/v3'
ns:
base-url: 'https://192.168.1.146/api/v3'
as:
base-url: 'https://192.168.1.146/api/v3'
js:
base-url: 'https://192.168.1.146/api/v3'
qrg:
base-url: 'https://192.168.1.146/api/v3'
edtc:
base-url: 'https://192.168.1.146/api/v3'
oauth:
authorize-url: 'https://192.168.1.146/oauth/authorize'
token-url: 'https://192.168.1.146/oauth/token'
logout-url: 'https://192.168.1.146/oauth/logout'
client-id: 'console'
client-secret: 'console' # choose or generate a secret
# If Application Server enabled, defaults for "192.168.1.146":
as:
mqtt:
public-address: '192.168.1.146:1883'
public-tls-address: '192.168.1.146:8883'
webhooks:
downlink:
public-address: '192.168.1.146:1885/api/v3'
# If Device Claiming Server enabled, defaults for "192.168.1.146":
dcs:
oauth:
authorize-url: 'https://192.168.1.146/oauth/authorize'
token-url: 'https://192.168.1.146/oauth/token'
logout-url: 'https://192.168.1.146/oauth/logout'
client-id: 'console'
client-secret: 'console' # choose or generate a secret
ui:
canonical-url: 'https://192.168.1.146/claim'
as:
base-url: 'https://192.168.1.146/api/v3'
dcs:
base-url: 'https://192.168.1.146/api/v3'
is:
base-url: 'https://192.168.1.146/api/v3'
ns:
base-url: 'https://192.168.1.146/api/v3'