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
  • Server Setup
  • Adding Custom Domain

Was this helpful?

  1. Self-hosting

Lightsail Instance

PreviousServing HTTPSNextExport data to your instance

Last updated 1 year ago

Was this helpful?

AWS Lightsail allows you to setup instances with fixed pricing.

Follow the instructions to setup your instance. These should be easy to follow for a non-technical person.

Server Setup

Create instance

Create a Lightsail instance with at least 2 Gb of RAM and with CentOS operating system. ($12/month as of 5/2024)

Networking config

Under the Networking tab, attach your instance to a statip IP

Add the following IPv4 firewall rules

Login to your instance and install the Flow Server

Connect to your instance ("Connect using SSH" button). This should load a terminal.

Copy and run this script to install dependencies, generate passwords, and start the flow-server:

sudo yum install -y git zip yum-utils
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
curl -fsSL https://deno.land/install.sh > install.sh
chmod +x install.sh
sudo env DENO_INSTALL=/usr/local ./install.sh
rm install.sh
sudo usermod -aG docker $USER
newgrp docker
git clone https://github.com/space-operator/flow-backend
cd flow-backend/docker
./gen-secrets.ts
docker compose up -d --wait

You can type docker compose ls in the terminal to see the running server

Get your passwords

The gen-secrets.ts script has now generated passwords for all your services and put them in hidden .env file in ~/flow-backend/docker/

In your terminal, type the following to open that file. We'll use the Supabase login and password in the next step.

cat ~/flow-backend/docker/.env

Connect to Supabase

In your browser, navigate to http://YOUR_STATIC_IP:8000

You can now navigate to the table editor where everything will be saved.

Adding Custom Domain

Navigate to Domains & DNS and follow the instructions to "Create a DNS Zone"

Once setup, go to the Domains tab and copy the Name server address to your registrar

For instance, for Namecheap, select Custom DNS from the Nameservers section and add them