Server Setup

Step 1: Connect to your EC2 instance

  • Use SSH to connect to your server instance.

Step 2: Verify your current directory

  • Confirm that you are in the correct directory (ideally /home/ubuntu or your project directory) and then run the following command.

pwd

Note

If the output differs, change your directory to /home/ubuntu.

Step 3: Choose your network

Decide whether to install on mainnet or testnet, based on your requirements.

Mainnet

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/PayRam/payram-scripts/refs/heads/main/setup_payram.sh)"

Testnet

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/PayRam/payram-scripts/refs/heads/main/setup_payram.sh)" bash --testnet

After you run the command, the script installs all dependencies for the PayRam setup on your instance.

When the installation is complete, you are prompted to set up the database. Choose one of the two available options.

Note Option 1 is recommended for production environments.

If you select,

Option 1
  • If you select Option 1, you’ll be prompted to enter 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:

postgresql://myuser:[email protected]:5432/mydatabase
  • In this example:

    • myuser → Database username

    • mypassword → Database password

    • db.example.com → Database host

    • 5432 → Database port

    • mydatabase → Database name

Option 2
  • If you select Option 2, the script creates a local PostgreSQL database using Docker with these default credentials:

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

Note This option is for testing only. For production, always use Option 1.

After you configure the database, set up SSL.

If you select,

Option 1

If you select Option 1, Let’s Encrypt automatically generates and installs a free SSL certificate for your domain within minutes. The certificate is trusted by all major browsers and auto-renews every 90 days.

Option 2

Select Option 2 if you already have SSL certificates. When prompted, provide the file path to the certificate files. The path must include two files: fullchain.pem and privkey.pem.

Option 3

Select Option 3 if you generate SSL through a cloud service or if you want to skip SSL configuration.

After you select an SSL option, the Hot Wallet Encryption Setup screen appears. Press Enter to generate the AES-256 encryption key for your hot wallet.

The script displays all the configurations you selected. Review the settings carefully to ensure they are correct before proceeding.

If the configuration is correct, press Enter. The script sets up the PayRam server on your instance using your selected settings.

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

When the confirmation message appears, the PayRam setup is complete and running.

Go to the Onboarding configuration page for the next steps.

Last updated