Self-hosting Mage AI the easy way

Self-hosting Mage AI the easy way

Yulei Chen - Content-Engineerin bei sliplane.ioYulei Chen
5 min

Mage AI is an open-source data pipeline tool that lets you build, run, and manage ETL/ELT workflows. It supports dbt integrations, real-time streaming, and comes with a visual pipeline editor. While Mage offers a managed cloud version, self-hosting gives you full control over your data and no usage limits.

Sliplane makes self-hosting painless. With one-click deployment, you can get Mage AI up and running in minutes - no server setup, no reverse proxy, no infrastructure headaches.

Prerequisites

Before deploying, ensure you have a Sliplane account (free trial available).

Quick start

Sliplane provides one-click deployment with presets.

SliplaneDeploy Mage AI >
  1. Click the deploy button above
  2. Select a project
  3. Select a server (If you just signed up you get a 48-hour free trial server)
  4. Click Deploy!

About the preset

The one-click deploy above uses Sliplane's Mage AI preset. Here is what it includes:

  • Official mageai/mageai Docker image (version 0.9.79)
  • Starts the default project automatically via mage start default_project
  • Persistent storage mounted to /home/src so your pipelines and project files survive restarts
  • Production mode enabled via ENV=production
  • User authentication enabled by default (built into Mage AI 0.9.78+) with a pre-generated owner account
  • Listens on port 6789

Signing in

Once Mage AI is running, open the domain Sliplane assigned (e.g. mageai-xxxx.sliplane.app) in your browser. You will be greeted by a sign-in page.

The preset creates an owner account for you automatically. The credentials are pre-set as environment variables on your service:

VariableDefault value
DEFAULT_OWNER_EMAILadmin@admin.com
DEFAULT_OWNER_USERNAMEadmin
DEFAULT_OWNER_PASSWORDrandomly generated

Open your service in the Sliplane dashboard, go to Environment Variables, and copy the value of DEFAULT_OWNER_PASSWORD. Use it together with the email above to sign in. We strongly recommend changing the password from the user management page (/settings/workspace/users) after your first login.

Heads up: these defaults only take effect on the very first start, when no owner exists yet. Changing the variables later will not update the credentials of the already-created user — use the user management page instead.

Next steps

Key environment variables

Here are some useful environment variables you can set in your service settings:

VariableDescriptionDefault
PROJECT_NAMEName of the Mage projectdefault_project
ENVRuntime environment (production, dev, test)production
DEFAULT_OWNER_EMAILEmail of the auto-created owner useradmin@admin.com
DEFAULT_OWNER_USERNAMEUsername of the auto-created owner useradmin
DEFAULT_OWNER_PASSWORDPassword of the auto-created owner userrandomly generated
MAGE_ACCESS_TOKEN_EXPIRY_TIMEAccess token lifetime in seconds2592000 (30 days)
DISABLE_NOTEBOOK_EDIT_ACCESSPrevent code editing in the UI0 (disabled)

For the full list, see the Mage AI authentication docs.

Logging

Mage AI logs to STDOUT by default, which works perfectly with Sliplane's built-in log viewer. If you need to debug pipeline issues, check the logs in your Sliplane dashboard. For general Docker log tips, see our post on how to use Docker logs.

Troubleshooting

If the service takes a while to become healthy, that is normal. Mage AI can need 30-60 seconds to fully start, especially on smaller servers. If it stays unhealthy, check the logs for errors related to missing dependencies or port conflicts.

Cost comparison

You can also self-host Mage AI with other cloud providers. Here is a pricing comparison for the most common ones:

ProvidervCPURAMDiskMonthly CostNote
Sliplane22 GB40 GB€9 (~$10.65)Flat rate, 1 TB bandwidth, SSL included
Fly.io22 GB40 GB~$18Disk and bandwidth billed separately
Render12 GB40 GB~$35100 GB bandwidth, Disk billed separately
Railway22 GB40 GB~$67 + $20 planPro plan floor, usage-based, bandwidth billed separately
Click here to see how these numbers were calculated.

(Assuming an always-on instance running 730 hrs/month)

  • Sliplane: flat €9/month for the Base server. Unlimited services on the same server, 1 TB egress and SSL included.
  • Fly.io: shared-cpu-2x 2 GB = $11.83/mo + 40 GB volume × $0.15/GB = $6 -> ~$17.83/mo. Egress billed separately ($0.02/GB in EU).
  • Render: closest match is Standard ($25, 1 vCPU / 2 GB) plus 40 GB disk × $0.25/GB = $10 -> ~$35/mo. Stepping up to Pro (2 vCPU / 4 GB) costs $85/mo + disk.
  • Railway (Pro plan): CPU 2 × $0.00000772/s × 2,628,000 s = $40.57; RAM 2 × $0.00000386/s × 2,628,000 s = $20.29; volume 40 × $0.00000006/s × 2,628,000 s = $6.31 -> ~$67/mo compute, plus the $20/mo Pro plan floor and $0.05/GB egress.

Bandwidth costs can add up fast on usage-based providers. Use our bandwidth cost comparison tool to see what your egress would cost on each platform.

FAQ

What can I build with Mage AI?

Mage AI is designed for data engineering workflows. You can build ETL/ELT pipelines, schedule data transformations, integrate with dbt, stream data in real-time, and connect to databases, data warehouses, and APIs. It is a great fit for teams that need a visual pipeline editor without paying for expensive managed solutions.

How do I connect Mage AI to a database?

In the Mage AI UI, go to the pipeline editor and add a data loader or data exporter block. Mage supports PostgreSQL, MySQL, BigQuery, Snowflake, Redshift, and many more out of the box. If your database runs on the same Sliplane server, use the internal service name as the host (e.g. postgres.internal). You can also store connection details in Mage's IO config for reuse across pipelines.

How do I update Mage AI?

Change the image tag in your Sliplane service settings to the new version and redeploy. Check Docker Hub for the latest stable version. Your project files and pipelines are stored on the persistent volume, so they will not be affected by the update.

Are there alternatives to Mage AI?

Yes. Popular alternatives include n8n (workflow automation with 400+ integrations), Langflow (AI-focused low-code builder), Apache Airflow (the industry-standard pipeline orchestrator), and Prefect (modern Python-native orchestration). Each has different strengths depending on whether you need general automation, AI workflows, or pure data engineering.

Can I use dbt with Mage AI?

Yes. Mage AI has built-in dbt integration. You can add dbt models as blocks in your pipelines, run dbt commands directly from the UI, and manage your dbt project alongside your other pipeline code. See the Mage dbt docs for setup instructions.

Self-host Mage AI now - It's easy!

Sliplane gives you everything you need to run Mage AI without managing servers.