Zen Protocol Documentation
WebsiteTelegramBlogForum
  • Zen Protocol Docs
  • Apps
    • Headless Full Node
      • Full Node NPM Package
      • Build from Source
      • CLI
      • API
        • Wallet
        • Contracts
        • General
        • Blockchain
        • AddressDB
      • Deploy
        • Systemd
        • Shell script
        • Docker
      • Technical Model
      • AddressDB
    • Wallet
      • Desktop Wallet
        • Installers
      • Web Wallet
        • Run Locally
      • Wallet User Guide
        • Connect a Wallet
          • Create a Wallet
          • Import a Wallet
          • Watch Mode
        • My Wallet
          • Navigation Bar
          • Portfolio
          • Receive
          • Send / Execute
          • Transaction History
        • Contracts
          • Active Contracts
          • Execute a Contract
            • Message Body Field
          • Extend a Contract
          • Activate a Contract
        • Voting
          • Common Goods Pool
            • Generating a Ballot ID
          • Governance
        • Signer
        • Settings
          • Account Settings
          • Node Connectivity
      • Deprecated Desktop Wallet
        • Executable Installers
        • Wallet Structure
          • Video Tutorials
    • Explorer
    • Zen.js
      • Payment Processing
    • Oracle
      • Oracle GUI
      • Oracle Service
      • Oracle's API
      • Deploy
        • Systemd
        • Docker
      • How the Oracle contract works
      • How to create an Attestation token
    • Dex
      • Dex User Guide
        • Traded Pairs
        • Search Pairs
        • Order Book
        • Operations
        • My Wallet
        • Settings
      • How DEX contract works
    • Fixed Payout
      • Fixed Payout Generator User Guide
        • Issue
        • Redeem
        • Cancel
        • Verify
        • Settings
      • How the FP Contract works
      • How are the asset named?
  • Smart Contracts
  • Contract Structure
  • Contract Cost
  • Contract Activation
  • Contract Examples
  • Smart Contracts SDK
  • Contracts Language ZF*
  • Named Token Tutorial
  • Consensus
  • Common Goods Pool
  • Block Validation
  • Transaction Validation
  • Serialization
  • Use Cases
    • Create Unsigned Transaction
    • Secure Sign Transaction
    • Cold Storage using Full Node
  • Troubleshooting
    • Responsible Disclosure
    • Bug Bounty
    • Known Bugs
  • For Miners
    • Pools
    • GPU Mining
    • GPU Bounties
  • Check Crowdsale Contribution
  • Alpha call option
Powered by GitBook
On this page
  • Oracle Service File
  • Oracle Service
  • Execution Scripts
  • Cron job
  1. Apps
  2. Oracle
  3. Deploy

Systemd

PreviousDeployNextDocker

Last updated 3 years ago

This document assumes /home/ubuntu is the server user home directory, make sure to change it to fit the directory of your choice.

Prerequisites:

  • Install to clone the zen-oracle repository

  • Install . If you choose to install via a package manager, add Mono's own repository first.

  • Install the Headless Node and import a funded account

  • Cron (Optional)

  • Install

Oracle Service File

Save it in path: /etc/systemd/system/zen-oracle.service

[Unit]
Description=Oracle
After=network.target

[Service]
Type=simple
EnvironmentFile=/home/ubuntu/services/scripts/env
WorkingDirectory=/home/ubuntu/services/zen-oracle/src/Oracle/bin/Release
ExecStart=/usr/bin/mono /home/ubuntu/services/zen-oracle/src/Oracle/bin/Release/zen-oracle.exe s
Restart=on-failure

[Install]
WantedBy=multi-user.target

Oracle Service

  1. Get the oracle service (from GitLab)

     mkdir /home/ubuntu/services
     cd /home/ubuntu/services
     git clone https://gitlab.com/zenprotocol/zen-oracle.git
  2. Build the oracle service

     cd /home/ubuntu/services/zen-oracle
     ./paket restore
     msbuild src/zen-oracle.sln /p:Configuration=Release
  3. Create /etc/systemd/system/zen-oracle.service service file as mentioned above

  4. Put all the environment variables assignments in the file /home/ubuntu/services/scripts/env

  5. Follow node deployment instructions and be sure to have the zen-node service enabled

  6. Enable Zen-Oracle

    sudo systemctl enable zen-oracle
  7. Start MongoDB

     sudo systemctl start mongodb
  8. Start Zen-Oracle Server

    sudo systemctl start zen-oracle

Execution Scripts

  1. Make sure all the environment variables are provided and correct

    • zen_path : path of the oracle committer

    • zen_wallet_password: password of the F# wallet

    • zen_node_uri: uri of the node

    • oracle_api: uri:port api port for oracle requests

Cron job

  • In order to commit at a precise time we suggest to use a script in a cron job to take care of the commitment.

Git
mono-devel
MongoDB