Deploy to Azure App Service with a ZIP package and az webapp deploy
Answer: Create a ZIP package and push it with az webapp deploy --resource-group <group-name> --name <app-name> --src-path <zip-package-path>. App Service unpacks the package into /home/site/wwwroot on Linux or D:\home\site\wwwroot on Windows and restarts the app.
Commands
cd my-app
zip -r app.zip .
az webapp deploy --resource-group <group-name> --name <app-name> --src-path app.zip
# Run the build (including package restore) during deployment
az webapp config appsettings set --resource-group <group-name> --name <app-name> \
--settings SCM_DO_BUILD_DURING_DEPLOYMENT=true
# Other file types
az webapp deploy --resource-group <group-name> --name <app-name> --src-path scripts/startup.sh --type=startup
az webapp deploy --resource-group <group-name> --name <app-name> --src-path driver.jar --type=lib
Packaging rules
- Include only the files and directories in the root directory, not the root directory itself.
- A GitHub repository downloaded as a ZIP file can't be deployed as-is, because GitHub adds nested directories at the top level.
What Kudu does
ZIP package deployment uses the same Kudu service that powers continuous integration-based deployments. It supports:
- deletion of files left over from a previous deployment
- an optional default build process, which includes package restore
- deployment scripts and deployment logs
- a package size limit of 2,048 megabytes
Files are copied only if their timestamps don't match what's already deployed. The CLI command uses the Kudu publish API; with --type=startup, App Service automatically uses your script to start your app.
Portal option
In Kudu (Development Tools > Advanced Tools), Tools > Zip Push Deploy accepts a dragged ZIP package. This endpoint doesn't work for App Service on Linux.
See also
Claims
- id: C1 claim: Do not include the root directory in the ZIP package. source: S1 evidence: "don't include the root directory"
- id: C2 claim: The package size limit is 2,048 megabytes. source: S2 evidence: "A package size limit of 2,048 megabytes"
- id: C3 claim: Files are copied only if their timestamps differ. source: S2 evidence: "Files in the ZIP package are copied only if their timestamps don't match"
Sources
- [S1] Deploy files to App Service. Microsoft Learn (Azure docs). https://learn.microsoft.com/en-us/azure/app-service/deploy-zip . License: CC-BY-4.0. Accessed 2026-11-18.
- [S2] deploy-zip.md (source page). MicrosoftDocs/azure-docs (GitHub). https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/app-service/deploy-zip.md . License: CC-BY-4.0. Accessed 2026-11-18.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Microsoft Learn (Azure docs), Deploy files to App Service; MicrosoftDocs/azure-docs (GitHub), deploy-zip.md (source page). CC-BY-4.0 (https://raw.githubusercontent.com/MicrosoftDocs/azure-docs/main/LICENSE). Copyright Microsoft Corporation. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Microsoft Learn (Azure docs), Deploy files to App Service; MicrosoftDocs/azure-docs (GitHub), deploy-zip.md (source page). CC-BY-4.0 (https://raw.githubusercontent.com/MicrosoftDocs/azure-docs/main/LICENSE). Copyright Microsoft Corporation.
Cite this
iinventedlight. 2026. "Deploy to Azure App Service with a ZIP package and az webapp deploy." iinventedlight Library, iil:note:e6abdyy0, version of 2026-11-18. https://iinventedlight.com/library/notes/azure-app-service-zip-deploy/. License: CC-BY-4.0.
@misc{iil_note_e6abdyy0,
author = {{iinventedlight}},
title = {{Deploy to Azure App Service with a ZIP package and az webapp deploy}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-18},
url = {https://iinventedlight.com/library/notes/azure-app-service-zip-deploy/},
note = {Permanent ID iil:note:e6abdyy0. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/azure-app-service-zip-deploy.md.