| name | reset-local-env |
| description | Reset Auth9 local Docker development environment to a clean state. |
Reset Local Environment Skill
Reset Auth9 local Docker development environment.
When to Use
Use this when:
- Need to reset local environment
- Need to clean Docker state
- Fixing dirty data issues
- Starting fresh with a clean development setup
- Encountering persistent errors after code changes
- Database schema changes require clean migration
- OIDC engine configuration is corrupted
- Testing fresh installation flow
- Switching between branches with incompatible changes
Quick Start
Run the reset script to get a clean local environment:
./scripts/reset-docker.sh
This script performs:
- Stop and remove all containers
- Remove project images (force rebuild)
- Remove volumes (clean data)
- Build all images from scratch
- Start all services
Initial Credentials
After reset, use these credentials:
Manual Steps (if script unavailable)
cd /path/to/auth9
COMPOSE_FILES="-f docker-compose.yml -f docker-compose.observability.yml"
docker-compose $COMPOSE_FILES down --remove-orphans
docker rmi auth9-auth9-core auth9-auth9-portal
docker volume rm auth9_tidb-data auth9_redis-data auth9_prometheus-data auth9_grafana-data auth9_loki-data auth9_tempo-data
docker-compose $COMPOSE_FILES build --no-cache
docker-compose $COMPOSE_FILES up -d
sleep 30
docker-compose $COMPOSE_FILES ps
Service Ports
| Service | Port | Purpose |
|---|
| auth9-portal | 3000 | Admin dashboard |
| auth9-core | 8080 | REST API + /metrics |
| auth9-core | 50051 | gRPC |
| auth9-oidc | — | Built-in OIDC engine |
| tidb | 4000 | Database |
| redis | 6379 | Cache |
| prometheus | 9090 | Metrics collection |
| grafana | 3001 | Dashboards |
| loki | 3100 | Log aggregation |
| tempo | 3200/4317 | Distributed tracing |
Verification Steps
After reset, verify services are healthy:
docker-compose ps
curl http://localhost:8080/health
curl http://localhost:3000
docker exec auth9-tidb mysql -e "SHOW DATABASES;"
docker exec auth9-redis redis-cli ping
Common Issues
Containers won't start
docker-compose logs
docker logs auth9-core
Port conflicts
lsof -i :3000
lsof -i :8080
lsof -i :4000
Volume permission issues
docker volume ls
sudo docker volume rm auth9_tidb-data auth9_redis-data auth9_prometheus-data auth9_grafana-data auth9_loki-data auth9_tempo-data