Space Operator
  • Welcome
  • Visual Builder
    • Flows
      • API Key & POST Request
      • WebSocket
        • Signature Requests
      • Nested Flows
      • Learn Solana
      • Add flows to your websites
      • Iterate with Localhost
    • Nodes
      • Web Assembly Nodes
        • space-cli
        • space-lib
        • Examples in Rust
          • Rectangle
          • Filter
          • Regex
        • Uploading WASM binary via UI
      • Native Nodes
        • Code Template
        • Node Definition
        • ValueSet
        • Submitting Native Nodes
        • Tracing
      • Mock Nodes
      • JS Node
      • API Input Node
  • Self-hosting
    • Docker Compose
    • Serving HTTPS
    • Lightsail Instance
    • Export data to your instance
  • FAQ
    • Servers
  • References
    • Flows
    • Flow Deployment
Powered by GitBook
On this page
  • Prerequisites
  • Self-hosting with Docker Compose
  • Download source code
  • Generate secrets and configurations
  • Export your data and use them in self-hosted server
  • Stop and clean up

Was this helpful?

  1. Self-hosting

Docker Compose

Self-hosting with docker-compose.

PreviousAPI Input NodeNextServing HTTPS

Last updated 1 year ago

Was this helpful?

Prerequisites

  • Install git, zip

Instructions for Linux OSes:

sudo yum install -y git zip yum-utils

# Install and setup Docker for non-root user
yes | sudo  yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yes | sudo  yum install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl enable --now docker
sudo usermod -aG docker $USER
newgrp docker

# Install Deno
curl -fsSL https://deno.land/install.sh > /tmp/install.sh
chmod +x /tmp/install.sh
sudo env DENO_INSTALL=/usr/local /tmp/install.sh
rm /tmp/install.sh
TODO

Self-hosting with Docker Compose

Download source code

Clone the code using git:

git clone https://github.com/space-operator/flow-backend

Go to docker folder:

cd flow-backend/docker

Every commands in this tutorial must be run in flow-backend/docker folder.

Generate secrets and configurations

Our Docker Compose setup needs 2 configuration files, both are located in flow-backend/docker folder:

  • .env : dotenv file containing environment variables

  • .config.toml: configuration file used by flow-server.

Template for these files are in env.example and flow-server-config.toml .

Generate secrets and config files for your server:

./gen-secrets.ts

Generated secrets are saved in .env and .config.toml files.

The script use env.example and flow-server-config.toml as templates, you can edit them before running the script to customize values.

Start and wait for containers to be ready:

docker compose up -d --wait

Port binding:

  • Supabase: port 8000

  • Flow server: port 8080

  • PostgreSQL: port 5432

To see Supabase Dashboard:

  • Open .env file to see DASHBOARD_USERNAME and DASHBOARD_PASSWORD values:

cat .env | grep DASHBOARD

Export your data and use them in self-hosted server

Stop and clean up

To stop services:

docker compose down

Stop and clean up all data:

docker compose down -v

Visit .

Follow steps from

Install docker and docker-compose
Install Deno
Install Supabase CLI (optional)
http://localhost:8000/
here