# Linux OS

### Prerequisites

***

Before proceeding with the installation, please make sure you have the following prerequisites installed:

* Git: [Install Git](https://git-scm.com/)
* Docker: [Install Docker](https://docs.docker.com/get-docker/)
* Docker Compose: [Install Docker Compose](https://docs.docker.com/compose/install/)<br>

### Git Installation

***

Installing Git on Linux is a very easy process and depending on the Linux distribution you are using. Here are the steps for some common Linux distributions:

1. **Ubuntu/Debian**:

* Open a terminal (you can use Ctrl+Alt+T).
* Update the package list:

```
sudo apt update
```

**Install Git:**

```
sudo apt install git
```

2. **Fedora**:
   * Open a terminal.
   * Update the package list

```
sudo dnf update
```

**Install Git:**

```
sudo dnf install git
```

3. **CentOS/RHEL**:
   * Open a terminal.
   * Install Git from the EPEL repository:

```
sudo yum install epel-release
sudo yum install git
```

4. **Other Distributions**:&#x20;

For other Linux distributions, you can use their respective package manager to install Git. Search for the Git package using the package manager and install it.

**Verify Installation**:

* After installation, you can verify Git is correctly installed by opening a terminal and running:

```
git --version
```

### Docker Install

***

Here are detailed instructions to install Docker and Docker Compose on different Linux distributions:

### Ubuntu and Debian-based Systems:

***

Installing Docker on Ubuntu and Debian-based Systems:

1. Open a terminal.
2. Update the package index:

```
sudo apt update
```

3. Install the necessary packages to allow apt to use a repository over HTTPS:

```
sudo apt install apt-transport-https ca-certificates curl software-properties-common
```

4. Add the official Docker GPG key:

```
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
```

5. Add the Docker repository:

   For Ubuntu:

```
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
```

6. Update the package index again:

```
sudo apt update
```

7. Install Docker:

```
sudo apt install docker-ce docker-ce-cli containerd.io
```

8. Verify the installation by running `docker --version` in the terminal. It should display the Docker version number.

### **Installing Docker Compose on Ubuntu and Debian-based Systems:**

***

1. Install Docker Compose using `curl`:

```
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
```

2. Make the `docker-compose` binary executable:

```
sudo chmod +x /usr/local/bin/docker-compose
```

3. Verify the installation by running `docker-compose --version` in the terminal. It should display the Docker Compose version number.

### CentOS:

***

### **Installing Docker on CentOS:**

***

1. Open a terminal.
2. Install the required packages for Docker:

```
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
```

3. Add the Docker repository:

```
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
```

4. Install Docker:

```
sudo yum install -y docker-ce docker-ce-cli containerd.io
```

5. Start Docker:

```
sudo systemctl start docker
```

6. Enable Docker to start on boot:

```
sudo systemctl enable docker
```

7. Verify the installation by running `docker --version` in the terminal. It should display the Docker version number.

### **Installing Docker Compose on CentOS:**

***

1. Install Docker Compose using `curl`:

```
 sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
```

2. Make the `docker-compose` binary executable:

```
sudo chmod +x /usr/local/bin/docker-compose
```

3. Verify the installation by running \`

```
 docker-compose --version` in the terminal. It should display the Docker Compose version number.
```

### Other Linux Distributions:

***

For other Linux distributions, the installation steps for Docker and Docker Compose may vary. It's recommended to refer to the official Docker documentation for instructions specific to your distribution:

* Docker installation: <https://docs.docker.com/engine/install/>
* Docker Compose installation: <https://docs.docker.com/compose/install/>

Make sure to follow the instructions provided for your specific Linux distribution to ensure a successful installation of Docker and Docker Compose.

To verify if Docker and Docker Compose are installed correctly, run the following commands:

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

Make sure you see the version numbers for both commands.

### **Installation:**

***

1. Open the `docker/docker-compose.yml` file and review the environment variables defined under the backend service section. These variables control various aspects of the application, including SMTP configuration and database settings. It is recommended to change the default values, especially for sensitive information such as passwords.

```
git clone https://github.com/SimpleAccounts/SimpleAccounts-UAE.git
cd SimpleAccounts-UAE
```

2. Clone the SimpleAccounts-UAE repository:
3. Start the application using Docker Compose:

```
docker-compose up -d
```

This command will download the required Docker images and start the containers in the background.

Access the SimpleAccounts-UAE application by opening your web browser and navigating to [http://localhost:80](http://localhost/).

### Environment Variables

***

The following environment variables can be configured in the `docker/docker-compose.yml` file under the backend service section:

* `SIMPLEVAT_SMTP_USER`: SMTP username for sending emails.
* `SIMPLEVAT_SMTP_PASS`: SMTP password for authentication.
* `SIMPLEVAT_SMTP_HOST`: SMTP server hostname.
* `SIMPLEVAT_SMTP_PORT`: SMTP server port.
* `SIMPLEVAT_SMTP_AUTH`: SMTP authentication method.
* `SIMPLEVAT_SMTP_STARTTLS_ENABLE`: Enable STARTTLS for SMTP connection.
* `SIMPLEVAT_RELEASE`: Application release version.
* `SIMPLEVAT_HOST`: Application host URL.
* `SIMPLEVAT_DB_HOST`: Hostname of the PostgreSQL database.
* `SIMPLEVAT_DB`: Name of the PostgreSQL database.
* `SIMPLEVAT_DB_USER`: PostgreSQL database username.
* `SIMPLEVAT_DB_PASSWORD`: PostgreSQL database password.
* `SIMPLEVAT_DB_PORT`: PostgreSQL database Port number.

It is recommended to review and update these variables according to your specific configuration.

> Note: Please ensure that sensitive information, such as passwords, are stored securely and not committed to version control.


---

# 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://docs.simpleaccounts.io/getting-started/installation-guide/linux-os.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.
