> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/open-source/use-harness-open-source/gitspaces/develop-in-gitspaces/user-config.md).

# Configuring containerUser and remoteUser in Gitspace

This guide explains how to set up `containerUser` and `remoteUser` in your Gitspace using the properties in the `devcontainer.json` schema.

### What are "containerUser" and "remoteUser"? <a href="#what-are-containeruser-and-remoteuser" id="what-are-containeruser-and-remoteuser"></a>

These properties control the permissions of applications executed within containers, giving developers fine-grained control over container operations. ([Read more about the specification here.](https://containers.dev/implementors/spec/))

**`containerUser`**

* The user with which the **development container is started**.
* It handles all processes and operations inside the container.
* This concept is native to containers.
* The default user is either the user specified in the **Docker image** or the **root user**.

**`remoteUser`**

* The username used for **running processes inside the container**, including lifecycle scripts and any remote editor/IDE server processes.
* This concept is not native to containers.
* The default user is the same as the **containerUser**.

### How to define a containerUser? <a href="#how-to-define-a-containeruser" id="how-to-define-a-containeruser"></a>

You can define a containerUser in the following ways:

1. Using the **containerUser** Property in `devcontainer.json`:

```
"containerUser": "root"
```

2. Using the user Argument in the **runArgs** Property in `devcontainer.json`:

```
"runArgs": ["--user=root"]
```

3. Defining **user** during the Image Build (Image Metadata).

**Priority Order:**

If multiple definitions exist, the containerUser is set based on the following priority:

1. `runArgs` definition
2. `devcontainer.json` specification
3. Image Build

### How to define a remoteUser? <a href="#how-to-define-a-remoteuser" id="how-to-define-a-remoteuser"></a>

You can define a remoteUser in the following ways:

1. Using the **remoteUser** Property in `devcontainer.json`:

```
"remoteUser": "vscode"
```

2. Defining **remoteUser** in Image Metadata.

**Priority Order:**

If multiple definitions exist, the remoteUser is set based on the following priority:

1. `devcontainer.json` specification
2. Image metadata

{% hint style="info" %}
**Static Password**: A static password is maintained for the remoteUser in case the user gets locked: **Harness\@123**.
{% endhint %}

{% hint style="info" %}
We assume that the user has a valid home directory. For the root user: **/root** and For non-root users: **/home/username**
{% endhint %}

### Verifying the Setup <a href="#verifying-the-setup" id="verifying-the-setup"></a>

After adding this property, you can verify the setup by reviewing the **container logs** during the creation of a Gitspace via the Harness UI.

![](/files/QvZQS9MzMETxQEQImzE6)
