ash serve
Start the HTTP server for Telegram integration and webhooks.
Usage
uv run ash serve [OPTIONS]Options
| Option | Default | Description |
|---|---|---|
--config, -c | auto | Path to config file |
--host, -h | 127.0.0.1 | Host to bind to |
--port, -p | 8080 | Port to bind to |
--webhook | false | Use webhook mode |
Basic Usage
Start with defaults (polling mode):
uv run ash serveCustom Host/Port
Bind to all interfaces:
uv run ash serve --host 0.0.0.0 --port 3000Webhook Mode
Use webhooks instead of polling:
uv run ash serve --webhookRequires [telegram].webhook_url to be configured.
What the Server Does
- Loads configuration
- Initializes database
- Sets up the agent
- Starts Telegram provider (if configured)
- Runs FastAPI server
Endpoints
| Path | Method | Description |
|---|---|---|
/health | GET | Health check |
/webhook | POST | Telegram webhook |
Stopping
Press Ctrl+C to gracefully stop the server.
Production
For production deployments:
uv run ash serve --host 0.0.0.0 --port 8080 --webhookUse a reverse proxy (nginx, Caddy) for TLS.