Hello folks, I have Ghost CMS self hosted and Mailgun setted up, it is all working good, but I have an issue with the transctional emails.
When a user signs in, it gets this mail:
The link attached to the “Sign In now“ black button is broken, my domain is blog.kapeka.dev, and I do not why ghost is using email.blog.kapeka.dev, which does not exists.
Also I tried using the button link but pointing to my correct domain (blog.kapeka.dev) but I get a 404 error, so I do not know where it is supossed to point the sign up button callback.
The magic link from the bottom it is working as expected, but users will tend to click the button and get an error, and not all users will try to use the bottom link so I want to solve this.
My .env:
# Use the below flags to enable the Analytics or ActivityPub containers as well
COMPOSE_PROFILES=analytics,activitypub
# Ghost domain
# Custom public domain Ghost will run on
DOMAIN=blog.kapeka.dev
# Ghost Admin domain
# If you have Ghost Admin setup on a separate domain uncomment the line below and add the domain
# You also need to uncomment the corresponding block in your Caddyfile
#ADMIN_DOMAIN=
# Database settings
# All database settings must not be changed once the database is initialised
DATABASE_ROOT_PASSWORD=redacted
# DATABASE_USER=optionalusername
DATABASE_PASSWORD=redacted
# ActivityPub
# If you'd prefer to self-host ActivityPub yourself uncomment the line below
ACTIVITYPUB_TARGET=activitypub:8080
# Tinybird configuration
# If you want to run Analytics, paste the output from `docker compose run --rm tinybird-login get-tokens` below
TINYBIRD_API_URL=https://api.europe-west2.gcp.tinybird.co
TINYBIRD_WORKSPACE_ID=redacted
TINYBIRD_ADMIN_TOKEN=redacted
TINYBIRD_TRACKER_TOKEN=redacted
# Ghost configuration (
)
# SMTP Email (
)
# Transactional email is required for logins, account creation (staff invites), password resets and other features
# This is not related to bulk mail / newsletter sending
MAIL_TRANSPORT=SMTP
MAIL_OPTIONS_HOST=smtp.mailgun.org
MAIL_OPTIONS_PORT=587
MAIL_OPTIONS_SECURE=false
MAIL_OPTIONS_AUTH_USER=no-reply@blog.kapeka.dev
MAIL_OPTIONS_AUTH_PASS=redacted
MAIL_FROM="Kapeka's Blog <no-reply@blog.kapeka.dev>"
# Advanced customizations
# Force Ghost version
# You should only do this if you need to pin a specific version
# The update commands won't work
# GHOST_VERSION=6-alpine
# Port Ghost should listen on
# You should only need to edit this if you want to host
# multiple sites on the same server
# GHOST_PORT=2368
# Data locations
# Location to store uploaded data
UPLOAD_LOCATION=./data/ghost
# Location for database data
MYSQL_DATA_LOCATION=./data/mysql
# Configuration imported from existing Ghost install at /var/www/kapeka
security__staffDeviceVerification=false
And my compose service:
ghost:
# Do not alter this without updating the Tinybird Sync container as well
image: ghost:${GHOST_VERSION:-6-alpine}
restart: always
expose:
- "127.0.0.1:${GHOST_PORT:-2368}:2368"
# This is required to import current config when migrating
env_file:
- .env
environment:
NODE_ENV: production
url: https://${DOMAIN:?DOMAIN environment variable is required}
admin__url: ${ADMIN_DOMAIN:+https://${ADMIN_DOMAIN}}
database__client: mysql
database__connection__host: db
database__connection__user: ${DATABASE_USER:-ghost}
database__connection__password: ${DATABASE_PASSWORD:?DATABASE_PASSWORD environment variable is required}
database__connection__database: ghost
tinybird__tracker__endpoint: https://${DOMAIN:?DOMAIN environment variable is required}/.ghost/analytics/api/v1/page_hit
tinybird__adminToken: ${TINYBIRD_ADMIN_TOKEN:-}
tinybird__workspaceId: ${TINYBIRD_WORKSPACE_ID:-}
tinybird__tracker__datasource: analytics_events
tinybird__stats__endpoint: ${TINYBIRD_API_URL:-https://api.tinybird.co}
mail__options__host: ${MAIL_OPTIONS_HOST:-}
mail__options__port: ${MAIL_OPTIONS_PORT:-}
mail__options__secure: ${MAIL_OPTIONS_SECURE:-}
mail__options__auth__user: ${MAIL_OPTIONS_AUTH_USER:-}
mail__options__auth__pass: ${MAIL_OPTIONS_AUTH_PASS:-}
mail__from: ${MAIL_FROM:-}
mail__transport: ${MAIL_TRANSPORT:-}
volumes:
- ${UPLOAD_LOCATION:-./data/ghost}:/var/lib/ghost/content
depends_on:
db:
condition: service_healthy
tinybird-sync:
condition: service_completed_successfully
required: false
tinybird-deploy:
condition: service_completed_successfully
required: false
activitypub:
condition: service_started
required: false
networks:
- ghost_network
