Skip to main content
Version: 1.0

Installation

Complete installation guide for all ODE components. This guide covers prerequisites, server setup, and mobile app installation.

Prerequisites

Before installing ODE components, ensure your system meets the following requirements.

System Requirements

For Mobile Development (Formulus)

RequirementMinimumRecommended
Operating SystemmacOS 10.15, Windows 10, or LinuxLatest stable version
Node.js18.0 or higher20.0 or higher
npm9.0 or higher10.0 or higher
Android StudioLatest stableLatest stable
Xcode14.0 or higher (macOS only)Latest stable
Java Development KitJDK 17JDK 17 or higher

For Server Deployment (Synkronus)

RequirementMinimumRecommended
Operating SystemLinux, macOS, or WindowsLinux
Go1.22 or higherLatest stable
PostgreSQL13.0 or higher15.0 or higher
Docker20.10 or higher (optional)Latest stable
Memory2 GB RAM4 GB RAM or more
Storage10 GB free space50 GB or more

Development Tools

Required Tools:

  • Git: Version control system
  • Code Editor: Visual Studio Code, IntelliJ IDEA, or similar
  • Terminal: Command-line interface for running commands

Recommended Tools:

  • Postman or curl: For testing API endpoints
  • pgAdmin or DBeaver: For database management
  • Docker Desktop: For containerized development

Verification

Verify your installation by running:

# Check Node.js version
node --version

# Check npm version
npm --version

# Check Go version
go version

# Check PostgreSQL version
psql --version

# Check Docker version (if using)
docker --version

Installing Synkronus Server

Synkronus is the backend server component of ODE, responsible for data synchronization, storage, and API services.

The easiest way to run Synkronus is using Docker:

# Pull the latest image
docker pull ghcr.io/opendataensemble/synkronus:latest

# Run the container
docker run -d \
  --name synkronus \
  -p 8080:8080 \
  -e DB_CONNECTION="postgres://user:password@host:5432/synkronus" \
  -e JWT_SECRET="your-secret-key-here" \
  -v synkronus-bundles:/app/data/app-bundles \
  ghcr.io/opendataensemble/synkronus:latest

Configuration

Synkronus is configured using environment variables. Create a .env file or set environment variables:

VariableDescriptionDefaultRequired
PORTHTTP server port8080No
DB_CONNECTIONPostgreSQL connection string-Yes
JWT_SECRETSecret key for JWT signing-Yes
LOG_LEVELLogging level (debug, info, warn, error)infoNo
APP_BUNDLE_PATHDirectory for app bundles./data/app-bundlesNo
MAX_VERSIONS_KEPTMaximum app bundle versions to keep5No

Example Configuration:

PORT=8080
DB_CONNECTION=postgres://synkronus:password@localhost:5432/synkronus?sslmode=disable
JWT_SECRET=your-secret-key-change-this-in-production
LOG_LEVEL=info
APP_BUNDLE_PATH=./data/app-bundles
MAX_VERSIONS_KEPT=5

Database Setup

Before running Synkronus, set up a PostgreSQL database:

# Connect to PostgreSQL
psql -U postgres

Then run SQL commands:

-- Create database
CREATE DATABASE synkronus;

-- Create user (optional)
CREATE USER synkronus WITH PASSWORD 'your-password';
GRANT ALL PRIVILEGES ON DATABASE synkronus TO synkronus;

The database schema will be created automatically on first run.

Verification

Verify the installation:

  1. Check that the server is running:

    curl http://localhost:8080/health
    
  2. Check the API documentation:

    curl http://localhost:8080/api/docs
    

Installing Formulus App

Formulus is the mobile application component of ODE, available for Android and iOS devices.

For detailed installation instructions, see the Installing Formulus guide which covers:

  • F-Droid installation (recommended for end users)
  • Direct APK installation
  • System requirements
  • Post-installation setup

For developers who want to install via ADB or emulator, see the Development Installation guide.

Quick Installation Summary

For End Users

  1. F-Droid (Recommended): Install via F-Droid app store
  2. Direct APK: Download and install APK file directly

See Installing Formulus for complete instructions.

For Developers

  1. ADB Installation: Install via Android Debug Bridge
  2. Emulator: Run on Android emulator
  3. Development Build: Build from source with hot reload

See Installing Formulus for Development for complete instructions.

App Configuration

After installation, configure the app to connect to your Synkronus server:

  1. Open the Formulus app
  2. Navigate to Settings
  3. Enter your server URL (e.g., https://your-server.com)
  4. Enter your authentication credentials
  5. Save the configuration

Installing Synkronus CLI

The Synkronus CLI is a command-line utility for interacting with the Synkronus server.

Installation

go install github.com/OpenDataEnsemble/ode/synkronus-cli/cmd/synkronus@latest

Or build from source:

git clone https://github.com/OpenDataEnsemble/ode/synkronus-cli.git
cd synkronus-cli
go build -o bin/synk ./cmd/synkronus

Configuration

By default, the CLI uses a configuration file located at $HOME/.synkronus.yaml.

Example configuration file:

api:
  url: http://localhost:8080
  version: 1.0.0

You can override this per-command with --config <path> or use synk config use <path> to set a persistent default.

Troubleshooting

Server Not Accessible

If the mobile app cannot connect to the server:

  • Verify the server is running: curl http://localhost:8080/health
  • Check firewall settings
  • For Android emulator, use 10.0.2.2 instead of localhost
  • For iOS simulator, use localhost or your machine's IP address

Database Connection Issues

Problem: Cannot connect to database

Solution: Verify the DB_CONNECTION string format and ensure PostgreSQL is running and accessible.

Port Already in Use

Problem: Port 8080 is already in use

Solution: Change the PORT environment variable to use a different port.

Build Errors

Problem: Build fails with errors

Solution:

  • Ensure all prerequisites are installed
  • Check that dependencies are up to date
  • Review error messages for specific issues
  • See component-specific documentation for build instructions

Next Steps