Deploy to VPS
Your first document
This guide will walk you through deploying PrivMX Bridge Instance
Prerequisites
This guide requires access to VPS server. You can choose any provider you prefer, e.g.:
- AWS EC2
- Google Cloud Compute Engine
- Digital Ocean Droplets
- Azure Virtual Machine
We recommend choosing an option with at least 1 CPU and 500MB of RAM for PrivMX Bridge itself, and if you decide to host your MongoDB instance on the same machine to increase RAM to 4GB.
You will need also a domain name for your server. This tutorial will guide you through how to generate certificates for it for https connection.
Setup Environment
This guides requires access to your server with sudo privileges.
Installing Docker
- Add Docker's official GPG key.
- Add the repository to Apt sources.
- Install docker.
Setup NGINX
- Install nginx and certbot
- Create site config
Create files in /etc/nginx/sites-available/YOUR_DOMAIN_NAME
open it in your favourite text editor and add the following configuration:
- Create a link to sites-enabled
PrivMX Bridge Setup
PrivMX Bridge requires MongoDB instance. You can host it alongside PrivMX Bridge using our docker compose file or provide connection string to external MongoDB instance, for example, from MongoDB Atlas.
PrivMX Bridge requires MongoDB instance with an initialized replica set.
./setup.sh
script takes care of initializing a replica set for local MongoDB instance in docker compose.
- Start by cloning PrivMX Bridge docker repo containing setup scripts.
- Run setup script.
This script will pull all necessary docker images, and setup your first Solution and Context. After setup PrivMX Bridge, you will be prompted with variables required for connection.
By default, new instance will be available on http://localhost:9111
Exposing Application
- Check Nginx config
- Restart NGINX
- Generate certificates using certbot
- In your firewall settings expose port
80
and443
. During certificate generation, Certbot adds redirects from http connections to https.
You can now open domain URL in your browser. PrivMX Bridge instance should return starting page.
Next Steps
Checkout Tools documentation for guides on how you can use your PrivMX Bridge for E2E encrypted communication.
Learn how to use:
We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.