kutt icon indicating copy to clipboard operation
kutt copied to clipboard

SITE_NAME does not work? (docker)

Open wef0rm opened this issue 9 months ago • 8 comments

Running this on docker with caddy. Everything seems to work, except for the site name. The site shows up empty.

image

EDIT: Also noticed that the site URL does not show on the site (under advanced) – just an empty dropdown list, but trying to add a domain in the settings panel gives me an error: You can't use the default domain

image

So something from the .env gets picked up. And e-mail works, etc. but it's not showing on the actual site.

Files:

.env file:

# general
TZ=Europe/Oslo
PUID=1000
PGID=1000

# App port to run on
PORT=3000

# The name of the site where Kutt is hosted
SITE_NAME=Test

# The domain that this website is on
DEFAULT_DOMAIN=link.domain.tld

# Generated link length
LINK_LENGTH=6

# Postgres database credential details
DB_HOST=postgres
DB_PORT=5432
DB_NAME=postgres
DB_USER=kutt
DB_PASSWORD=<pw>
DB_SSL=false

# Redis host and port
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=

# Disable registration
DISALLOW_REGISTRATION=true

# Disable anonymous link creation
DISALLOW_ANONYMOUS_LINKS=true

# The daily limit for each user
USER_LIMIT_PER_DAY=50

# Create a cooldown for non-logged in users in minutes
# Set 0 to disable
NON_USER_COOLDOWN=0

# Max number of visits for each link to have detailed stats
DEFAULT_MAX_STATS_PER_LINK=5000

# Use HTTPS for links with custom domain
CUSTOM_DOMAIN_USE_HTTPS=true

# A passphrase to encrypt JWT. Use a long and secure key.
JWT_SECRET=<redacted>

# Admin emails so they can access admin actions on settings page
# Comma seperated
[email protected]

# Invisible reCaptcha secret key
# Create one in https://www.google.com/recaptcha/intro/
RECAPTCHA_SITE_KEY=
RECAPTCHA_SECRET_KEY=

# Google Cloud API to prevent from users from submitting malware URLs.
# Get it from https://developers.google.com/safe-browsing/v4/get-started
GOOGLE_SAFE_BROWSING_KEY=

# Your email host details to use to send verification emails.
# More info on http://nodemailer.com/
# Mail from example "Kutt <[email protected]>". Leave empty to use MAIL_USER
MAIL_HOST=kuttsmtp
MAIL_PORT=25
MAIL_SECURE=false
[email protected]
[email protected]
MAIL_PASSWORD=

# The email address that will receive submitted reports.
[email protected]

# Support email to show on the app
[email protected]

docker-compose.yml

version: '3.7'

services:
  kutt:
    image: kutt/kutt
    depends_on:
      - postgres
      - redis
      - smtp
    command: ["./wait-for-it.sh", "postgres:5432", "--", "npm", "start"]
    #ports:
    #  - "3000:3000"
    networks:
      - web
      - backend
    env_file:
      - .env
    environment:
      PUID: ${PUID}
      PGID: ${PGID}
      TZ: ${TZ}
      DB_HOST: postgres
      DB_NAME: ${DB_NAME}
      DB_USER: ${DB_USER}
      DB_PASSWORD: ${DB_PASSWORD}
      REDIS_HOST: redis

  redis:
    image: redis:6.0-alpine
    networks:
      - backend
    volumes:
      - ./redis_data:/data

  postgres:
    image: postgres:12-alpine
    networks:
      - backend
    environment:
      PUID: ${PUID}
      PGID: ${PGID}
      TZ: ${TZ}
      POSTGRES_USER: ${DB_USER}
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_DB: ${DB_NAME}
    volumes:
      - ./postgres_data:/var/lib/postgresql/data

  smtp:
    image: ixdotai/smtp:latest
    container_name: kuttsmtp
    restart: always
    networks:
      - backend
    environment:
      PUID: ${PUID}
      PGID: ${PGID}
      TZ: ${TZ}
      RELAY_DOMAINS: :domain.tld

networks:
  web:
    name: web
    external: true
  backend:
    name: backend

wef0rm avatar Sep 12 '23 18:09 wef0rm

I confirm the same issue here . The site name is not displaying .

Tataukee avatar Sep 13 '23 14:09 Tataukee

Are there any developments underway on this entire project ?

Tataukee avatar Sep 28 '23 11:09 Tataukee

I think you have to set it in the settings page

rfedoruk avatar Oct 03 '23 01:10 rfedoruk

@rfedoruk in what level ? I can't see any input about that ! and what is the purpose of having that line in the beginning of the .env file ?

Tataukee avatar Oct 03 '23 07:10 Tataukee

I am not sure what the purpose of having that line is, I only recently self hosted this myself, but if you go into the settings page on an admin account, there is a place to add a custom domain, you can set that there. But I didn't and my links still work

rfedoruk avatar Oct 03 '23 17:10 rfedoruk

I have the same issue. The client part just seems to ignore all environment variables. The link in the terms of service is just https:// and redirects to undefined.

Baspla avatar Nov 07 '23 01:11 Baspla

The SITE-NAME is used for the Email signature. It looks like this: <SITE-NAME> | Free & open source URL shortener Which also points to your DEFAULT_DOMAIN.

However, when you visit the official website kutt.it, you see the name Kutt just right to the logo. I think it's their <SITE-NAME> and I guess this is a bug for docker version that the site-name is not shown in the self hosted version.

FallenAngel666 avatar Dec 08 '23 19:12 FallenAngel666