> For the complete documentation index, see [llms.txt](https://hypnoticsiege.gitbook.io/hypeapps-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hypnoticsiege.gitbook.io/hypeapps-documentation/docs.md).

# Docs

First, you'll need to login into your server. You can use [WinSCP](https://winscp.net/eng/index.php) for your FTP login & [PuTTY](https://www.putty.org/) for SSH. Open PuTTY and fill in your IP into host name and then connect. Then follow the on screen instructions on what user to login as and the password. Your username will most likely be "root" and password was set by you when purchasing or setting up this VPS.&#x20;

*When putting your password, you will not see actual typing for security reasons.*

### Updating System

Let's start off by making sure our system is up to date with updates, packages, ect.

Run the following command to update.

```
sudo apt update
```

### Node JS Install

I personally like to use **NVM** to manage my Node JS versions. You can follow other guides on this but make sure your Node version is above 16 :)

```
sudo apt update
sudo curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
```

Then you'll restart your terminal session by closing it and re-opening it.&#x20;

Then actually to install Node JS

```
nvm --version
nvm ls
nvm install 16.13.0
nvm use node
```

### NGINX Install&#x20;

We'll use NGINX as a reverse proxy for our site. This will be further explained below. For now install like so.

```
sudo apt install nginx
```

After prompted, press `Y` to install.&#x20;

After that, go to your favorite web browser and make a new tab and type your VPS' IP. You should see the NGINX welcome page. If not then your installation was not correct or NGINX is not started.

### MySQL Install

My site does require a MySQL Database to store applications & their data, status, ect.&#x20;

To install MySQL, use this:

```
sudo apt install mysql-server
```

Again, press `Y` to install.

Now you'll also need the MYSQL secure install by running this

```
sudo mysql_secure_installation
```

Read along what is prompted and decide what you would like in the installation. Most of these you can just type `Y`, but be sure to read.

### Certbot Install (SSL)

To make sure your website has a SSL certificate (appears as secure), you'll need Certbot installed for this. Install it like below&#x20;

```
sudo apt install certbot python3-certbot-nginx
```

### **NGINX Configuration**

**Credit to FAXES on this part.**&#x20;

Because EJS Websites use NodeJS to function we need to setup a proxy to have our website work on a domain through NGINX. Navigate to your NGINX site config: `/etc/nginx/sites-available/default`

Insert the below into your config file. Ensure to edit the relevant points. If this is your first time editing this file, you may feel free to delete all other content inside of it, so you start blank before pasting this in.

```
server {
    
  server_name example.com; # Change domain to yours.
    
  location / {
    proxy_pass http://localhost:3000; # Change the port if changed in the config file.
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
    proxy_set_header X-Real-IP $remote_addr;
  }    
}
```

Restart Nginx to make the changes.

```
sudo systemctl restart nginx
```

Now let's make an SSL certificate for our domain:

```
sudo add-apt-repository ppa:certbot/certbot
sudo apt install python3-certbot-nginx

sudo certbot --nginx -d example.com
```

When prompted, it is advised to pick the second option to route all traffic securely with HTTPS.&#x20;

If you'd like your SSL to auto renew, you can run this command `sudo certbot renew --dry-run`


---

# 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:

```
GET https://hypnoticsiege.gitbook.io/hypeapps-documentation/docs.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.
