Skip to content

Instantly share code, notes, and snippets.

@philpem
Last active October 26, 2026 10:25
Show Gist options
  • Select an option

  • Save philpem/e2d12d08516db17267fbee753c5457d5 to your computer and use it in GitHub Desktop.

Select an option

Save philpem/e2d12d08516db17267fbee753c5457d5 to your computer and use it in GitHub Desktop.
De-enshittify Gitlab (remove Gitlab Duo sidebar and slop features)

De-enshittify Gitlab (CE/EE self-hosted)

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).

cURL method

From 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"

Browser console method

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment