When a self-hosted Metabase needs the Python runner
A team that wants Python transforms alongside SQL transforms on its own infrastructure needs a separate execution environment, the metabase/python-runner container, plus S3-compatible storage for production, and a self-hosted Pro or Enterprise plan with the Advanced transforms add-on. Python transforms are not a feature of the base Metabase server, so the decision to add them is also a decision to run and secure two more services and a storage bucket. Confirm the add-on's current price and terms with Metabase before you scope the work, because the Pro and Enterprise pricing on the Metabase pricing page covers the plan itself and the add-on is quoted separately.
SQL transforms are the default choice when the logic is joins, filters, aggregations and column derivations that the warehouse can run as a query. Python becomes worth considering when the team needs procedural logic or Python libraries that SQL cannot express cleanly, such as custom parsing, statistical steps or code the analytics team already maintains. If your transformations are mostly SQL, you may not need the runner at all, and you should keep the transform work in the warehouse and skip the extra infrastructure. Before you commit, list the transforms you expect to write, mark which ones truly need Python, and ask whether the platform team will own a runner, a bucket and a shared token for the life of the deployment.
The runner adds operational work that recurs after the first build. You will rotate the AUTH_TOKEN shared between Metabase and the runner, keep the storage bucket and its access policy under review, and upgrade the runner alongside Metabase so the two stay compatible. Ask your partner or internal team to document these owners and the upgrade order at the start, since a Python transform that runs on a stale runner is harder to diagnose than a failed SQL query. Confirm the runner's supported Metabase versions in the Python runner documentation before you pick a release.
Where the trust boundaries sit between Metabase, the runner and storage
The diagram starts with users signing into the Metabase application, which runs inside the boundary of your infrastructure. Metabase reaches the metabase/python-runner container through MB_PYTHON_RUNNER_URL, and the runner is started with an AUTH_TOKEN that Metabase must also present. Production setups write intermediate data to an S3-compatible bucket such as AWS S3 or MinIO, while the built-in S3 server is for trials only. Confirm that the token is stored as a secret, that the runner is not reachable from outside the network, and that the bucket's access policy is scoped to the runner.
Users, Metabase, the runner and bucket, inside the client boundary.
Which storage and runner choices fit each environment
This table compares the built-in S3 server with a production S3-compatible bucket and shows which plan and runner setup each environment needs. Read each row as a question to answer before you pick a configuration, since the production column depends on who operates the storage and where it lives.
| Choice | Built-in S3 server (trial) | Production S3-compatible bucket (AWS S3 or MinIO) |
|---|---|---|
| Intended use | Trying Python transforms on a test instance | Running scheduled or shared transforms that other people depend on |
| Storage support level | Documented for trying the feature out only | Documented as the setup for production Python runner use |
| Who operates storage | Not applicable beyond the test environment | Confirm whether your cloud team, a managed service or your own MinIO admins run it |
| Data location | Local to the test environment | Confirm the bucket region or data center meets your residency rules |
| Access control | Limited to the trial setup | Confirm bucket policies, IAM roles or MinIO users scoped to the runner |
| Backup and retention | Not expected to hold data you need to keep | Confirm versioning, lifecycle rules and backups with the storage owner |
| Plan requirement | Self-hosted Pro or Enterprise with the Advanced transforms add-on | Self-hosted Pro or Enterprise with the Advanced transforms add-on |
| Runner connection | Metabase reaches the runner through MB_PYTHON_RUNNER_URL, with an AUTH_TOKEN on the runner | Same connection settings, plus confirmed network paths from the runner to the bucket |
How to set up the Python runner on your infrastructure
This sequence takes a self-hosted Metabase from a plan check to a working Python transform, with the runner, storage and authentication connected in a order you can verify at each stage. Each step ends with a check so your team knows when to move on.
Confirm plan and Advanced transforms add-on
Before any infrastructure work, confirm with your Metabase account contact that your self-hosted instance is on a Pro or Enterprise plan and that the Advanced transforms add-on is active for it. Python transforms are not available on the Open Source or Starter plans. Ask the vendor to confirm the add-on's current terms in writing, since licensing is part of the quote. You know this step is done when the Python transform option appears in your Metabase admin settings for transforms.
Choose an execution environment for the runner
Decide where the metabase/python-runner container will run, separate from the Metabase application host, in a network segment your platform team controls. Your platform or infrastructure team owns this decision, with input from security on which network paths the runner can reach. Record the host or cluster, the network path back to Metabase, and the resource limits you plan to set. You know this step is done when the target host or namespace is provisioned and the Metabase server can reach it on the network path you approved.
Provision an S3-compatible bucket for storage
Create an S3-compatible bucket for transform data, such as AWS S3 or a MinIO deployment you operate. The Metabase Python runner documentation states that production setups need this kind of bucket and that the built-in S3 server is for trial use only, so do not use it for production. Set up a dedicated service account with access limited to this bucket, and confirm encryption and retention settings with your security team. You know this step is done when the runner host can list and write to the bucket using that service account.
Set the auth token on the runner
Generate a long, random value for the runner's AUTH_TOKEN, store it in your organization's secrets manager, and pass it to the runner container at start. Use the exact variable names and value formats listed in the Metabase Python runner documentation, and do not reuse a token from another service. Limit who can read the token and plan a rotation process. You know this step is done when the runner starts without errors and the container logs show it is listening on the expected port.
Point Metabase at the runner
On the Metabase side, set the MB_PYTHON_RUNNER_URL environment variable to the address of the runner, and provide the same AUTH_TOKEN value so the two services can authenticate. Restart Metabase using your normal deployment method so the setting takes effect. Confirm the URL uses the network path and transport your security team approved. You know this step is done when the Metabase admin area reports a connected runner rather than an unreachable one.
Run a test Python transform
Create a small, non-sensitive test transform in a non-production or sandbox database, with a simple output table. Run it once manually, then confirm the output table exists, the row count matches what you expected, and the run appears in Metabase's transform run history. Check the runner and bucket logs for errors and confirm no test data was written outside the bucket you provisioned. You know this step is done when the test transform completes successfully and its run record and output are both visible.
Document the setup and confirm the quote
Record the runner host, bucket name, token storage location, rotation owner and the exact variable values used, so the next upgrade or incident response starts from a known state. Compare this record with the written scope and the vendor quote to confirm the add-on terms still match your deployment. Share the record with security and compliance so they can review access to the token and bucket. You know this step is done when the record is stored with your other platform documentation and reviewed by both teams.
Securing the token, the runner and the bucket
The runner sits between your Metabase and the storage bucket, and it executes transform code, so it widens what an attacker could reach if one piece is weak. The cards below cover the shared secret, the network path, the bucket permissions and the execution boundary. Treat each as a control to design and confirm in your own environment, not as a guarantee the product provides.
Handle the AUTH_TOKEN as a secret
The AUTH_TOKEN is the credential that lets Metabase talk to the runner, so anyone holding it can send requests to the execution environment. Store it in your secrets manager, inject it into both the Metabase and runner containers at start, and keep it out of compose files, images and shell history. Plan a rotation procedure that updates both sides in the same change window, and confirm in the Python runner docs how the token must be set on each side before you test rotation.
Limit network reachability to the runner
Only the Metabase application should be able to open connections to the runner's HTTP port. Place the runner on a private network segment or internal Kubernetes service with no ingress from user networks or the internet, and enforce that with firewall rules or network policies. Confirm the exact port and the MB_PYTHON_RUNNER_URL value in your environment, then test from a host that is not Metabase to verify the connection is refused.
Scope bucket access to the runner
The bucket holds the data the runner reads and writes during transforms, so grant the runner's credentials only the object actions and the single prefix it needs. Deny public read and listing on the bucket, and keep Metabase's own credentials separate from the runner's if your storage platform allows it. Ask your storage team to review the policy with a test account that tries to access other buckets, which should fail.
Keep the runner separate from Metabase
The runner is a separate container that executes Python code, which is a different trust level from the Metabase application that serves your users. Run it under its own service account, with no mounted Metabase config, no access to the application database credentials and no host-level privileges. Check that a compromised transform cannot read MB_* environment variables from the Metabase container, because that would expose the application database and encryption settings.
Log and review runner access
Decide where runner and bucket activity is recorded before the first production transform runs. Collect container logs from both services and object access logs from the storage platform in a central system your security team can query. Review them for failed authentication to the runner and for unexpected bucket listings, and confirm retention periods with your log platform owner since these are set outside Metabase.
Questions teams ask before self-hosting the Python runner
Do I need a paid Metabase plan to run Python transforms on my own servers?
Yes. Self-hosted Python transforms require a self-hosted Pro or Enterprise plan with the Advanced transforms add-on. The open source and Starter plans do not include them. The runner is a separate execution environment, the metabase/python-runner container, so the add-on is only one part of the requirement. Confirm the exact entitlement for your edition with Metabase before you design the environment, since plan tiers and add-on packaging can change. The Metabase Python runner documentation is the place to start.
How much does the Advanced transforms add-on cost?
Metabase does not publish a fixed price for the add-on, so it is obtained by quote. Pro and Enterprise plans are priced separately, and Enterprise is quoted starting at $20,000 per year on Metabase's pricing page. Ask Metabase for the add-on price in writing, and confirm whether it is billed per year, per instance or per user, and whether it applies to development instances. Separately, your team or a partner will be paid for the infrastructure and configuration work, which is quoted from a written scope.
What does the work need from my team, and can we do it ourselves?
Your team can do it if it already runs containers, object storage and secrets for other services. The work needs someone who can deploy the metabase/python-runner container next to Metabase, provision an S3-compatible bucket, set MB_PYTHON_RUNNER_URL and the runner's AUTH_TOKEN, and manage network rules between the two services. Plan for someone who will own upgrades, since the runner and Metabase must stay in step. If nobody on the team has these skills, or the environment is regulated and needs evidence for review, a partner scope can cover design, build, testing and handover.
What drives the effort of a Python runner setup?
Effort is driven by four areas. Storage means provisioning and securing an S3-compatible bucket such as AWS S3 or MinIO, including access policies and retention. Networking means ensuring Metabase can reach the runner and that the runner can reach the storage and the databases it reads, without exposing the runner publicly. Secrets means generating and rotating the auth token and storing it outside configuration files in version control. Upgrades means keeping the runner image in step with the Metabase release, which adds a recurring step to every planned upgrade. Each area grows with the number of environments, such as development and production.
Can the built-in S3 server be used in production?
No. The built-in S3 server is for trying out Python transforms only. Production Python runner setups need a dedicated S3-compatible storage bucket, such as AWS S3 or MinIO, that your team operates or that a partner configures in your infrastructure. Production storage needs its own access control, backup and retention decisions, and monitoring. Confirm the storage requirements in the Metabase documentation before you approve the design.
How is the auth token between Metabase and the runner handled?
Metabase connects to the runner through the MB_PYTHON_RUNNER_URL setting, and the runner is started with an AUTH_TOKEN. The token is the shared secret that lets Metabase call the runner, so it should be generated randomly, stored in your secrets manager, injected at startup, and rotated through a planned change. Restrict network access to the runner so only Metabase can reach it. Confirm with Metabase how the token must be configured on both sides before go-live, and record who can read it.
What should we check before approving a Python runner design?
Check the plan and add-on entitlement in writing, the storage choice and its access policy, the network path between Metabase and the runner, and where the auth token is stored. Ask how a runner version is matched to your Metabase version and how the team will test it during each upgrade. Confirm backup and restore expectations for the storage bucket, and identify which databases the transforms will read and write. A written scope with these items gives you a basis for comparing an internal build with a partner quote.
Limits to confirm in your environment before you build
The Python runner depends on decisions that sit partly outside your team: the Metabase plan and add-on terms, the version pairing, the storage your security team approves, and the network paths between services. Settle these with Metabase and your internal owners before you size infrastructure or write the deployment plan.
Add-on and plan terms
Self-hosted Python transforms require a self-hosted Pro or Enterprise plan together with the Advanced transforms add-on. Ask Metabase in writing whether the add-on is priced per instance, per user or by quote, whether it renews annually, and whether it applies to development or staging instances as well as production. Confirm what changes if you move between plans, because the cost decision affects the whole build.
Metabase pricingRunner and Metabase version compatibility
Confirm which metabase/python-runner tags work with the Metabase release you run, and whether the runner must match the Metabase version exactly. Ask how upgrades are sequenced when you move to a new Metabase release, and whether the runner can be upgraded independently. Record the pairing in your change plan so a Metabase upgrade does not leave transforms failing on an incompatible runner.
Approved S3-compatible storage
Production runner setups need an S3-compatible bucket such as AWS S3 or MinIO, and the built-in S3 server is for trials only. Ask your security team which storage products and hosting locations are approved, how buckets are encrypted, and who owns the access keys. Confirm the bucket naming, lifecycle rules and retention of intermediate transform files with the storage owner before you request credentials.
Python runner docsEgress and outbound network rules
Map every connection the runner and Metabase make: database connections, the storage endpoint, the internal path between Metabase and the runner, and any package or image sources. Confirm with Metabase which outbound destinations the runner requires, and check whether your proxies, firewalls or air-gapped registries can reach them. Test these paths in a staging environment before production change windows.
Runner authentication and secret handling
The AUTH_TOKEN that the runner requires must be generated, stored and rotated under your secrets process, and the same value must be set on both sides of the connection. Ask who can read the token, how it is delivered to containers, and what the documented rotation procedure is. Confirm that MB_PYTHON_RUNNER_URL points only to the internal runner address and is not exposed through public routing.
Support scope and ownership
Ask Metabase which support channels cover the runner, which logs it produces, and who owns each part of the stack when a transform fails. Decide internally whether your platform team, your data team or a partner handles runner patching and storage lifecycle. Written ownership reduces delays when a failure crosses the Metabase, container and storage layers.
Keeping the runner aligned with Metabase upgrades
The runner and its storage bucket belong in every Metabase upgrade plan, not only the application server. Metabase runs application database migrations automatically when it upgrades, and its upgrade documentation recommends backing up the application database first. Because the Python transforms feature depends on a metabase/python-runner container that talks to Metabase through MB_PYTHON_RUNNER_URL and an AUTH_TOKEN, a Metabase upgrade can change what the runner expects. Confirm with Metabase which runner image tag matches each Metabase release before you change either side, and record the pairing in your change record.
Plan the upgrade as a test, not a single switch. Stand up a staging copy with the same Metabase version, the same runner image, a copy of the application database and a bucket that mirrors production, then run a representative transform end to end and check that output lands where expected. Confirm that the runner still authenticates with the current AUTH_TOKEN, that the bucket credentials still work, and that scheduled transform jobs complete. Also check the Pro or Enterprise license and the Advanced transforms add-on after the upgrade, since transforms will not run without them.
For timing, the Metabase version support page lists how long each release is supported. Metabase LTS versions are supported for 14 months, while non-LTS versions usually reach end of life after 2 months, and every release receives bug fixes and security updates until its end-of-life date. Choose the runner and Metabase versions you will run through that window, and schedule the next upgrade before the current end-of-life date arrives. Rollback is the other half of the plan: Metabase recommends restoring the pre-upgrade application database backup, so keep the runner image tag and bucket state recorded so you can return both sides to a matching pair.
How DeployOpen scopes and delivers Python runner setups
DeployOpen plans, builds, hardens and documents the Python runner alongside your self-hosted Metabase, inside infrastructure you control. Each engagement starts with a written scope covering the plan requirements, the runner container, object storage and the service-to-service token before any work begins.
How we scope
- Confirm your Metabase plan, self-hosted status and Advanced transforms add-on before design starts.
- Map which transforms, source databases and warehouse targets the runner must reach.
- Agree in writing which S3-compatible storage option, bucket layout and network paths are in scope.
How we build
- Deploy the metabase/python-runner container as a separate execution environment from the Metabase application.
- Configure MB_PYTHON_RUNNER_URL and the AUTH_TOKEN so the two services connect with a managed secret.
- Connect production storage to AWS S3 or MinIO, keeping the built-in S3 server limited to trial use.
How we hand over
- Deliver architecture notes, configuration records and a runbook for the runner, storage and token rotation.
- Run a documented verification pass that executes a sample Python transform end to end.
- Walk your platform and data teams through restore steps, logs and where to look when a transform fails.
How we support
- Offer ongoing support, Metabase upgrades and continuous testing as a retainer after handover.
- Plan runner and Metabase version changes together, so the Python runner stays compatible through upgrades.
- Retest the setup after material changes to the network, storage, identity or token configuration.

