# Self-host MindsDB

> A query layer that connects data sources and AI models so you can ask questions in SQL. MIT licensed. Includes the web editor and the HTTP API.

- Page: https://levelrail.com/templates/mindsdb/
- JSON: https://levelrail.com/templates/mindsdb.json
- Category: AI
- Licence: MIT (Permissive license)
- Source: https://github.com/mindsdb/mindsdb
- Upstream docs: https://github.com/mindsdb/mindsdb

## Requirements
- Memory: about 2 GiB
- amd64: unknown, arm64: unknown
- Needs configuration before start: no
- Pinned image tag: v26.1.0

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| mindsdb | mindsdb/mindsdb | v26.1.0 | 47334 | storage -> /root/mdb_storage |

## Deploy

### CLI

```bash
levelrail-cli templates deploy mindsdb --name my-mindsdb
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/mindsdb/deploy
```

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

## First run
1. Open the editor, connect a data source and create a model with SQL.

## Questions

### Can I deploy MindsDB on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for MindsDB, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image mindsdb/mindsdb:v26.1.0 is what you deploy there.

Self-host MindsDB, MindsDB docker compose file, deploy MindsDB on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
