A web-based tool to convert unRAID Docker container XML configurations to Docker Compose YAML format, with support for AutoKuma monitoring labels.
- Convert unRAID Docker container XML data to Docker Compose YAML format
- Preserves container settings:
- Image and container name
- Environment variables
- Volume mounts (with read-only flags)
- Port mappings (with protocols)
- Network configuration
- CPU and memory limits
- Privileged mode
- Restart policy
- WebUI, Support, and Project URLs (as labels)
- Copy the generated YAML to clipboard or download as a file
- Add Uptime Kuma monitoring labels to existing Docker Compose configurations
- Support for multiple monitor types:
- Group monitors for organizing your monitoring
- Docker container monitors
- HTTP endpoint monitors
- Port monitors
- Configurable monitor settings:
- Check intervals
- Retry intervals
- Max retries
- Timeouts
- Keywords (for HTTP monitors)
- Apply labels to specific services
- Preview, copy, and download the modified Docker Compose YAML
- Python 3.7+
- Flask
- PyYAML
- Clone the repository:
git clone https://git.blakbox.vip/baxterblk/unraid-to-compose.git
cd unraid-to-compose
- Install dependencies:
pip install -r requirements.txt
- Run the application:
python app.py
The application will be available at http://localhost:5000
- Clone the repository:
git clone https://git.blakbox.vip/baxterblk/unraid-to-compose.git
cd unraid-to-compose
- Build and start the Docker container:
docker-compose up -d --build
Alternatively, you can use the following commands:
docker build -t unraid-to-compose .
docker run -d -p 8080:5000 --name unraid-to-compose unraid-to-compose
If you prefer not to clone the repository locally, you can build directly from the Git repository URL:
- Create a docker-compose.yml file with the following content:
services:
unraid-to-compose:
build:
context: https://git.blakbox.vip/baxterblk/unraid-to-compose.git
ports:
- "8080:5000"
restart: unless-stopped
- Run the container:
docker-compose up -d
This approach will automatically:
- Pull the source code from the Git repository
- Build the Docker image locally
- Start the container
The application will be available at http://localhost:8080
To run this application directly on your unRAID server:
- In the unRAID Docker tab, click "Add Container"
- In the "Template" dropdown, select "... Show more templates"
- Search for "unraid-to-compose" or add a template URL if available
- Adjust port mappings if needed (default is 8080)
- Click "Apply"
The application will be available at http://your-unraid-ip:8080
- Navigate to the XML Converter tab
- Obtain your unRAID Docker container XML:
- In unRAID, go to Docker tab
- Click on the container you want to convert
- View the XML data in the container details
- Copy the entire XML content
- Paste the XML data into the input box
- Click "Convert"
- Review the generated Docker Compose YAML
- Use the "Copy to Clipboard" or "Download as docker-compose.yml" buttons to save the result
-
Navigate to the AutoKuma Labels tab
-
Paste your existing
docker-compose.yml
content into the input box -
Choose one of the following options:
- Click the "Auto Populate Monitors" button to automatically create monitors based on your docker-compose.yml
- The tool will:
- Create a Docker Services group
- Add Docker monitors for each service
- Add Port monitors for exposed ports
- Create HTTP monitors for any detected web interfaces (from labels)
- Review and customize the generated monitors if needed
- Configure monitors by using the buttons to add different monitor types:
- Group monitors: Organize your monitors in logical groups
- Docker monitors: Monitor container state
- HTTP monitors: Check web endpoints
- Port monitors: Verify if a port is open and responding
- For each monitor, fill in the required fields:
- All monitors require an ID and Name
- Docker monitors require a container name
- HTTP monitors require a URL
- Port monitors require hostname and port number
-
Specify which service to apply the labels to (optional)
-
Click "Generate Compose with Labels" to add the configured monitors to your compose file
-
Review the generated YAML with AutoKuma labels
-
Use the "Copy to Clipboard" or "Download as docker-compose.yml" buttons to save the result
Uptime Kuma is a fantastic open-source monitoring tool, and AutoKuma extends it by allowing Docker containers to self-register for monitoring via Docker labels.
This tool helps you create those labels in the correct format. Common label patterns include:
labels:
- "kuma.group.id=services-group"
- "kuma.group.name=Web Services"
- "kuma.group.description=Web application services"
labels:
- "kuma.monitor.type=docker"
- "kuma.monitor.id=webapp-container"
- "kuma.monitor.name=Web App Container"
- "kuma.monitor.description=Monitors the web app container status"
- "kuma.monitor.parent=services-group"
- "kuma.monitor.docker.host=1"
- "kuma.monitor.docker.container=webapp"
- "kuma.monitor.interval=60"
- "kuma.monitor.retry.interval=30"
- "kuma.monitor.max.retries=3"
labels:
- "kuma.monitor.type=http"
- "kuma.monitor.id=webapp-web"
- "kuma.monitor.name=Web App Interface"
- "kuma.monitor.description=Monitors the web app interface"
- "kuma.monitor.parent=services-group"
- "kuma.monitor.http.url=http://example.com:8080"
- "kuma.monitor.interval=60"
- "kuma.monitor.retry.interval=30"
- "kuma.monitor.max.retries=3"
- "kuma.monitor.http.timeout=10"
labels:
- "kuma.monitor.type=port"
- "kuma.monitor.id=db-port"
- "kuma.monitor.name=Database Port"
- "kuma.monitor.description=Monitors the database port"
- "kuma.monitor.parent=database-group"
- "kuma.monitor.port.hostname=localhost"
- "kuma.monitor.port.port=3306"
- "kuma.monitor.interval=60"
- "kuma.monitor.retry.interval=30"
- "kuma.monitor.max.retries=3"
This project is open source and available under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
Below are screenshots demonstrating the key features of the unRAID XML to Docker Compose Converter: