- Docker & Docker Compose installed
- Ports available: 3000 (Web UI), 5000 (API), 5001 (DevPortal), 6379 (Redis)
git clone https://github.com/f5devcentral/NGINX-Declarative-API
cd NGINX-Declarative-API/contrib/docker-compose# Build all Docker images (first time only)
./nginx-dapi.sh -c build
# Start all services
./nginx-dapi.sh -c startExpected output:
-> Deploying NGINX Declarative API
NGINX Declarative API port: 5000
Web UI port: 3000
Developer Portal port: 5001
Redis port: 6379
[+] Running 5/5
✔ Network nginx-dapi_dapi-network Created
✔ Container redis Started
✔ Container nginx-dapi Started
✔ Container devportal Started
✔ Container nginx-dapi-webui Started
Open browser: http://localhost:3000
- Click "Create Config" in navigation
- Edit the JSON declaration
- Click "Create Configuration"
Example minimal config:
{
"output": {
"type": "nms",
"nms": {
"url": "https://nginx-manager.example.com",
"username": "admin",
"password": "yourpassword",
"instancegroup": "production"
}
},
"declaration": {
"http": []
}
}If default ports are in use:
./nginx-dapi.sh -c start -a 8080 -w 8081 -d 8082 -r 6380Then access Web UI at: http://localhost:8081
./nginx-dapi.sh -c stop# Web UI logs
docker logs nginx-dapi-webui
# API logs
docker logs nginx-dapi
# All logs
docker-compose -p nginx-dapi logs -f./nginx-dapi.sh -c stop
./nginx-dapi.sh -c build
./nginx-dapi.sh -c startError: Bind for 0.0.0.0:3000 failed: port is already allocated
Solution:
# Check what's using the port
lsof -i :3000
# Use custom port
./nginx-dapi.sh -c start -w 8080Issue: Web UI loads but can't connect to backend
Check:
- Verify nginx-dapi container is running:
docker ps - Check API logs:
docker logs nginx-dapi - Test API directly:
curl http://localhost:5000/docs
Solutions:
-
Check browser console for errors (F12)
-
Rebuild Web UI:
./nginx-dapi.sh -c stop docker rmi nginx-declarative-api-webui ./nginx-dapi.sh -c build ./nginx-dapi.sh -c start
Want to modify the Web UI?
cd webui
# Install dependencies
npm install
# Start dev server (hot reload)
npm run dev
# Run tests
npm test
# Build for production
npm run buildDev server runs at http://localhost:3000 with auto-reload.
- ✅ Login to Web UI
- ✅ Explore the Dashboard
- ✅ Create a test configuration
- 📖 Read the API v5.5 usage guide in
/USAGE-v5.5.mdfor API details - 📚 Check Web UI Documentation
- 🧪 Try the Postman collection in
/contrib/postman
- API Docs: Visit http://localhost:5000/docs for interactive API documentation
- Templates: Look in
webui/src/pages/CreateConfigPage.tsxfor example configurations - Docker Compose: See
contrib/docker-compose/docker-compose.yamlfor service configuration
Happy configuring! 🎉