# Installation Server

The [source code ](https://github.com/Adaptix-Framework/AdaptixC2)of AdaptixС2 is available on github. The `main` branch is a stable version and does not contain the latest changes.

```bash
git clone https://github.com/Adaptix-Framework/AdaptixC2.git
cd AdaptixC2
```

## Preinstall

{% hint style="info" %}
Adaptix teamserver is designed to run on a Linux server.\
\
To build extenders you need updated Mingw. Advice on building server and extenders (**tested**): using Ubuntu 24, Debian 12, or Dockerfile.
{% endhint %}

To build Server and Extenders, you need to install additional dependencies. Please note that *golang 1.25.4* is required to compile and run AdaptixServer (and special [patched golang](https://github.com/Adaptix-Framework/go-win7) for win7 gopher agent).

{% tabs %}
{% tab title="Auto" %}
For Linux, you can use a specially prepared script that will install and configure the necessary packages for both the server and client parts. Link — [pre\_install\_linux\_all.sh](https://raw.githubusercontent.com/Adaptix-Framework/AdaptixC2/refs/heads/main/pre_install_linux_all.sh)

<figure><img src="/files/Kaqy7w2bh6haSM0FkpkN" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Manual" %}

```bash
sudo apt install mingw-w64 make gcc g++ g++-mingw-w64

wget https://go.dev/dl/go1.25.4.linux-amd64.tar.gz -O /tmp/go1.25.4.linux-amd64.tar.gz
sudo rm -rf /usr/local/go /usr/local/bin/go
sudo tar -C /usr/local -xzf /tmp/go1.25.4.linux-amd64.tar.gz
sudo ln -s /usr/local/go/bin/go /usr/local/bin/go

# for windows 7 support by gopher agent
git clone https://github.com/Adaptix-Framework/go-win7 /tmp/go-win7
sudo mv /tmp/go-win7 /usr/lib/
```

{% endtab %}
{% endtabs %}

## Build on Server

AdaptixServer and Extenders (goplugins) must be built **with the same version of the golang** package.&#x20;

```bash
make server-ext
```

<figure><img src="/files/rfY1dcKFuhh4swfDVVAr" alt=""><figcaption></figcaption></figure>

All compiled files will be located in the dist directory.

<figure><img src="/files/WP1D7bCjyLgMIgUk7VRZ" alt=""><figcaption></figcaption></figure>

## Build in Docker

The compiled files will be located in the `AdaptixServer/server-dist` directory.

<table><thead><tr><th width="342">Profile</th><th>Description</th></tr></thead><tbody><tr><td><code>make docker-build-server</code></td><td>Build server only</td></tr><tr><td><code>make docker-build-extenders</code></td><td>Build extenders only</td></tr><tr><td><code>make docker-build-ext</code></td><td>Build server and extenders together</td></tr><tr><td><code>make docker-up</code></td><td>Server runtime container</td></tr></tbody></table>

Added Docker cleanup targets for better build artifact management:

* `docker-clean`: Remove Docker containers and images (builders only)
  * Removes containers and images for `build-server`, `build-extenders`, and `build-server-ext` profiles
  * Preserves runtime container
* `docker-clean-all`: Remove all Docker artifacts (containers, images, volumes, networks)
  * Removes all build profiles including runtime
  * Cleans build output directories (`AdaptixServer/server-dist`)
  * Complete cleanup for fresh rebuilds


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://adaptix-framework.gitbook.io/adaptix-framework/adaptix-c2/getting-starting/installation-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
