> ## Documentation Index
> Fetch the complete documentation index at: https://localine.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Standalone Installation

> Instructions for installing the application in a standalone environment

## 1. Installation using PM2 (recommended)

### Prerequisites

Before you begin, ensure you have the following installed on your server or local machine:

* [Node.js](https://nodejs.org/) (includes npm)
* npm (Node Package Manager)
* [PM2](https://pm2.io/)

### Installation Steps

<Steps>
  <Step title="Get the latest release">
    Download the latest release of the application from our [GitHub releases page](https://github.com/localineapp/web-app/releases).

    You can also use the following command to download the latest release directly to your server:

    ```bash theme={null}
    wget https://github.com/localineapp/web-app/releases/latest/download/localineapp.tar.gz
    ```
  </Step>

  <Step title="Extract the downloaded file">
    Once the download is complete, extract the contents of the tarball:

    ```bash theme={null}
    tar -xzf localineapp.tar.gz
    ```
  </Step>

  <Step title="Install dependencies">
    Install the necessary dependencies using npm:

    ```bash theme={null}
    npm install --production
    ```
  </Step>

  <Step title="Build the application">
    Build the application using npm:

    ```bash theme={null}
    npm run build
    ```
  </Step>

  <Step title="Start the application with PM2">
    Start the application using PM2:

    ```bash theme={null}
    pm2 start npm --name "localineapp" -- run start
    ```

    This command will start the application and keep it running in the background. You can check the status of your application with:

    ```bash theme={null}
    pm2 status
    ```
  </Step>

  <Step title="Set up PM2 to start on boot (optional)">
    To ensure that your application starts automatically when the server reboots, set up PM2 to start on boot:

    ```bash theme={null}
    pm2 startup
    pm2 save
    ```

    Follow the instructions provided by the command to complete the setup.
  </Step>
</Steps>

***

## 2. Installation using Screen (not recommended)

### Prerequisites

Before you begin, ensure you have the following installed on your server or local machine:

* [Node.js](https://nodejs.org/) (includes npm)
* npm (Node Package Manager)
* [Screen](https://www.gnu.org/software/screen/)

### Installation Steps

<Steps>
  <Step title="Get the latest release">
    Download the latest release of the application from our [GitHub releases page](https://github.com/localineapp/web-app/releases).

    You can also use the following command to download the latest release directly to your server:

    ```bash theme={null}
    wget https://github.com/localineapp/web-app/releases/latest/download/localineapp.tar.gz
    ```
  </Step>

  <Step title="Extract the downloaded file">
    Once the download is complete, extract the contents of the tarball:

    ```bash theme={null}
    tar -xzf localineapp.tar.gz
    ```
  </Step>

  <Step title="Install dependencies">
    Install the necessary dependencies using npm:

    ```bash theme={null}
    npm ci
    ```
  </Step>

  <Step title="Build the application">
    Build the application using npm:

    ```bash theme={null}
    npm run build
    ```
  </Step>

  <Step title="Start the application with Screen">
    Start a new Screen session:

    ```bash theme={null}
    screen -S localineapp
    ```

    Then, start the application:

    ```bash theme={null}
    npm run start
    ```

    To detach from the Screen session and keep it running in the background, press `Ctrl + A`, then `D`. You can reattach to the session later with:

    ```bash theme={null}
    screen -r localineapp
    ```

    To stop the application, reattach to the Screen session and press `Ctrl + C`.
  </Step>
</Steps>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.