> For the complete documentation index, see [llms.txt](https://docs.payram.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payram.com/deployment-guide/quick-setup.md).

# Quick Setup

In this section, you’ll go through the complete setup of your PayRam server, including installation, security configuration, and encryption, to ensure it is fully prepared and running smoothly.

***

## **Prerequisites**

Before starting, please ensure your system meets the following requirements:

### **Server configuration**

* Use a VPS or dedicated server with the minimum specifications required to host the PayRam server.

{% hint style="info" %} <mark style="color:$primary;">**Recommended VPS Providers:**</mark>

* **AWS**
* **Google Cloud (GCP)**
* **Azure**
* **Hetzner**
* **Hostinger**
  {% endhint %}

### **Minimum server requirements**

* **CPU**: 2 cores
* **RAM**: 4 GB
* **Storage**: 50 GB SSD (the installer requires at least 5 GB free, and recommends 10 GB)
* **Operating System**: Ubuntu 22.04 or another supported distribution

{% hint style="info" %} <mark style="color:$primary;">**Supported operating systems:**</mark> <mark style="color:$info;">Ubuntu, Debian, Linux Mint, CentOS, RHEL, Rocky Linux, AlmaLinux, Fedora, Arch Linux, and Alpine Linux. macOS is supported for local testing only, and runs over HTTP without SSL.</mark>
{% endhint %}

{% hint style="info" %} <mark style="color:$primary;">**Note**</mark><mark style="color:$info;">: Depending on your expected usage and scale, additional resources may be required.</mark>
{% endhint %}

### **Network requirements**

* Ensure the following ports are open on your server or VPS:

  | Port | Purpose                                                                                        |
  | ---- | ---------------------------------------------------------------------------------------------- |
  | 80   | HTTP. Serves the dashboard, payment pages, and API. Redirects to 443 when SSL is enabled.      |
  | 443  | HTTPS. Required only when PayRam terminates TLS itself (Let's Encrypt or custom certificates). |

### Database configuration

* To run PayRam smoothly, you must provision a PostgreSQL database with the following minimum configuration:

  **Minimum database requirements**:

  * **Database engine**: PostgreSQL
  * **vCPUs**: 1 CPU cores
  * **Memory**: 1 GB
  * **Storage**: 50 GB SSD

{% hint style="info" %} <mark style="color:$primary;">**Note**</mark> <mark style="color:$info;">: These are the baseline requirements. Using a smaller configuration may cause performance issues during high transaction loads or while processing sweeps. You can scale up depending on the expected transaction volume.</mark>
{% endhint %}

***

## PayRam setup

{% stepper %}
{% step %}

### Connect to your VPS

* Use SSH to connect to your server instance.
  {% endstep %}

{% step %}

### Run the command

* Open your terminal and run the installer. Add sudo before the command if elevated privileges are required.

```bash
bash <(curl -fsSL https://payram.com/setup_payram.sh)
```

<figure><img src="/files/I9JPoGpClhd98zd3u8UJ" alt="Running the PayRam install command in the terminal"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Choose your operation

* PayRam opens an operations menu. Enter **1** and press Enter to begin a fresh installation.

<figure><img src="/files/zmMUJO9D5ngKaGbll2VV" alt="The PayRam operations menu shown when the command is run with no options"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Choose your network

* Next, enter **1** for mainnet or **2** for testnet, then press Enter.

<figure><img src="/files/haTtyMFv1tG4P9EQAs44" alt="Choosing between mainnet and testnet"><figcaption></figcaption></figure>

{% hint style="info" %} <mark style="color:$primary;">**Note**</mark> <mark style="color:$info;">: Mainnet is used for production, while Testnet is used for development and for testing PayRam features. Testnet is recommended for a first install.</mark>

<mark style="color:$warning;">**Testing Card-to-Crypto?**</mark> <mark style="color:$info;">Install on Mainnet. Card payments are not fully available on Testnet, and stablecoin purchases require a Mainnet setup.</mark>
{% endhint %}
{% endstep %}

{% step %}

### Installing necessary dependencies

* The script then handles the rest of the setup automatically. It checks for previous installations, validates required ports, detects the operating system, and ensures compatibility. Next, it installs or verifies Docker and PostgreSQL, creates the needed directories, and performs a disk space check. If any problems are found (such as low storage), the script will display a warning and ask you to confirm whether to proceed by typing Y or N.

<figure><img src="/files/S4W0vvgWVqqZCepxG3AE" alt="System detection, disk space check and dependency installation"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Database setup

* Once the dependencies are installed, you are prompted to choose between an External PostgreSQL Database and a Containerized PostgreSQL Database.

<figure><img src="/files/WsykiHwj5yrLpGmj4Maz" alt="Database configuration options"><figcaption></figcaption></figure>

* Enter **1** or **2** based on your requirement.

{% hint style="info" %} <mark style="color:$primary;">**Note**</mark> <mark style="color:$info;">: Option 1 is recommended for production environments.</mark>
{% endhint %}

{% tabs %}
{% tab title="Option 1" %}

* If you enter **1**, you’ll be prompted for the following details:

  * **Database Host**
  * **Port**
  * **Database Name**
  * **Username**
  * **Password**

  These details establish the connection between PayRam and your PostgreSQL database.
* You can find them in your PostgreSQL server configuration or your hosting provider’s control panel. If you’re using a managed PostgreSQL service (for example, AWS RDS, Azure Database, or DigitalOcean), these values are available in the database connection settings.
* **Example connection string**:

  ```bash
  postgresql://myuser:mypassword@db.example.com:5432/mydatabase
  ```

  * In this example:
    * `myuser` → Database username
    * `mypassword` → Database password
    * `db.example.com` → Database host
    * `5432` → Database port
    * `mydatabase` → Database name
      {% endtab %}

{% tab title="Option 2" %}
{% hint style="info" %} <mark style="color:$primary;">**Note**</mark> <mark style="color:$info;">: This option is for testing only. For production environments, always use Option 1.</mark>
{% endhint %}

* If you enter **2**, the script creates a local PostgreSQL database using Docker with the following default credentials:

  ```bash
    postgres.host: "localhost"
    postgres.port: "5432"
    postgres.database: "payram"
    postgres.username: "payram"
    postgres.password: "payram123"
  ```

{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### SSL configuration

* After setting up the database, the script will prompt you to configure SSL by choosing from Let’s Encrypt (auto-generate free SSL), Custom Certificates (use your own), or no SSL for now.

<figure><img src="/files/2Rr9R5ZoEyJCkgT7N6t1" alt="SSL certificate setup options"><figcaption></figcaption></figure>

* Enter **1**, **2**, or **3**.

{% tabs %}
{% tab title="Option 1" %}

* If you enter **1**, Let’s Encrypt will automatically generate and install a free SSL certificate for your domain within minutes, with certificates trusted by all browsers and auto-renewed every 90 days.
* You will be asked for the domain name that points to this server.
  {% endtab %}

{% tab title="Option 2" %}

* Enter **2** if you already have your own SSL certificates.
* When prompted, enter the **domain name** your certificates are issued for. PayRam looks for them at `/etc/letsencrypt/live/<domain>/`, so place `fullchain.pem` and `privkey.pem` there before you start.
* The script verifies both files and validates the certificate before continuing. If a file is missing or the certificate is expired or mismatched, you can enter a different domain or skip SSL.
  {% endtab %}

{% tab title="Option 3" %}

* Enter **3** to skip SSL for now. PayRam starts on HTTP (port 80) immediately, with no domain or certificate needed. You can add SSL certificates later.
  {% endtab %}
  {% endtabs %}
  {% endstep %}

{% step %}

### Port mapping

* Next, the script asks which host port PayRam should listen on. Press Enter to use port 80, or enter a different port if your own reverse proxy sits in front of PayRam.

```bash
Host port [80]:
```

<figure><img src="/files/PZJqp6eeAEbnnm4cM1oH" alt="The host port prompt"><figcaption></figcaption></figure>

{% hint style="info" %} <mark style="color:$primary;">**Note**</mark><mark style="color:$info;">: If you chose Let's Encrypt or custom certificates in the previous step, this prompt is skipped — PayRam uses ports 80 and 443, and both must be free.</mark>
{% endhint %}
{% endstep %}

{% step %}

### AES key encryption

* After selecting your SSL option, you will be prompted with the Hot Wallet Encryption Setup screen. At this step, press Enter to generate the AES-256 encryption key for your hot wallet.

<figure><img src="/files/6VX71BJewFGB2VGmd3DX" alt="Hot wallet AES-256 encryption setup"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Review the settings

* The script then displays all the configurations you selected. Review the settings carefully to make sure they are correct before proceeding.

<figure><img src="/files/fn0zHIh9owpDAleaFJC8" alt="Configuration summary before deployment"><figcaption></figcaption></figure>

* If the configuration is correct, press Enter and the script will set up the PayRam server based on the options you selected. This will start installing the payram server based on your configurations

<figure><img src="/files/44uuIeaWWJt8fyXT7xJ6" alt="Pulling the PayRam image and deploying the container"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Installation completed

* PayRam then runs a health check to confirm the application is responding.

<figure><img src="/files/LEmjubvzfSaRjOtiqzOx" alt="Health check confirming PayRam is running"><figcaption></figcaption></figure>

* After the installation completes, a confirmation message appears in the terminal.

<figure><img src="/files/vaw6vCzU4kPnSn8leJRC" alt="Installation complete, with PayRam access URLs"><figcaption></figcaption></figure>

Once the installation is complete, you’ll see “PayRam installation completed successfully” in the logs. You can then go to [http://](http://yourserverip.com/)[yourserverip](http://yourserverip.com/)[.com](http://yourserverip.com/), replacing yourserverip with the IP address or domain where the PayRam server is hosted.
{% endstep %}
{% endstepper %}

***

Now that you’ve successfully completed the setup, please go to the [onboarding configuration](/onboarding-guide/root-account-setup.md) to start setting up your root account for PayRam.
