Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation guide #396

Merged
merged 12 commits into from
Oct 20, 2023
Merged
16 changes: 16 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
PROXEUS_EMAIL_FROM=<Your valid Sender Email Address>

PROXEUS_INFURA_API_KEY=<Your Infura project ID>

PROXEUS_SPARKPOST_API_KEY=<Your SparkPost API Key>

PROXEUS_ENCRYPTION_SECRET_KEY=<A 32-character random string>

# Sepolia test-net
PROXEUS_BLOCKCHAIN_CONTRACT_ADDRESS=0x9bc518Fd070BE3DBB07399261688015744a7FB02

# For a local development environment without SSL
PROXEUS_ALLOW_HTTP=true

# To see additional debugging information
PROXEUS_TEST_MODE=true
3 changes: 2 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
version: 2
updates:
target-branch: "preprod"

# Maintain dependencies for Go
- package-ecosystem: "gomod"
directory: "/"
target-branch: "preprod"
schedule:
interval: "weekly"

# Maintain dependencies for JS
- package-ecosystem: "npm"
directory: "/ui/"
target-branch: "preprod"
schedule:
interval: "weekly"
18 changes: 0 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,6 @@ If you wish to build the project form the source code, follow the instructions i

Please read the [Developer Manual](https://doc.proxeus.com) to learn more about the Proxeus platform.

### Infura and SparkPost

The Proxeus platform currently depends on [Infura](https://infura.io/) for blockchain services. Supported chains include:

- ethereum: sepolia
- ethereum: goerli
- ethereum: mainnet
- polygon: mumbai
- polygon: mainnet

Create an account to get an API Keys. These keys need to be added to corresponding environment variables, or entered when deploying a "one-click" instance.

Proxeus works best with [SparkPost](https://www.sparkpost.com/) for email integration.

Please note that the domain you set up on SparkPost MUST match the **reply-to** e-mail address that you configure in the next step in order to create accounts and receive e-mails on your instance.

If all goes well, Proxeus should be available at http://localhost:1323. The next step will be to [configure](docs/configure.md) your instance for the first time.

## Contributing

As an open-source project, we welcome any kind of community involvement, whether that is by contributing code, reporting issues or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
# With a configuration like this, you can enable nodes in production.
# This file is an override and needs to be used like this:
#
# docker-compose -f docker-compose.yml -f docker-compose-cloud.override.yml -f docker-compose-cnode.override.yml up
# docker-compose -f docker-compose.yml -f docker-compose-example.override.yml up

version: '3.7'

Expand Down
37 changes: 35 additions & 2 deletions docs/build_docker.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Docker

Please make sure that you always pull Docker images from the official `proxeus` DockerHub repository and that you are using the latest version.

## Start Proxeus

Run the following command in the directory containing your `docker-compose.yml` file (Linux and OSX):
```
export PROXEUS_EMAIL_FROM=<Your valid Sender Email Address>
export PROXEUS_INFURA_API_KEY=<Your Infura project ID>
export PROXEUS_SPARKPOST_API_KEY=<Your SparkPost API Key>
export PROXEUS_ENCRYPTION_SECRET_KEY=<A 32-character random string>
export PROXEUS_BLOCKCHAIN_CONTRACT_ADDRESS=0x1d3e5c81bf4bc60d41a8fbbb3d1bae6f03a75f71
export PROXEUS_ALLOW_HTTP=true
docker-compose up
```

You can also put these settings into an `.env` file in the same folder as the application.

See [Configuration settings](configure.md) for more details.

## Tweak your Docker setup

Besides the basic Docker Compose configuration, you can extend your installation as follows:

- `docker-compose-cloud.override` for cloud installations, which includes Nginx and Let's Encrypt
- `docker-compose-example.override` shows how to add another Proxeus Node to your installation
- `docker-compose-extra.override` includes all officially supported Proxeus Nodes
- `docker-compose-local.override` if you want to use your local Docker image (details below)

To use one or more of these overrides, start Proxeus as follows:

`docker-compose -f docker-compose.yml -f docker-compose-example.override.yml up`

(you always have to first include `docker-compose.yml`)

## Build a Docker image

Expand Down Expand Up @@ -64,10 +97,10 @@ For deployment, a `docker-compose-cloud.override.yml` file is provided which inc
docker-compose -f docker-compose.yml -f docker-compose-cloud.override.yml up
```

You may also want to include custom nodes. There is a sample configuration which can be started like this:
You may also want to include custom nodes. There is a sample configuration which can be started like this (also possibly in combination with `docker-compose-cloud`):

```
docker-compose -f docker-compose.yml -f docker-compose-cloud.override.yml -f docker-compose-cnode.override.yml up
docker-compose -f docker-compose.yml -f docker-compose-example.override.yml up
```

See `docker-compose-extra.override.yml` for examples with several other nodes.
22 changes: 15 additions & 7 deletions docs/configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@ When starting the server for the first time, you will need to configure it.
Open http://localhost:1323/init to configure your server. Use the
configuration below as an example.

## Document Service URL
```
https://dev-ds.proxeus.com/
```
**Note:** that your system configuration at this point will be reflected in the local configuration database under `data/proxeus-platform/settings/main.json`. Any future changes to the configuration must be made here - the environment variables will not be propagated, unless you delete this file to reset the deployment.

## Infura API Key
Generate a [infura API Key](https://infura.io)

Generate an [Infura API Key](https://infura.io)

## Blockchain File Storage contract address

You can switch between the networks using the environment configuration `PROXEUS_BLOCKCHAIN_NET`.
For your convenience, a smart contract is deployed on several networks at the following addresses:

### Sepolia
```
0x9bc518Fd070BE3DBB07399261688015744a7FB02
Expand Down Expand Up @@ -46,15 +48,15 @@ Generate a [infura API Key](https://infura.io)
```
[Verify on Etherscan](https://polygonscan.com/address/0x60970BeFda93464A105DD21Dc6a30B69C5B5c6e4)



Alternatively: deploy your own smart contract from [ProxeusFS.sol](https://github.com/ProxeusApp/storage-app/blob/master/spp/eth/solidity/ProxeusFS.sol)


## Email from

```
no-reply@proxeus.com
```

## Sparkpost API Key

Set up a free account on [SparkPost](https://www.sparkpost.com)
Expand All @@ -70,6 +72,12 @@ youremail@address.com

This is a salt to hash your user's passwords in the database. You can use any value, with preference to hard generated strings. Make sure that it is exactly 32 characters long. Do not change the key on a running instance. This can only be set using an environment variable.

## Document Service URL

This only needs to be changed if you are running the service on a separate machine. See the documentation at https://github.com/ProxeusApp/document-service

---

# Full Configuration

You can get the full list of configuration parameters using the `-h` parameter:
Expand Down
178 changes: 44 additions & 134 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
@@ -1,156 +1,66 @@
# Quick Start

A brief installation guide. Find more details and explanation of the configuration settings in [configure.md](configure.md).
This document is a brief installation guide, with links to further details to get started with Proxeus. We hope that you, too, will enjoy working with our product! Please remember to star us on GitHub drop us any questions or feedback in the [Discussion Forum](https://github.com/ProxeusApp/community/discussions).


_"Proxeus is a platform for quick and convenient document digitalization, signing, processing, and distribution. It allows users to keep their important documents secure and registered on the blockchain. Proxeus empowers anyone to create blockchain applications and is available for free as an open-source project." --[S-Pro](https://s-pro.io/)_


## One-Click Installation

Proxeus is primarily a Web application, intended for access with a web browser. The [Proxeus Association](https://proxeus.org) maintains a demo instances you can use to test the product, and can recommend a service provider to help you or your business get set up. There is also a prototype [desktop application](https://github.com/ProxeusApp/storage-app/blob/master/docs/overview.md).

In addition to the developer guidelines below, several "one-click" deployment configurations are available for select cloud platforms:

- [Docker Compose](docs/docker.md)
- [Linode StackScript](deploy/linode/README.md)
- [DigitalOcean Droplet](deploy/digitalocean/README.md)

You will still need API keys for Infura and Sparkpost, as [detailed below](#get-keys).

Join the [Discussions](https://github.com/ProxeusApp/community/discussions/3) if you are interested in seeing additional providers on this list.

## Source Code
Please read the [Developer Manual](https://doc.proxeus.com) to learn more about developing for the Proxeus platform.

You can access the source code of this application on the [Proxeus GitHub repository](https://github.com/ProxeusApp).
**By installing and using the Proxeus software you agree with the terms of the [Proxeus License Agreement](https://github.com/ProxeusApp/proxeus-core/blob/main/LICENSE).**

**By installing and using the Proxeus software you agree with the terms of the [Proxeus License Agreement](LICENSE).**
## Installing from Source

## Install docker and docker-compose
You can access the source code of this application on the [Proxeus repository](https://github.com/ProxeusApp) on GitHub (a mirror is available on [Codeberg/Proxeus](https://codeberg.org/proxeus/).

The quickest way to try Proxeus is to use `docker-compose`.
If you wish to build the project from source, follow the instructions in [Build all](build_all.md).

1. [Install Docker Engine](https://docs.docker.com/install/)
2. [Install docker-compose](https://docs.docker.com/compose/install/)
The quickest way to try Proxeus is to use `docker compose`:

1. Install [Docker Engine](https://docs.docker.com/install/) or [Docker Desktop](https://docs.docker.com/desktop/)
2. Install [Docker Compose](https://docs.docker.com/compose/install/) if you are not using Docker Desktop
3. Get API keys for Infura and Sparkpost as [detailed below](#get-keys)
4. Configure your environment variables by copying `.env.example` to `.env` and modifying it
5. Start the application using `docker compose up`

Please make sure that you always pull Docker images from the official `proxeus` DockerHub repository and that you are using the latest version.

A `docker-compose.yml` file and some other possible configuraitons are in the root folder of the proxeus-core repository. See [Configuration settings](configure.md) and [Building with Docker](build_docker.md) for more details.

<a name="get-keys"></a>

## Get API Keys for Infura and SparkPost

The Proxeus platform depends on [Infura](https://infura.io/) and [SparkPost](https://www.sparkpost.com/)
for Ethereum and email integration respectively.
The Proxeus platform depends on [Infura](https://infura.io/) and [SparkPost](https://www.sparkpost.com/). Please create an account on those platforms to get API Keys. These keys need to be added to corresponding environment variables, or entered when deploying a "one-click" instance.

We use [Infura](https://infura.io/) for blockchain services. Supported chains include:

Please create an account on those platform and get an API Keys.
- Ethereum: sepolia, goerli, mainnet
- Polygon: mumbai, mainnet

## Proxeus Demo Smart Contract
Create an account on [SparkPost](https://www.sparkpost.com/) for email integration.

For your convenience, a demo smart contract is deployed on several networks at the following addresses.
- Please note that the domain you set up on SparkPost MUST match the **reply-to** e-mail address that you configure in the next step in order to create accounts and receive e-mails on your instance.

You can switch between the networks using the environment configuration `PROXEUS_BLOCKCHAIN_NET`

### Ethereum: Sepolia

```
0x9bc518Fd070BE3DBB07399261688015744a7FB02
```
[Verify on Etherscan](https://sepolia.etherscan.io/address/0x9bc518Fd070BE3DBB07399261688015744a7FB02#code)
## Next steps

`PROXEUS_BLOCKCHAIN_NET=sepolia`

### Ethereum: Goerli

```
0x66FF4FBF80D4a3C85a54974446309a2858221689
```
[Verify on Etherscan](https://goerli.etherscan.io/address/0x66FF4FBF80D4a3C85a54974446309a2858221689#code)

`PROXEUS_BLOCKCHAIN_NET=goerli`

### Ethereum: Mainnet

```
0xf63e471d8cbc57517c37c39c35381a385628e012
```
[Verify on Etherscan](https://etherscan.io/address/0xf63e471d8cbc57517c37c39c35381a385628e012)

`PROXEUS_BLOCKCHAIN_NET=main`

### Polygon: mumbai

```
0x00119d8C02bbC4c1231D054BB2813792B4411Ed5
```
[Verify on Etherscan](https://mumbai.polygonscan.com/address/0x00119d8C02bbC4c1231D054BB2813792B4411Ed5)

`PROXEUS_BLOCKCHAIN_NET=polygon-mumbai`

### Polygon: main

```
0x60970BeFda93464A105DD21Dc6a30B69C5B5c6e4
```
[Verify on Etherscan](https://polygonscan.com/address/0x60970BeFda93464A105DD21Dc6a30B69C5B5c6e4)

`PROXEUS_BLOCKCHAIN_NET=polygon`

## Create a docker-compose.yml file

**Note: Please make sure that you always pull Docker images from the official `proxeus` DockerHub repository and that you are using the latest version.**

User the example below as your `docker-compose.yml` file:

```
---
version: '3.7'

networks:
xes-platform-network:
name: xes-platform-network

services:
platform:
image: proxeus/proxeus-core:latest
container_name: xes-platform
depends_on:
- document-service
networks:
- xes-platform-network
restart: unless-stopped
environment:
TZ: Europe/Zurich
PROXEUS_PLATFORM_DOMAIN: "${PROXEUS_PLATFORM_DOMAIN:-http://xes-platform:1323}"
PROXEUS_DOCUMENT_SERVICE_URL: "http://document-service:2115/"
PROXEUS_ENCRYPTION_SECRET_KEY: "${PROXEUS_ENCRYPTION_SECRET_KEY}"
PROXEUS_BLOCKCHAIN_CONTRACT_ADDRESS: "${PROXEUS_BLOCKCHAIN_CONTRACT_ADDRESS}"
PROXEUS_INFURA_API_KEY: "${PROXEUS_INFURA_API_KEY}"
PROXEUS_SPARKPOST_API_KEY: "${PROXEUS_SPARKPOST_API_KEY}"
PROXEUS_EMAIL_FROM: "${PROXEUS_EMAIL_FROM:-no-reply@example.com}"
PROXEUS_AIRDROP_WALLET_FILE: "${PROXEUS_AIRDROP_WALLET_FILE:-/root/.proxeus/settings/airdropwallet.json}"
PROXEUS_AIRDROP_WALLET_KEY: "${PROXEUS_AIRDROP_WALLET_KEY:-/root/.proxeus/settings/airdropwallet.key}"
PROXEUS_DATABASE_ENGINE: "${PROXEUS_DATABASE_ENGINE:-storm}"
PROXEUS_DATABASE_URI: "${PROXEUS_DATABASE_URI:-mongodb://root:root@mongo:27017}"
PROXEUS_TEST_MODE: "${PROXEUS_TEST_MODE:-false}"
PROXEUS_ALLOW_HTTP: "${PROXEUS_ALLOW_HTTP:-false}"
ports:
- "1323:1323"
volumes:
- ${PROXEUS_DATA_DIR:-./data}/proxeus-platform/data:/data/hosted
- ${PROXEUS_DATA_DIR:-./data}/proxeus-platform/settings:/root/.proxeus/settings

document-service:
image: proxeus/document-service:latest
container_name: xes_document_service
networks:
- xes-platform-network
restart: unless-stopped
environment:
TZ: Europe/Zurich
ports:
- "2115:2115"
volumes:
- ${PROXEUS_DATA_DIR:-./data}/document-service/logs:/document-service/logs
- ${PROXEUS_DATA_DIR:-./data}/document-service/fonts:/document-service/fonts
```

## Start Proxeus

Run the following command in the directory containing your `docker-compose.yml` file (Linux and OSX):
```
export PROXEUS_EMAIL_FROM=<Your valid Sender Email Address>
export PROXEUS_INFURA_API_KEY=<Your Infura project ID>
export PROXEUS_SPARKPOST_API_KEY=<Your SparkPost API Key>
export PROXEUS_ENCRYPTION_SECRET_KEY=<A 32-character random string>
export PROXEUS_BLOCKCHAIN_CONTRACT_ADDRESS=0x1d3e5c81bf4bc60d41a8fbbb3d1bae6f03a75f71
export PROXEUS_ALLOW_HTTP=true
docker-compose up
```

Proxeus should be available at http://localhost:1323

**Note:** that your system configuration at this point will be reflected in the local configuration database under `data/proxeus-platform/settings/main.json`. Any future changes to the configuration must be made here - the environment variables will not be propagated, unless you delete this file to reset the deployment.
Proxeus should at this point be available at http://localhost:1323 or the IP address of your new cloud machine.

The next step is to [configure](configure.md) your instance for the first time.

To learn more about Smart Contracts using Solidity, see the documentation in the [proxeus-contract](https://github.com/ProxeusApp/proxeus-contract). For detailed information about token setup, check the [XES-Payment](xes-payment.md) project. Software architecture and other details are in the [Developer Manual](develop.md). For creating a custom node, visit [External workflow nodes](external_workflow_nodes.md).