# Configure and manage Harnesses

You can configure networking, environment variables, resources, and storage for your Harness. You can also pause, resume, and delete Harnesses as needed. All configuration can be updated at any time without losing your files.

## Configure networking

You can expose applications running in your Harness by adding public or private ports. You can also attach domains to publicly exposed ports.

To configure a port:

1. Open your Harness overview.

2. Click the **Networking** icon in the right sidebar.

3. Click **Add port**.

4. Enter the port and select the protocol.

5. Enable **Publicly expose** if you want the port to be accessible from the internet.

6. Click **Save changes**.

You can add multiple ports to a Harness.

![Configure Harness networking](https://assets.northflank.com/documentation/v1/application/ai-agents/harnesses/configure-harness.png)

## Configure environment variables

Set runtime variables and secret files that your Harness can access.

1. Open your Harness overview.

2. Click the **Environment variables** icon in the right sidebar.

3. Click **Edit**.

4. Add or update your variables or secret files.

5. Click **Update & restart**.

Learn more about [runtime variables](https://northflank.com/docs/v1/application/secure/inject-secrets#runtime-variables) and [secret files](https://northflank.com/docs/v1/application/secure/upload-secret-files).

![Configure Harness environment variables](https://assets.northflank.com/documentation/v1/application/ai-agents/harnesses/env-harness.png)

## Update Harness configuration

You can update the configuration of an existing Harness, including its authentication, runtime image, resources, and workspace storage.

To update your Harness:

1. Open the Harness overview.

2. Click the **Settings** icon in the right sidebar.

3. Update the configuration you want to change.

4. Click **Update options**.

![Update Harness configuration](https://assets.northflank.com/documentation/v1/application/ai-agents/harnesses/update-harness.png)

## Pause and resume a Harness

You can pause a Harness when you are not using it to scale it to zero. This stops running terminal sessions and processes while preserving files in the Harness workspace.

To pause a Harness:

1. Open the Harness overview.

2. Click the **Pause harness** icon in the top-right corner.

3. Confirm that the Harness has been paused.

To resume a Harness:

1. Open the Harness overview.

2. Click the **Resume harness** icon in the top-right corner.

3. Wait for the Harness to start.

Your files in `/home/harness` are preserved when the Harness is paused and resumed.

## Monitor Harness resources

You can monitor the resource usage of your Harness from the **Observe** section.

To view your Harness metrics:

1. Open the Harness overview.

2. Click the **Observe** icon in the right sidebar.

You can view metrics such as CPU and memory usage to monitor your Harness.

Learn more about [observability on Northflank](https://northflank.com/docs/v1/application/observe/observability-on-northflank).

![Monitor Harness resources](https://assets.northflank.com/documentation/v1/application/ai-agents/harnesses/monitor-harness.png)

## Delete a Harness

You can permanently delete a Harness and its associated workspace.

To delete a Harness:

1. Open the Harness overview.

2. Click the **three-dot** menu in the top-right corner.

3. Click **Delete harness**.

4. Confirm the deletion.

Deletion is permanent and cannot be undone. Make sure you have backed up any files or data you want to keep before deleting the Harness.

![Delete Harness](https://assets.northflank.com/documentation/v1/application/ai-agents/harnesses/delete-harness.png)

> [!note] Questions?
> Reach out to the Northflank team at [[support@northflank.com](mailto:support@northflank.com)](mailto:support@northflank.com) or [book a demo](https://cal.com/team/northflank/northflank-demo?duration=30).

## Next steps

- [Get started with Agent skills: Give agents domain-specific knowledge about Northflank infrastructure and APIs.](/v1/application/ai-agents/agent-skills)
