> For the complete documentation index, see [llms.txt](https://docs.navigaglobal.com/everyware/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.navigaglobal.com/everyware/developer-documentation/developer-prerequisites/setup-on-linux-ubuntu.md).

# Setup on Linux/Ubuntu

## Linux/Ubuntu Development Environment Setup

**Special setup when developing in the Linux/Ubuntu platform.**

**Install tools in terminal**

```
#Node.js Installation
sudo apt update
sudo apt install nodejs
#cURL Installation
sudo apt-get install curl
#Composer Installation
sudo apt install curl php-mbstring git unzip
curl -sS https://getcomposer.org/installer | sudo php -- --install-
dir=/usr/local/bin --filename=composer
#Gulp Installation
sudo apt install gulp
#Docker Installation
sudo apt install docker-compose

#Verify Installation (Linux/Ubuntu)

node –v #for node
curl –version #for curl
composer #for composer
gulp –v #for gulp
docker –version #for docker
```

### Clone Starter Kit Repository in local from bitbucket:

1. Search the repository in bitbucket and clone it from the bitbucket<br>

   <div align="left"><figure><img src="https://3066417513-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_HLbYnejnUK_QQoiMy%2Fuploads%2FhaPGhX6fLWdMdRiDLPos%2Fimage.png?alt=media&amp;token=ac4bb514-a33e-40c3-bf07-b8a3911eec61" alt=""><figcaption></figcaption></figure></div>

2. Popup will open. Select the option ssh and copy the url from it<br>

   <div align="left"><figure><img src="https://3066417513-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_HLbYnejnUK_QQoiMy%2Fuploads%2FoppvnhNun0VYT47WiWay%2Fimage.png?alt=media&amp;token=460bae17-aecf-42cf-8b7f-40c80772ef2f" alt=""><figcaption><p><br></p></figcaption></figure></div>

3. Paste this url in the terminal<br>

   <figure><img src="https://3066417513-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_HLbYnejnUK_QQoiMy%2Fuploads%2FYniWtYDNZYrvPPBZFKER%2Fimage.png?alt=media&amp;token=65f987a9-3e7a-4824-97df-66fba6a82d3e" alt=""><figcaption></figcaption></figure>

   <br>

4. If you are already an existing customer, then you should use your own repository and checkout in the develop branch, by these commands

```
cd {repository_name}
git checkout develop
```

### **In Starter Kit:**

1. Add .env file in the Starter Kit.
2. Makefile Configuration (Linux/Ubuntu): Update the Makefile in the Starter Kit to fix IP address retrieval issues. Modify the Makefile by making the following adjustments.

Remove below mentioned line

```
export MY_IP := $(shell ifconfig | awk '/inet (addr:)?([0-9]*\.){3}[0-9]*/ {
print $$2 }' | tail -1)
```

Add below lines at the same location

```
ifeq ($(osversion), Linux)
export MY_IP = $(shell ip -4 address | grep 'scope global dynamic' | egrep -
o 'inet [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | cut -d' ' -f2)
else
export MY_IP := $(shell ifconfig | awk '/inet (addr:)?([0-9]*\.){3}[0-9]*/ {
print $$2 }' | tail -1)
endif
$(info $$MY_IP is [${MY_IP}])
```

### &#x20;Starting the Project:

1. Set permissions for docker and initiate the docker container.

```
sudo chmod 666 /var/run/docker.sock
```

2. Install WordPress and Tools: \
   Execute the script for installing WordPress, Composer dependencies, Gulp, and related packages:

```
./bin/init.sh or make init
```

3. Verify Docker Images:

```
docker ps
```

4. Project Start

```
make start
```

\
5\. Gulp Start

```
make gulp watch
```

6. Composer Update

```
make composer update
```

### Updating Host File:

1. Edit Host File: \
   Open the host file for editing.

```
sudo nano /etc/hosts
```

2. Add Project URLs: \
   Write the following lines at the beginning, replacing existing localhost entries.

```
127.0.0.1  localhost site.everywarestarterkit.local
everywarestarterkit.local lavender.everywarestarterkit.local
```

Note: Remove 'https\://' and trailing '' from the project URL.

### **Common Setup Issues:**&#x20;

To prevent conflicts during the setup, ensure that the following services are stopped before initiating the project:

1. **Nginx** \
   Nginx is a web server that may interfere with the Starter Kit. Stop it using the command:

```
sudo service nginx stop
```

2. **MySQL** \
   MySQL is a popular database that may interfere with the Starter Kit. Stop it using the command:

```
sudo service mysql stop
```
