AI Assistant
Use AI to generate Docker Compose templates in Dokploy.
Dokploy integrates with AI providers to let you generate Docker Compose templates from natural language. Describe what you want to deploy, and the AI generates the configuration for you.
Dokploy does not include its own AI model. You need to connect an external provider (like OpenAI, Anthropic, or any OpenAI-compatible API) with your own API key.
Setting up an AI provider
- Go to Settings.
- Navigate to the AI section.
- Click Add AI Provider.
- Fill in the configuration:
| Field | Description |
|---|---|
| Name | A label for this provider (e.g., "OpenAI", "Claude", "Local LLM") |
| API URL | The API endpoint (e.g., https://api.openai.com/v1 for OpenAI) |
| API Key | Your API key for authentication |
| Model | The model to use (e.g., gpt-4o, claude-sonnet-4-20250514) |
- Click Save.
You can configure multiple providers and switch between them.
Compatible providers
Any provider that exposes an OpenAI-compatible API works with Dokploy. Some examples:
| Provider | API URL | Models |
|---|---|---|
| OpenAI | https://api.openai.com/v1 | gpt-4o, gpt-4o-mini, o1, etc. |
| Anthropic | https://api.anthropic.com/v1 | claude-sonnet-4-20250514, claude-haiku-4-5-20251001, etc. |
| Ollama (local) | http://localhost:11434/v1 | llama3, mistral, codellama, etc. |
| OpenRouter | https://openrouter.ai/api/v1 | Multiple providers through one API |
| Azure OpenAI | https://{resource}.openai.azure.com/openai | gpt-4o, gpt-4, etc. |
Generating Docker Compose templates
Once you have a provider configured, you can use AI to generate Docker Compose templates when creating a new Compose service.
How it works
- Create a new Docker Compose service.
- Click the AI Generate button.
- Describe what you want to deploy in natural language.
- The AI generates a complete
docker-compose.ymlwith:- Service definitions
- Environment variables with sensible defaults
- Volumes and networks
- Any additional config needed
- Review and edit the generated configuration as needed.
- Deploy.
Example prompts
- "A WordPress site with MySQL and Redis for caching"
- "Grafana with Prometheus for monitoring"
- "A Node.js API with MongoDB and Redis"
- "Plausible Analytics with PostgreSQL and ClickHouse"
- "Gitea with a PostgreSQL database"
Always review the generated configuration before deploying. The AI provides a starting point — you may need to adjust environment variables, resource limits, or volumes for your specific use case.
Managing providers
You can manage your AI providers from Settings → AI:
- Add multiple providers for different use cases
- Edit existing provider configurations
- Delete providers you no longer need
- View available models for each provider
- Enable/Disable providers without deleting them