Troubleshooting

Quick fixes for the most common issues. If your problem isn't listed, ask on Discord.

Docker & Setup

Docker containers won't start (port in use)

Another process is using the same port. Change the port in .env (e.g. FRONTEND_PORT=3001) then restart:

docker compose up -d
Backend returns 500 on first request

The app key wasn't generated. Run:

docker compose exec backend php artisan key:generate
docker compose exec backend php artisan optimize:clear
Database connection refused

PostgreSQL may still be starting — wait a few seconds and retry. Check the logs and verify credentials match between root .env and backend/.env:

docker compose logs postgres
Blank page or hydration error

Clear the Next.js cache and restart:

docker compose exec frontend rm -rf .next
docker compose restart frontend

Stripe & Google OAuth

Stripe webhooks not received locally

You need the Stripe CLI running in a separate terminal:

stripe listen --forward-to localhost:8000/api/stripe/webhook

Copy the whsec_xxx output into STRIPE_WEBHOOK_SECRET in backend/.env.

Google OAuth redirect mismatch

The redirect URI in Google Cloud Console must match exactly. No trailing slash, correct protocol:

  • Local: http://localhost:8000/api/auth/google/callback
  • Prod: https://api.yourdomain.com/api/auth/google/callback

localhost and 127.0.0.1 are treated as different origins by Google.

Emails not showing in Mailpit

Make sure backend/.env uses the Docker service name, not localhost:

MAIL_HOST=mailpit
MAIL_PORT=1025

CLI & Modules

Module removal broke something

First, check what changed and find the error:

git diff
cd frontend && npx tsc --noEmit
docker compose exec backend php artisan test

If the error is deep, git stash your changes and re-run npx stacktura init from a clean state.

Still stuck?

Join the Discord community. Describe what you were doing, paste the error, and mention which modules you have enabled.

Architecture

Documentation

Ready to build your SaaS?

Full source code, all modules, lifetime updates.

Get Stacktura — $249