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 to our container registry. You can do this by running docker login studo-echbgrb4a3evh7gg.azurecr.io. Contact the Studo team to get your credentials.

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

services:
studo-flow:
image: studo-echbgrb4a3evh7gg.azurecr.io/studo/flow:latest
container_name: flow
environment:
DEBUG_LOG: false
ALLOWED_IMPORTERS: DEMO,API,STUDO_LABS,STUDO_SERVICES
ENABLE_KTOR_METRICS: false
ENABLE_POSTGRES_STATS_DATABASE: false
ENABLE_TASK_SCHEDULER: true

CONTAINER: web-1 # For horizontal scaling increase number for each instance - starting by 1 (there must be a container with "web-1" for proper functionality)
MONGO_URI: mongodb://mongodb1:27017,mongodb2:27017,mongodb3:27017/flow # Use your MongoDB replica set URI here, SSL is recommended
PORT: 8080 # The (internal) port Flow is listening on
ENABLE_SENTRY_LOG: false
SENTRY_DSN: "https://key@your.sentry.org/projectId" # optional (only when ENABLE_SENTRY_LOG = true)
SENTRY_DSN_FRONTEND: "https://key@your.sentry.org/projectId" # optional (only when ENABLE_SENTRY_LOG = true)
baseUrl: https://demo.studoflow.com/admin
rootUserPassword: s3cure # Initial password for "admin" user

APP: flow-XXXXXX # replace with value provided
flowLicenceKey: XXXXXXXX # replace with key provided
ports:
- 8080:8080 # Expose the Flow webUI port, adjust your reverse proxy configuration accordingly.

Example reverse proxy configuration (Traefik) in swarm mode

services:
studo-flow:
image: studo-echbgrb4a3evh7gg.azurecr.io/studo/flow:latest
environment:
DEBUG_LOG: false
ALLOWED_IMPORTERS: DEMO,API,STUDO_LABS,STUDO_SERVICES
ENABLE_KTOR_METRICS: false
ENABLE_POSTGRES_STATS_DATABASE: false
ENABLE_TASK_SCHEDULER: true

# Swarm substitutes {{.Task.Slot}} with the replica number (1, 2, 3...)
CONTAINER: web-{{.Task.Slot}}
MONGO_URI: mongodb://mongodb1:27017,mongodb2:27017,mongodb3:27017/flow # Use your MongoDB replica set URI here, SSL is recommended
PORT: 8080 # The (internal) port Flow is listening on
ENABLE_SENTRY_LOG: false
SENTRY_DSN: "https://key@your.sentry.org/projectId" # optional (only when ENABLE_SENTRY_LOG = true)
SENTRY_DSN_FRONTEND: "https://key@your.sentry.org/projectId" # optional (only when ENABLE_SENTRY_LOG = true)
baseUrl: https://demo.studoflow.com/admin
rootUserPassword: s3cure # Initial password for "admin" user

APP: flow-XXXXXX # replace with value provided
flowLicenceKey: XXXXXXXX # replace with key provided
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 domain of the baseUrl environment variable
- traefik.http.routers.flow.tls=true
- traefik.http.routers.flow.tls.certresolver=cfresolver # or your own cert resolver