Before running setup in production, replace the DNS challenge placeholders
in config.yaml. Set ssl.dns_challenge.provider to the Traefik/lego provider
that manages the deployment domain, then list that provider’s required
environment-variable names under ssl.dns_challenge.credentials.
ssl: # Required in production for ACME certificate notifications. acme_email: "<ACME_EMAIL>" dns_challenge: provider: "<DNS_PROVIDER>" credentials: - "<PROVIDER_REQUIRED_ENV_VAR>" environment: {}
credentials contains variable names, not credential values. The CLI prompts
for the values securely during setup and stores them in local secret files.
The shipped placeholders are intentionally not valid production values. Do not
leave them unchanged, and do not store DNS tokens in config.yaml. If
ssl.auto_generate is enabled, also replace the certificate identity
placeholders before running setup.
The CLI builds the configured VNC, Selkies, campaign, and egress images, then
starts the Compose control-plane services. Later starts can omit --build
unless source or dependencies changed.
down is terminal for the current runtime. It stops the control plane,
force-removes every app-owned campaign, target-browser, and campaign-egress
container, removes campaign networks, and marks active, paused, or scheduled
campaigns as completed. A later up does not resume them.If any dynamic campaign resource cannot be removed, the command exits
unsuccessfully and leaves campaign state unchanged so an operator is not given
a false completed status. Resolve the reported Docker error and run down
again.
Last modified on September 10, 2026
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"P-BitM","description":"Documentation for P-BitM, a containerized platform for controlled browser-in-the-middle security assessments.","colors":{"primary":"#C4472D","light":"#F06A48","dark":"#C4472D"},"logo":{"light":"https://mintcdn.com/p-bitm-2269ecee/7kTH8dbJH_Bjkkly/assets/p-bitm-logo-v2.png?fit=max\u0026auto=format\u0026n=7kTH8dbJH_Bjkkly\u0026q=85\u0026s=d3ca32f4c4d69cc5a63ce1fe724c0249","dark":"https://mintcdn.com/p-bitm-2269ecee/7kTH8dbJH_Bjkkly/assets/p-bitm-logo-v2.png?fit=max\u0026auto=format\u0026n=7kTH8dbJH_Bjkkly\u0026q=85\u0026s=d3ca32f4c4d69cc5a63ce1fe724c0249","href":"/"},"favicon":"https://mintcdn.com/p-bitm-2269ecee/9BS4YJCQtZV5PBjE/assets/favicon.png?fit=max\u0026auto=format\u0026n=9BS4YJCQtZV5PBjE\u0026q=85\u0026s=f5b864b87c3f17f785362f7c29a6e3d3","appearance":{"default":"dark"},"background":{"decoration":"gradient"},"navbar":{"links":[{"href":"https://github.com/P-BitM-Framework/P-BitM-Docs/blob/main/CONTRIBUTING.md","label":"Contribute"}],"primary":{"type":"github","href":"https://github.com/P-BitM-Framework/P-BitM"}},"footer":{"socials":{"github":"https://github.com/P-BitM-Framework"},"links":[{"header":"Get started","items":[{"label":"Overview","href":"/getting-started/overview"},{"label":"Requirements","href":"/getting-started/requirements"},{"label":"Quick start","href":"/getting-started/quick-start"}]},{"header":"Operate","items":[{"label":"Campaigns","href":"/user-guide/campaigns"},{"label":"Live sessions","href":"/user-guide/live-sessions"},{"label":"Troubleshooting","href":"/administration/troubleshooting"}]},{"header":"Project","items":[{"label":"P-BitM repository","href":"https://github.com/P-BitM-Framework/P-BitM"},{"label":"Documentation repository","href":"https://github.com/P-BitM-Framework/P-BitM-Docs"},{"label":"Credits","href":"/legal/credits"}]},{"header":"Security","items":[{"label":"Authorized use","href":"/security/authorized-use"},{"label":"Deployment hardening","href":"/security/deployment-hardening"},{"label":"Report a vulnerability","href":"/security/reporting-vulnerabilities"}]}]},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","codeblocks":"system","latex":false},"errors":{"404":{"redirect":false,"title":"Page not found","description":"The requested P-BitM documentation page does not exist or has moved."}},"interaction":{"drilldown":false},"metadata":{"timestamp":true},"navigation":{"global":{"anchors":[{"anchor":"Source code","icon":"github","href":"https://github.com/P-BitM-Framework/P-BitM"},{"anchor":"Documentation repo","icon":"file-text","href":"https://github.com/P-BitM-Framework/P-BitM-Docs"},{"anchor":"Authorized use","icon":"shield-check","href":"/security/authorized-use"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"p-bitm-2269ecee","hasAudioNarration":false,"actualSubdomain":"p-bitm-2269ecee","customDomains":[],"gitSource":{"type":"github","owner":"p-bitm-framework","repo":"p-bitm-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6aa2dd681594efca37a7c436","collectionId":"10da7d16-fb1f-46b8-b23f-d81448ac4682","liveDeploymentHistoryId":"6aa2dd681594efca37a7c436","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6aa2dd681594efca37a7c436","clientVersion":"0.0.4021","searchFilterCounts":[{"language":"default","tag":"P-BitM","count":40},{"language":"default","tag":"User guide","count":10},{"language":"default","tag":"Administration","count":8},{"language":"default","tag":"Development","count":7},{"language":"default","tag":"Concepts","count":6},{"language":"default","tag":"Reference","count":6},{"language":"default","tag":"Get started","count":5},{"language":"default","tag":"Application","count":4},{"language":"default","tag":"Campaign resources","count":4},{"language":"default","tag":"Operations","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":":root{--pbitm-orange-light:#f06a48;--pbitm-teal:#00a6a6}#navbar a:has(>.nav-logo){display:inline-flex!important;align-items:center!important;gap:.8rem;flex-shrink:0}#navbar .nav-logo{width:3.5rem!important;max-width:3.5rem!important;height:3.5rem!important;max-height:3.5rem!important;object-fit:contain!important}#navbar a:has(>.nav-logo)::after{color:#18181b;content:\"Persistent Browser-In-The-Middle\";font-size:.95rem;font-weight:750;letter-spacing:.01em;line-height:1.15;white-space:nowrap}.dark #navbar a:has(>.nav-logo)::after{color:#f8fafc}@media (max-width:639px){#navbar a:has(>.nav-logo)::after{display:none}}#footer img[src*=p-bitm-logo],advanced-footer img[src*=p-bitm-logo],footer img[src*=p-bitm-logo]{width:7rem!important;max-width:7rem!important;height:auto!important;max-height:none!important;object-fit:contain!important}.pbitm-hero{position:relative;isolation:isolate;overflow:hidden}.pbitm-hero::after,.pbitm-hero::before{position:absolute;z-index:-1;border-radius:50%;content:\"\";filter:blur(90px);opacity:.5}.pbitm-hero::before{top:-12%;left:8%;width:24rem;height:24rem;background:var(--pbitm-teal)}.pbitm-hero::after{top:-18%;right:6%;width:28rem;height:28rem;background:var(--pbitm-orange-light)}.pbitm-hero-logo{filter:drop-shadow(0 22px 34px rgb(0 0 0/34%))}.pbitm-kicker{color:#86f7ed;letter-spacing:.12em;text-transform:uppercase}html[data-current-path=\"/\"] #footer{margin-top:0}"}],"page":{"pagePath":"administration/deployment","slug":"/administration/deployment","pageMetadata":{"title":"Deployment","description":"Deploy P-BitM in development or production and shut it down safely.","href":"/administration/deployment"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Deploy P-BitM in development or production and shut it down safely.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tab,Tabs,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`select-an-environment`,children:`Select an environment`}),`\n`,_jsxs(_components.p,{children:[`Set `,_jsx(_components.code,{children:`app.environment`}),` in `,_jsx(_components.code,{children:`config.yaml`}),`:`]}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`Development`,icon:`laptop`,id:`development`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`development`}),` selects `,_jsx(_components.code,{children:`server/docker-compose-dev.yml`}),`, local TLS, path-based\ncampaign routing, and MailHog.`]})}),_jsx(Tab,{title:`Production`,icon:`server`,id:`production`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`production`}),` selects `,_jsx(_components.code,{children:`server/docker-compose.yml`}),`, per-campaign hostnames,\nand the configured Traefik DNS challenge.`]})})]}),`\n`,_jsx(_components.p,{children:`Run setup after changing the environment:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`python3`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` p-bitm.py`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` setup`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`python3`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` p-bitm.py`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` doctor`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`configure-the-production-dns-challenge`,children:`Configure the production DNS challenge`}),`\n`,_jsxs(_components.p,{children:[`Before running `,_jsx(_components.code,{children:`setup`}),` in production, replace the DNS challenge placeholders\nin `,_jsx(_components.code,{children:`config.yaml`}),`. Set `,_jsx(_components.code,{children:`ssl.dns_challenge.provider`}),` to the Traefik/lego provider\nthat manages the deployment domain, then list that provider’s required\nenvironment-variable names under `,_jsx(_components.code,{children:`ssl.dns_challenge.credentials`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`ssl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Required in production for ACME certificate notifications.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` acme_email`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003cACME_EMAIL>\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` dns_challenge`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` provider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003cDNS_PROVIDER>\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` credentials`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003cPROVIDER_REQUIRED_ENV_VAR>\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` environment`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {}`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`credentials`}),` contains variable names, not credential values. The CLI prompts\nfor the values securely during `,_jsx(_components.code,{children:`setup`}),` and stores them in local secret files.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The shipped placeholders are intentionally not valid production values. Do not\nleave them unchanged, and do not store DNS tokens in `,_jsx(_components.code,{children:`config.yaml`}),`. If\n`,_jsx(_components.code,{children:`ssl.auto_generate`}),` is enabled, also replace the certificate identity\nplaceholders before running `,_jsx(_components.code,{children:`setup`}),`.`]})}),`\n`,_jsxs(_components.p,{children:[`Use Traefik’s `,_jsx(_components.a,{href:`https://doc.traefik.io/traefik/https/acme/#providers`,children:`DNS challenge provider reference`}),`\nto find the supported provider identifier and its required environment variables. See the\n`,_jsx(_components.a,{href:`/reference/configuration`,children:`configuration reference`}),` for the complete\nconfiguration contract.`]}),`\n`,_jsx(Heading,{level:`2`,id:`build-and-start`,children:`Build and start`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`python3`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` p-bitm.py`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` up`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --build`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The CLI builds the configured VNC, Selkies, campaign, and egress images, then\nstarts the Compose control-plane services. Later starts can omit `,_jsx(_components.code,{children:`--build`}),`\nunless source or dependencies changed.`]}),`\n`,_jsx(Heading,{level:`2`,id:`production-checklist`,children:`Production checklist`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Keep the dashboard bound to loopback.`}),`\n`,_jsx(_components.li,{children:`Permit public inbound traffic only on ports 80 and 443.`}),`\n`,_jsx(_components.li,{children:`Point approved campaign hostnames to the deployment host.`}),`\n`,_jsxs(_components.li,{children:[`Configure DNS provider credential names in `,_jsx(_components.code,{children:`config.yaml`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Store provider values through `,_jsx(_components.code,{children:`setup`}),`, not in tracked files.`]}),`\n`,_jsxs(_components.li,{children:[`Run `,_jsx(_components.code,{children:`doctor --strict`}),` before an engagement.`]}),`\n`,_jsx(_components.li,{children:`Confirm backup, retention, monitoring, and emergency-stop procedures.`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`stop`,children:`Stop`}),`\n`,_jsx(_components.p,{children:`Run the global shutdown command:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`python3`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` p-bitm.py`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` down`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`down`}),` is terminal for the current runtime. It stops the control plane,\nforce-removes every app-owned campaign, target-browser, and campaign-egress\ncontainer, removes campaign networks, and marks active, paused, or scheduled\ncampaigns as completed. A later `,_jsx(_components.code,{children:`up`}),` does not resume them.`]}),`\n`,_jsxs(_components.p,{children:[`If any dynamic campaign resource cannot be removed, the command exits\nunsuccessfully and leaves campaign state unchanged so an operator is not given\na false completed status. Resolve the reported Docker error and run `,_jsx(_components.code,{children:`down`}),`\nagain.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Deployment","description":"Deploy P-BitM in development or production and shut it down safely.","href":"/administration/deployment"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Select an environment","slug":"select-an-environment","depth":2,"children":[]},{"title":"Configure the production DNS challenge","slug":"configure-the-production-dns-challenge","depth":2,"children":[]},{"title":"Build and start","slug":"build-and-start","depth":2,"children":[]},{"title":"Production checklist","slug":"production-checklist","depth":2,"children":[]},{"title":"Stop","slug":"stop","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"p-bitm-2269ecee","siteName":"P-BitM","title":"Deployment - P-BitM","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-10T16:34:06.298Z","gitLastModified":"2026-09-10T16:28:15.000Z","originalFileLocation":"administration/deployment.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Deploy P-BitM in development or production and shut it down safely.\">\u003cmeta data-mint-head name=\"application-name\" content=\"P-BitM\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/p-bitm-2269ecee/KPlCWvMofCJY6GWk/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/p-bitm-2269ecee/KPlCWvMofCJY6GWk/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/p-bitm-2269ecee/KPlCWvMofCJY6GWk/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/p-bitm-2269ecee/KPlCWvMofCJY6GWk/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/p-bitm-2269ecee/KPlCWvMofCJY6GWk/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/p-bitm-2269ecee/KPlCWvMofCJY6GWk/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/p-bitm-2269ecee/KPlCWvMofCJY6GWk/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/p-bitm-2269ecee/KPlCWvMofCJY6GWk/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/p-bitm-2269ecee/KPlCWvMofCJY6GWk/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Deployment - P-BitM\">\u003cmeta data-mint-head property=\"og:description\" content=\"Deploy P-BitM in development or production and shut it down safely.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"P-BitM\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://p-bitm-2269ecee.mintlify.app/administration/deployment\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://p-bitm-2269ecee.mintlify.app/_mintlify/api/og/v2?division=Administration\u0026amp;title=Deployment\u0026amp;description=Deploy+P-BitM+in+development+or+production+and+shut+it+down+safely.\u0026amp;theme=830e90918d8f47e49f7ca0e6\u0026amp;signature=0c0f31fbeba916b93cc3f792d0d1b10626db65d6ded19965194af53e5b0c3b2a\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Deployment - P-BitM\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Deploy P-BitM in development or production and shut it down safely.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://p-bitm-2269ecee.mintlify.app/_mintlify/api/og/v2?division=Administration\u0026amp;title=Deployment\u0026amp;description=Deploy+P-BitM+in+development+or+production+and+shut+it+down+safely.\u0026amp;theme=830e90918d8f47e49f7ca0e6\u0026amp;signature=0c0f31fbeba916b93cc3f792d0d1b10626db65d6ded19965194af53e5b0c3b2a\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/p-bitm-2269ecee/KPlCWvMofCJY6GWk/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"P-BitM\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#C4472D\">\u003clink data-mint-head rel=\"canonical\" href=\"https://p-bitm-2269ecee.mintlify.app/administration/deployment\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/administration/deployment.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://p-bitm-2269ecee.mintlify.app/#organization\",\"name\":\"P-BitM\",\"url\":\"https://p-bitm-2269ecee.mintlify.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/p-bitm-2269ecee/7kTH8dbJH_Bjkkly/assets/p-bitm-logo-v2.png?fit=max\u0026auto=format\u0026n=7kTH8dbJH_Bjkkly\u0026q=85\u0026s=d3ca32f4c4d69cc5a63ce1fe724c0249\"}},{\"@type\":\"WebSite\",\"@id\":\"https://p-bitm-2269ecee.mintlify.app#website\",\"name\":\"P-BitM\",\"url\":\"https://p-bitm-2269ecee.mintlify.app\",\"publisher\":{\"@id\":\"https://p-bitm-2269ecee.mintlify.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://p-bitm-2269ecee.mintlify.app/administration/deployment#webpage\",\"url\":\"https://p-bitm-2269ecee.mintlify.app/administration/deployment\",\"name\":\"Deployment\",\"description\":\"Deploy P-BitM in development or production and shut it down safely.\",\"dateModified\":\"2026-09-10T16:28:15.000Z\",\"isPartOf\":{\"@id\":\"https://p-bitm-2269ecee.mintlify.app#website\"},\"breadcrumb\":{\"@id\":\"https://p-bitm-2269ecee.mintlify.app/administration/deployment#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://p-bitm-2269ecee.mintlify.app/administration/deployment#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"P-BitM\",\"item\":\"https://p-bitm-2269ecee.mintlify.app\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Deployment\",\"item\":\"https://p-bitm-2269ecee.mintlify.app/administration/deployment\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://p-bitm-2269ecee.mintlify.app/administration/deployment#article\",\"headline\":\"Deployment\",\"name\":\"Deployment\",\"description\":\"Deploy P-BitM in development or production and shut it down safely.\",\"url\":\"https://p-bitm-2269ecee.mintlify.app/administration/deployment\",\"mainEntityOfPage\":{\"@id\":\"https://p-bitm-2269ecee.mintlify.app/administration/deployment#webpage\"},\"dateModified\":\"2026-09-10T16:28:15.000Z\",\"publisher\":{\"@id\":\"https://p-bitm-2269ecee.mintlify.app/#organization\"},\"isPartOf\":{\"@id\":\"https://p-bitm-2269ecee.mintlify.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"P-BitM\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"P-BitM","nav":{"global":{"anchors":[{"anchor":"Source code","icon":"github","href":"https://github.com/P-BitM-Framework/P-BitM"},{"anchor":"Documentation repo","icon":"file-text","href":"https://github.com/P-BitM-Framework/P-BitM-Docs"},{"anchor":"Authorized use","icon":"shield-check","href":"/security/authorized-use"}]},"tabs":[{"tab":"Home","icon":"house","pages":[{"title":"Home","href":""}]},{"tab":"P-BitM","icon":"fish-symbol","groups":[{"group":"Get started","icon":"rocket","pages":[{"title":"Overview","href":"/getting-started/overview"},{"title":"Requirements","href":"/getting-started/requirements"},{"title":"Installation","href":"/getting-started/installation"},{"title":"Initial configuration","href":"/getting-started/configuration"},{"title":"Quick start","href":"/getting-started/quick-start"}]},{"group":"Video demos","icon":"clapperboard","pages":[{"title":"Video demos","href":"/video-demos"}]},{"group":"User guide","icon":"panel-top","pages":[{"title":"Campaigns","href":"/user-guide/campaigns"},{"group":"Campaign resources","icon":"folders","pages":[{"title":"Target lists","href":"/user-guide/target-lists"},{"title":"Email templates","href":"/user-guide/email-templates"},{"title":"SMTP profiles","href":"/user-guide/smtp-profiles"},{"title":"Landing pages","href":"/user-guide/landing-pages"}]},{"group":"Sessions and evidence","icon":"monitor-up","pages":[{"title":"Live sessions","href":"/user-guide/live-sessions"},{"title":"Actions and evidence","href":"/user-guide/actions-and-evidence"},{"title":"Exports","href":"/user-guide/exports"}]},{"group":"Extensions","icon":"blocks","pages":[{"title":"Plugins","href":"/user-guide/plugins"},{"title":"Modules","href":"/user-guide/modules"}]}]},{"group":"Concepts","icon":"network","pages":[{"title":"Architecture","href":"/concepts/architecture"},{"title":"Campaign lifecycle","href":"/concepts/campaign-lifecycle"},{"title":"Request flow","href":"/concepts/request-flow"},{"title":"Session containers","href":"/concepts/session-containers"},{"title":"Storage and database","href":"/concepts/storage-and-database"},{"title":"Security model","href":"/concepts/security-model"}]},{"group":"Security","icon":"shield-check","pages":[{"title":"Authorized use","href":"/security/authorized-use"},{"title":"Deployment hardening","href":"/security/deployment-hardening"},{"title":"Reporting vulnerabilities","description":"How to report suspected P-BitM vulnerabilities privately and safely.","href":"/security/reporting-vulnerabilities"}]},{"group":"Administration","icon":"settings","pages":[{"title":"Deployment","href":"/administration/deployment"},{"title":"Team and roles","description":"Manage dashboard administrators and operators without weakening campaign ownership or account safeguards.","href":"/administration/users-and-roles"},{"group":"Configuration","icon":"sliders-horizontal","pages":[{"title":"Environment variables","href":"/administration/environment-variables"},{"title":"Networking and TLS","href":"/administration/networking-and-tls"},{"title":"Storage and backups","href":"/administration/storage-and-backups"}]},{"group":"Operations","icon":"wrench","pages":[{"title":"Maintenance","href":"/administration/maintenance"},{"title":"Doctor","href":"/administration/doctor"},{"title":"Troubleshooting","href":"/administration/troubleshooting"}]}]},{"group":"Development","icon":"code-xml","pages":[{"title":"Development setup","href":"/development/setup"},{"title":"Creating and contributing attack vectors","href":"/development/attack-vectors"},{"group":"Application","icon":"boxes","pages":[{"title":"Admin backend","href":"/development/backend"},{"title":"Campaign backend","href":"/development/campaign-backend"},{"title":"Frontend","href":"/development/frontend"},{"title":"Database","href":"/development/database"}]},{"title":"Testing","href":"/development/testing"}]}]},{"tab":"Reference","icon":"book-open","pages":[{"title":"Reference","href":"/reference/cli"}]}]},"title":"Deployment - P-BitM","buildId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","deploymentId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","dynamics":[],"chunks":[]}