# De-enshittify Gitlab (remove Gitlab Duo sidebar and slop features)

> Source: <https://gist.github.com/philpem/e2d12d08516db17267fbee753c5457d5>
> Published: 2026-10-22 13:52:03+00:00

**Key takeaway:** Setting duo_features_enabled=false, lock_duo_features_enabled=true and duo_availability=never_on via the GitLab application settings API removes the Duo sidebar on self-hosted instances such as 19.5.1 in Docker.

I'm stuck with Gitlab because I need project/repo hierarchies to deal with the RISC OS source code, and Forgejo currently doesn't support them (I haven't tried Gitea). Unfortunately on the free tier, there's a very invasive sidebar which pimps the Gitlab Duo AI slop features, and doesn't seem to have an "off" switch in the admin panel.

This is how you de-enshittify Gitlab a little by removing the Duo panel. (tested on 19.5.1 self-hosted in Docker).

From [https://gitlab.com/gitlab-org/gitlab/-/merge_requests/257551](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/257551)

As an instance admin, create a private token and copy it.

Run this command, replacing `<token>` with your token, and `GITLAB.EXAMPLE.COM` with the URL of your Gitlab instance.

```
curl --request PUT --header "PRIVATE-TOKEN: <token>" \
     --data "duo_features_enabled=false&lock_duo_features_enabled=true&duo_availability=never_on" \
     "https://GITLAB.EXAMPLE.COM/api/v4/application/settings"
```

Hit F12, open the browser's developer console. Enable pasting. Paste in this block of code:

``` js
const response = await fetch('/api/v4/application/settings', {
  method: 'PUT',
  credentials: 'same-origin',
  headers: {
    'Content-Type': 'application/json',
    'X-CSRF-Token': document.querySelector('meta[name="csrf-token"]').content
  },
  body: JSON.stringify({
    duo_features_enabled: false,
    lock_duo_features_enabled: true,
    duo_availability: 'never_on'
  })
});

if (!response.ok) {
  throw new Error(`${response.status}: ${await response.text()}`);
}

const settings = await response.json();
console.log({
  duo_availability: settings.duo_availability,
  duo_features_enabled: settings.duo_features_enabled,
  lock_duo_features_enabled: settings.lock_duo_features_enabled
});
```

Refresh the page and the sidebar and Duo features should be disabled.
