Quick Start
Get up and running with Easy AppServer in under 15 minutes.
What is Easy AppServer?
Easy AppServer is a central orchestration platform for microservice applications (backend and frontend). It provides:
- Application Lifecycle Management - Register, install, and orchestrate microservices
- Identity & Authorization - Built-in user management (Ory Kratos) and fine-grained permissions (OpenFGA)
- OAuth2/OIDC - Complete OAuth2 provider via Ory Hydra
- Microfrontend Platform - Module Federation, Web Components, and ESM module support
- Multiple APIs - gRPC, GraphQL (with subscriptions), and HTTP REST
- Event-Driven Architecture - RabbitMQ-based event bus for async communication
- Observability - Complete telemetry stack with Prometheus, Loki, Tempo, and Grafana
Prerequisites
Before you begin, ensure you have:
- Docker & Docker Compose - For running infrastructure services
- Go 1.22+ - For building and running the appserver
- Git - For cloning the repository
- Make (optional) - For using convenience commands
Setup Steps
1. Clone and Setup
Clone the repository and run the automated setup script:
git clone <repository-url>
cd easy.appserver
./docker/scripts/setup.sh
The setup script will:
- Create
.envfile from.env.example - Start PostgreSQL
- Run database migrations for all schemas (kratos, hydra, openfga, appserver, shell, partner)
- Start all core services
- Initialize OpenFGA with 4 base roles: easy, admin, advertiser, publisher
2. Configure Secrets
IMPORTANT: Before proceeding, update the secrets in docker/.env:
# Must be exactly 32 characters
KRATOS_SECRETS_COOKIE=changeme-32-char-secret-cookie-key
KRATOS_SECRETS_CIPHER=changeme-32-char-secret-cipher-k
# Strong secrets
HYDRA_SYSTEM_SECRET=changeme-change-this-system-secret-key
HYDRA_PAIRWISE_SALT=changeme-pairwise-salt-key
POSTGRES_PASSWORD=changeme-in-production
3. Start Infrastructure Services
Start all infrastructure services with Docker Compose:
make docker-up
# Or manually:
docker-compose -f docker/docker-compose.yml up -d
This starts:
- PostgreSQL - Shared database
- Redis - Cache & session store
- RabbitMQ - Message broker & event bus
- Kratos - Identity and user management
- Hydra - OAuth2/OIDC provider
- OpenFGA - Fine-grained authorization
- Oathkeeper - Identity & access proxy
- Telemetry Stack - OpenTelemetry Collector, Prometheus, Loki, Tempo, Grafana
4. Start the AppServer
Set environment variables and run the appserver:
# Set environment variables
export APPSERVER_DB_HOST=localhost
export APPSERVER_DB_PORT=5432
export APPSERVER_DB_USER=appserver
export APPSERVER_DB_PASSWORD=changeme-in-production
export APPSERVER_DB_NAME=appserver
export APPSERVER_KRATOS_PUBLIC_URL=http://localhost:4433
export APPSERVER_OPENFGA_API_URL=http://localhost:8090
export APPSERVER_SETTINGS_ENCRYPTION_KEY=changeme-32-char-encryption-key
# Run appserver (v2 starts directly without subcommands)
go run cmd/appserver-v2/main.go
Or using Makefile (uses legacy CLI with serve subcommand):
make run
5. Verify Installation
Check that all services are running:
# AppServer health check
curl http://localhost:8080/health
# AppServer readiness check
curl http://localhost:8080/ready
# Check Docker services
docker ps
# View logs
make docker-logs
Service URLs
Once everything is running, you can access:
Core Services
| Service | URL | Purpose |
|---|---|---|
| Kratos Public | http://localhost:4433 | User-facing identity APIs |
| Kratos Admin | http://localhost:4434 | Admin identity management |
| Hydra Public | http://localhost:4444 | OAuth2 authorization server |
| Hydra Admin | http://localhost:4445 | OAuth2 admin APIs |
| OpenFGA API | http://localhost:8090 | Authorization API |
| OpenFGA gRPC | http://localhost:8091 | Authorization gRPC |
| OpenFGA Playground | http://localhost:8090/playground | Authorization testing UI |
| Oathkeeper Proxy | http://localhost:4455 | Access control proxy |
| Oathkeeper API | http://localhost:4456 | Proxy configuration |
| PostgreSQL | localhost:5432 | Database |
| Redis | localhost:6379 | Cache |
| RabbitMQ | localhost:5672 | Message broker |
| RabbitMQ Management | http://localhost:15672 | Queue management UI (guest/guest) |
| AppServer HTTP | http://localhost:8080 | Main HTTP API |
| AppServer GraphQL | http://localhost:8080/graphql | GraphQL API |
| AppServer gRPC | localhost:9090 | gRPC API |
Observability Services
| Service | URL | Credentials |
|---|---|---|
| Grafana | http://localhost:3000 | admin/admin |
| Prometheus | http://localhost:9090 | - |
| Loki | http://localhost:3100 | - |
| Tempo | http://localhost:3200 | - |
| OTel Collector (gRPC) | localhost:4317 | - |
| OTel Collector (HTTP) | http://localhost:4318 | - |
What's Running?
Your local environment now includes:
Identity & Authorization:
- Ory Kratos for user identity management
- Ory Hydra for OAuth2/OIDC flows
- OpenFGA for fine-grained permissions (with 4 base roles: easy, admin, advertiser, publisher)
- Oathkeeper for access control proxy
Storage & Messaging:
- PostgreSQL with 6 schemas (kratos, hydra, openfga, appserver, shell, partner)
- Redis for caching and session storage
- RabbitMQ for event-driven messaging
Observability:
- OpenTelemetry Collector for telemetry aggregation
- Prometheus for metrics storage
- Loki for log aggregation
- Tempo for distributed tracing
- Grafana for unified visualization
AppServer:
- HTTP server on port 8080 (GraphQL, REST, health endpoints)
- gRPC server on port 9090 (Marketplace, Hooks, Activity, Settings services)
- WebSocket server for real-time subscriptions
Next Steps
Now that your environment is running, you can:
- Explore the GraphQL API: Visit http://localhost:8080/graphql to use the GraphQL Playground
- Build Your First App: Follow the Building Apps guide
- Understand the Architecture: Read about Platform Architecture
- View Observability Dashboards: Open Grafana at http://localhost:3000 (admin/admin)
- Test OpenFGA Permissions: Use the playground at http://localhost:8090/playground
Troubleshooting
Services Not Starting
Check Docker logs for specific services:
# View all logs
docker-compose -f docker/docker-compose.yml logs -f
# View specific service
docker-compose -f docker/docker-compose.yml logs -f kratos
Port Conflicts
If you encounter port conflicts, check what's using the ports:
# Check if port is in use
lsof -i :8080
lsof -i :9090
# Kill process using port
kill -9 <PID>
Database Connection Issues
Test the PostgreSQL connection:
# Connect to PostgreSQL
docker exec -it easy-appserver-postgres psql -U partner -d partner
# Test connection
docker exec -it easy-appserver-postgres psql -U partner -d partner -c "SELECT 1"
Clean Slate
If you need to start fresh:
# Stop all services and remove volumes
docker-compose -f docker/docker-compose.yml down -v
# Re-run setup
./docker/scripts/setup.sh
Related Documentation
- Installation Guide - Detailed installation and configuration
- Platform Architecture - Understand how components work together
- Development Environment - Set up local development workflow
- Building Apps - Create your first AppServer application