Skip to main content

Self-Hosting

Studo Flow can be self-hosted on your own infrastructure. This is a great option if you want to have full control over your data and the hosting environment.

note

To pull the Flow image from the GitHub Container Registry, you need to authenticate with your GitHub account. You can do this by running docker login ghcr.io and entering your GitHub username and a personal access token with the read:packages scope. You also need access to the package repository, which can be granted by the Studo team.

Requirements

  • Docker and Docker Compose installed on your server (swarm mode or kubernetes is recommended for production)
  • A domain name for the Flow instance (can be a subdomain)
  • A valid SSL certificate for the domain name (can be a self-signed certificate for testing purposes)
  • A reverse proxy (e.g. Traefik) to handle SSL termination and routing for said domain
  • A MongoDB replica set (3 nodes recommended for production)
  • A GitHub account

Example compose file

version: '3.8'
services:
studo-flow:
image: ghcr.io/studoverse/flow:latest
container_name: flow
environment:
ALLOWED_IMPORTERS: DEMO,API,STUDO_LABS,STUDO_SERVICES
ENABLE_KTOR_METRICS: false
ENABLE_POSTGRES_STATS_DATABASE: false
MEMORY_INSPECTION_FILTER: com.moshbit
MEMORY_INSPECTION_MIN_INSTANCES: 1000
MONGO_URI: mongodb://host.docker.internal:27017/flow # Use your MongoDB replica set URI here, SSL is recommended

CONTAINER: docker # Set to 'docker'
PORT: 8080 # The port Flow is listening on
HOST: demo.studoflow.com

baseUrl: https://demo.studoflow.com/admin
flowLicenceKey: XXXXXXXX
ports:
- 8080:8080 # Expose the Flow webUI port, adjust your reverse proxy configuration accordingly.

Example reverse proxy configuration (Traefik) in swarm mode

version: '3.8'
services:
studo-flow:
image: ghcr.io/studoverse/flow:latest
environment:
ALLOWED_IMPORTERS: DEMO,API,STUDO_LABS,STUDO_SERVICES
ENABLE_KTOR_METRICS: false
ENABLE_POSTGRES_STATS_DATABASE: false
MEMORY_INSPECTION_FILTER: com.moshbit
MEMORY_INSPECTION_MIN_INSTANCES: 1000
MONGO_URI: mongodb://host.docker.internal:27017/flow # Use your MongoDB replica set URI here, SSL is recommended

CONTAINER: docker # Set to 'docker'
PORT: 8080 # The port Flow is listening on
HOST: demo.studoflow.com

baseUrl: https://demo.studoflow.com/admin # The base URL for the Flow admin interface, needs to match the HOST environment variable
flowLicenceKey: XXXXXXXX # Your Flow licence key, can be obtained from the Studo team
deploy:
mode: replicated
replicas: 2 # For high availability, adjust as needed
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: any
delay: 2s
labels:
- traefik.enable=true # No need for any auth middleware, configure OIDC or SAML login providers in Flow
- traefik.http.services.flow.loadbalancer.server.port=8080 # The internal port Flow is listening on
- traefik.http.routers.flow.rule=Host(`demo.studoflow.com`) # Needs to match the HOST environment variable
- traefik.http.routers.flow.tls=true
- traefik.http.routers.flow.tls.certresolver=cfresolver # or your own cert resolver