# Self-host Mage AI

> A data pipeline tool for building, running and monitoring ETL, streaming and dbt workflows in notebooks and a UI.

- Page: https://levelrail.com/templates/mage-ai/
- JSON: https://levelrail.com/templates/mage-ai.json
- Category: Developer Tools
- Licence: Apache-2.0 (Permissive license)
- Source: https://github.com/mage-ai/mage-ai
- Upstream docs: https://docs.mage.ai/getting-started/setup

## Requirements
- Memory: about 1 GiB
- amd64: published, arm64: published
- Needs configuration before start: no
- Pinned image tag: 0.9.78

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| mage | mageai/mageai | 0.9.78 | 6789 | mage_data -> /home/src |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| mage | ENV | preset |
| mage | PROJECT_NAME | preset |
| mage | USER_CODE_PATH | preset |

## Deploy

### CLI

```bash
levelrail-cli templates deploy mage-ai --name my-mage-ai
```

### API

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

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

## Questions

### Can I deploy Mage AI on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id mage-ai for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image mageai/mageai:0.9.78 is what you deploy there.

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