Searched npx nx start stuck loading config variables database
Found 6 results
1 messages · Page 1 of 1 (latest)
Based on the logs you're showing, the server successfully loaded config from the database and fell back to env vars/defaults — that part actually completed fine. The startup is likely hanging on a step after that.
Here are the most common causes and things to check:
1. Check your environment variables
Make sure your .env file has the correct connection strings for both Redis and Postgres. Key variables to verify:
PG_DATABASE_URL=postgres://twenty:twenty@localhost:5432/default
REDIS_URL=redis://localhost:6379
2. Verify the services are actually accepting connections
Even if Redis and Postgres processes are running, they might not be accepting connections properly. Try:
# Test Postgres
psql -h localhost -p 5432 -U twenty -d default
# Test Redis
redis-cli ping
Redis should respond with PONG.
3. Check for port conflicts
Make sure nothing else is bound to the ports Twenty needs (3000 for frontend, 3000 for backend API, etc.).
4. Check if the database has been seeded/migrated
If this is a fresh setup, make sure you've run the database setup commands:
npx nx database:reset twenty-server
5. Look for additional output
Try running with more verbose logging:
DEBUG=* npx nx start
This should reveal where exactly the process is hanging after the config loading step.
The fact that it loaded 0 values from the DB and fell back to 84 env var defaults is normal for a fresh install — that's not the issue. The hang is likely a downstream connection or initialization problem.
Try those checks and let me know what you find.
These pages may help: