> For the complete documentation index, see [llms.txt](https://docker.guides.coticommunity.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docker.guides.coticommunity.com/installing-the-coti-node/installing-docker-on-a-server.md).

# Installing Docker on a Server

This section explains how to install Docker and docker-compose on a server.

The guide starts from the assumption that you have set up a server, and you are connected to the server through ssh.

Root privileges are needed to install Docker, so before executing the commands below, make sure you are logged in as root, using

```bash
sudo su
```

## Installing Docker

Docker provide an official script to install `docker` that works on most systems. The official script can be run with

```bash
curl -fsSL https://get.docker.com | bash
```

Once the command has finished and if it looks successful, you can check whether the Docker was installed correctly with

```bash
docker --version
```

which gave me the output of

```bash
Docker version 23.0.1, build a5ee5b1
```

## Installing docker-compose

The easiest way to install docker-compose is with

```bash
curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose
```

If it looks like the command ran successfully, you can check the version with

```bash
docker-compose --version
```

which should give an output similar to

```bash
Docker Compose version v2.15.1
```

Awesome.

## Summary

If the outputs of `docker --version` and `docker-compose --version` looked similar to the example output above (don't worry about exact version numbers), then your Docker installation should be set up correctly and ready to go.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docker.guides.coticommunity.com/installing-the-coti-node/installing-docker-on-a-server.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
