# Azure App Service Linux

> Publish an ASP.NET Core app with TX Text Control to Azure App Service on Linux: linux-x64 publish from Visual Studio or CLI, app settings, logs and containers.

- **Product:** TX Text Control .NET Server
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control .NET Server > Deployment Guide > Azure > Azure App Service Linux
- **1832 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/deployment/azure/app-service-linux/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/deployment/azure/app-service-linux/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/deployment/azure/app-service-linux/llms-full.txt

---

On Linux, Azure App Service needs fewer preparations for TX Text Control .NET Server than on Windows. WebSockets are always available, there's no 32-bit platform to switch off and the Core engine brings its fonts with the application. The application only has to be published for `linux-x64`, so that the native Linux libraries of TX Text Control are part of the deployment.

The steps follow Text Control's tutorial and publish the application of [Document Editor: ASP.NET Core](https://docs.textcontrol.com/tx-text-control-dotnet-server/getting-started/document-editor/aspnet-core/llms-full.txt) from Visual Studio or with the Azure CLI. A last section shows the settings for a container image instead of code.

### Prerequisites

- **An Azure subscription.**
- **An ASP.NET Core application with the Core engine**, for example the application of [Document Editor: ASP.NET Core](https://docs.textcontrol.com/tx-text-control-dotnet-server/getting-started/document-editor/aspnet-core/llms-full.txt). The Classic engine doesn't run on Linux.
- **Visual Studio 2026**, or the .NET CLI and the Azure CLI.
- **A plan in the Basic tier or higher.** In the Free tier, a Linux app accepts five WebSocket connections, and further connections are rejected with status 429. An editor opens two WebSocket connections while it initializes.
- **Runtime licenses.** Each instance of the App Service needs one. See [Runtime Licenses](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/licensing/runtime/#cloud-and-container-deployments).

### Create the App Service and Publish From Visual Studio

1. In Solution Explorer, right-click the project and choose **Publish**.
2. Select **Azure** as the target and click **Next**.
3. Select **Azure App Service (Linux)** and click **Next**.

    ![The Publish dialog asking which Azure service hosts the application, with Azure App Service (Linux) selected among Azure Container Apps (Linux), Azure App Service (Windows), Azure App Service Container, Azure Container Registry and Azure Virtual Machine.](https://docs.textcontrol.com/assets/img/tx-text-control-dotnet-server/vs-publish-azure-service.bd64aca2.webp)
4. Sign in to your Azure account. Select an existing App Service, or click **Create new**.
5. For a new App Service, enter the **Name**, select the **Subscription name**, the **Resource group** and a **Hosting Plan** in the Basic tier or higher and click **Create**.

    ![The App Service (Linux) Create new dialog of Visual Studio with the fields Name, Subscription name, Resource group and Hosting Plan.](https://docs.textcontrol.com/assets/img/tx-text-control-dotnet-server/vs-create-app-service-linux.3dab59e3.webp)
6. Check the summary and click **Finish**. Visual Studio creates a publish profile.
7. In the settings of the publish profile, keep **Configuration** at **Release** and **Deployment Mode** at **Framework-dependent**, and make sure that **Target Runtime** is **linux-x64**. Click **Publish**.

    ![The Zip Deploy publish profile for Azure App Service (Linux) with Configuration Release, Deployment Mode Framework-dependent and Target Runtime linux-x64 circled, and the Publish button circled.](https://docs.textcontrol.com/assets/img/tx-text-control-dotnet-server/vs-publish-profile-linux.2a598d8a.webp)

Visual Studio publishes the application and opens it in the browser. The page with the Document Editor shows the editor with its ribbon. Unlike on Windows, no setting in the Azure portal is needed first.

![The Document Editor with its ribbon, a welcome text and a table, running in a browser at an azurewebsites.net address.](https://docs.textcontrol.com/assets/img/tx-text-control-dotnet-server/editor-on-app-service.b51cc6ab.webp)

### Publish With the Azure CLI

Without Visual Studio, create a Linux plan in the Basic tier and the web app:

```bash
az appservice plan create -g MyResourceGroup -n MyPlan --is-linux --sku B1
az webapp list-runtimes --os-type linux
az webapp create -g MyResourceGroup -p MyPlan -n <app-name> --runtime <runtime>
```

Use a .NET value from the output of `az webapp list-runtimes` for `--runtime`. Publish the application for `linux-x64`, pack the output into a ZIP file and deploy it:

```powershell
dotnet publish -c Release -r linux-x64 --self-contained false -o publish
Compress-Archive -Path publish\* -DestinationPath app.zip
az webapp deploy -g MyResourceGroup -n <app-name> --src-path app.zip
```

A ZIP deployment doesn't build the application on App Service, so the packages from the Text Control Private NuGet Feed are restored only on your machine or build server.

### Configure the Application With App Settings

App settings in the App Service override the values of *appsettings.json*. On Linux, nested keys use two underscores instead of the colon. To bind the Document Editor backend to the loopback address, for example, with `DocumentEditorWorkerOptions` bound as in [Prepare the Application](https://docs.textcontrol.com/tx-text-control-dotnet-server/deployment/linux/ubuntu/#prepare-the-application):

```bash
az webapp config appsettings set -g MyResourceGroup -n <app-name> --settings DocumentEditorWorker__ListenAddress=127.0.0.1 DocumentEditorWorker__Port=4283
```

Pass the same address and port to `UseTXWebSocketMiddleware` in *Program.cs*.

### Check the Application

- **Open the site** at its default domain, which has the form `<app-name>-<hash>.<region>.azurewebsites.net`.
- **Turn on and stream the logs** of the container that runs your application:

    ```bash
    az webapp log config -g MyResourceGroup -n <app-name> --docker-container-logging filesystem --level Verbose
    az webapp log tail -g MyResourceGroup -n <app-name>
    ```

    The application passes the messages of the Document Editor backend to its logging, so lines such as "Starting TCP listener on port 4283" appear here. A 404 for */robots933456.txt* is a health check of App Service and can be ignored.
- **Open a shell** in the container with `az webapp ssh -g MyResourceGroup -n <app-name>`. Changes outside */home* are lost when the app restarts.

### Deploy a Container Image

App Service on Linux also runs a container image, for example the image from [Dockerfile](https://docs.textcontrol.com/tx-text-control-dotnet-server/deployment/docker/dockerfile/llms-full.txt) pushed to Azure Container Registry. In the Azure portal, select **App Services** > **Create** > **Web App**, choose **Container** and **Linux** on the **Basics** tab and select the registry, the image and the tag on the **Container** tab.

The .NET images listen on port 8080. Tell App Service the port of the container:

```bash
az webapp config appsettings set -g MyResourceGroup -n <app-name> --settings WEBSITES_PORT=8080
```

App Service can expose only one HTTP port of a container. The Document Editor backend runs inside the same container and needs no exposed port.

### Run Several Instances

When the App Service scales out, keep **Session affinity** on, which is the default, and plan a runtime license for each instance, as [Scaling and Licensing](https://docs.textcontrol.com/tx-text-control-dotnet-server/deployment/azure/#scaling-and-licensing) describes.

### Next Steps

- [Azure App Service Windows](https://docs.textcontrol.com/tx-text-control-dotnet-server/deployment/azure/app-service-windows/llms-full.txt): the same application on App Service on Windows.
- [Linux Requirements](https://docs.textcontrol.com/tx-text-control-dotnet-server/deployment/linux/requirements/llms-full.txt): what TX Text Control needs on Linux.
- [CI/CD](https://docs.textcontrol.com/tx-text-control-dotnet-server/deployment/ci-cd/llms-full.txt): deploy from a pipeline.
- [Troubleshooting Azure](https://docs.textcontrol.com/tx-text-control-dotnet-server/troubleshooting/azure/llms-full.txt): solve problems in App Service.

---

## Nearby

- **Previous:** [Azure App Service Windows](https://docs.textcontrol.com/tx-text-control-dotnet-server/deployment/azure/app-service-windows/llms-full.txt)
- **Next:** [AWS](https://docs.textcontrol.com/tx-text-control-dotnet-server/deployment/aws/llms-full.txt)
