---
description: Start here to build install Pushkin and its dependencies on Ubuntu Linux.
---

# Ubuntu Linux

These instructions were created using Ubuntu 18.04 and the apt package manager. They should generalize to other Linux distributions and package managers, however.

## Skip to section

* [Install curl](#install-curl)
* [Install Node.js](#install-nodejs)
* [Install and configure Yarn](#install-and-configure-yarn)
* [Install Yalc](#install-yalc)
* [Install pushkin-cli](#install-pushkin-cli)
* [Install and configure Docker Engine and Docker Compose](#install-and-configure-docker-engine-and-docker-compose)
* [Next steps](#next-steps)

### Install curl

First, ensure that you have curl installed, as this will be necessary to download Node.js. If it isn't installed, you can install it using the following commands:

```bash
 sudo apt update
 sudo apt install curl
```

![](https://2413710172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBpE95WB58asBviCj30%2Fuploads%2Fgit-blob-243806ff10489c603e9ecc89217984123adf41b4%2Fubuntu1%20\(1\).gif?alt=media)

### Install Node.js

To install Node.js, first run the following command to install nvm:

```bash
 curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
 source ~/.bashrc 
```

Then use nvm to install Node.js:

```bash
 nvm install 20.2.0
```

In case the preferred version of Node.js is changed, use the following commands to update:

```bash
 nvm install <node_version>
 nvm use <node_version>
```

![](https://2413710172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBpE95WB58asBviCj30%2Fuploads%2Fgit-blob-0f7f3f49154d36e07e249495db6d4cbe4403951c%2Fubuntu2%20\(1\).gif?alt=media)

### Install and configure Yarn

You will next want to install the Yarn package manager. Official instructions (copied below for convenience) are available [here](https://classic.yarnpkg.com/en/docs/install/#debian-stable).

Use npm, which comes bundled with Node.js that you just installed:

```bash
 npm install --global yarn
```

Then check that Yarn is installed by running:

```bash
yarn --version
```

![](https://2413710172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBpE95WB58asBviCj30%2Fuploads%2Fgit-blob-bf31e9db39d89fa1a84b2c2788e03cea49c8aec7%2Fubuntu3%20\(1\).gif?alt=media)

To allow Yarn to install pushkin-cli globally, run the following steps, based on [this Stack Overflow solution](https://stackoverflow.com/questions/40317578/yarn-global-command-not-working/53879534#53879534).

Run the following:

```bash
 yarn config set prefix ~/.yarn
 echo -e '\nexport PATH="$PATH:`yarn global bin`"\n' >> ~/.bashrc
 source ~/.bashrc
```

![](https://2413710172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBpE95WB58asBviCj30%2Fuploads%2Fgit-blob-c2c48f652aef7ab7c538aecb9de00f5e1118ddf3%2Fubuntu4%20\(1\).gif?alt=media)

### Install Yalc

Install Yalc globally.

```bash
 yarn global add yalc
```

![](https://github.com/pushkin-consortium/pushkin/tree/ed8e59c86dfdd71e3662583683010b92cb95b39d/docs-gitbook/.gitbook/assets/ubuntu13.gif)

### Install pushkin-cli

Next, install the pushkin-cli package globally.

```bash
 yarn global add pushkin-cli
```

![](https://2413710172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBpE95WB58asBviCj30%2Fuploads%2Fgit-blob-90d89ceea4b94fb54bc421c064ccdefb04b12879%2Fubuntu5%20\(1\).gif?alt=media)

Confirm that pushkin-cli is installed by running:

```bash
 pushkin --help
```

You should get a list of commands with some documentation for each.

![](https://2413710172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBpE95WB58asBviCj30%2Fuploads%2Fgit-blob-52c07f53558469edbe0eb2e05867af02adf1f792%2Fubuntu6%20\(1\).gif?alt=media)

Confirm that you have version `2.0.0` or later by running:

```bash
 pushkin --version
```

and reading the output.

### Install and configure Docker Engine and Docker Compose

Next, install Docker Engine [using these instructions](https://docs.docker.com/engine/install/ubuntu/) (copied below for convenience).

```bash
 sudo apt-get update
 sudo apt-get install ca-certificates curl gnupg
```

![](https://2413710172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBpE95WB58asBviCj30%2Fuploads%2Fgit-blob-6f28a56cf69995ce00d37967347ed7d82f6d5361%2Fubuntu7%20\(1\).gif?alt=media)

Add Docker’s official GPG key:

```bash
 sudo install -m 0755 -d /etc/apt/keyrings
 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
 sudo chmod a+r /etc/apt/keyrings/docker.gpg
```

Use the following command to set up the repository:

```bash
 echo \
  "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
```

![](https://2413710172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBpE95WB58asBviCj30%2Fuploads%2Fgit-blob-c0e94a9eddcfe366d92eb2f518f9a4e93b7b0474%2Fubuntu8%20\(1\).gif?alt=media)

Next, update the apt package index:

```bash
 sudo apt-get update
```

Install Docker Engine, containerd, and Docker Compose:

```bash
 sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose docker-compose-plugin
```

![](https://2413710172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBpE95WB58asBviCj30%2Fuploads%2Fgit-blob-1e2eb5440180fa8b584cd25057253f48ce883940%2Fubuntu9%20\(1\).gif?alt=media)

Check that Docker Engine is installed correctly by running:

```bash
 sudo docker run hello-world
```

If Docker Engine and Docker Compose are installed correctly, this should generate some output, including:

```bash
Hello from Docker!
This message shows that your installation appears to be working correctly.
```

![](https://2413710172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBpE95WB58asBviCj30%2Fuploads%2Fgit-blob-cb69727f29bbde3bc313d245a13413e860dd5174%2Fubuntu10%20\(1\).gif?alt=media)

Next, follow [these post-installation instructions](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user) (copied below for convenience) to manage Docker as a non-root user. (You can ignore the rest of the post-installation instructions.)

```bash
 sudo groupadd docker
 sudo usermod -aG docker $USER
 newgrp docker 
 docker run hello-world
```

![](https://2413710172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBpE95WB58asBviCj30%2Fuploads%2Fgit-blob-8d67e7de5dd9501f5f5bb03ae5427ac56101c1c4%2Fubuntu11%20\(1\).gif?alt=media)

### Next steps

Great! You're all done. Head over [here](../quickstart) to build a basic Pushkin site and experiment.
