Skip to main content

Self-Hosting using Docker

This guide will help you quickly set up, configure, and run Endatix inside your infrastructure using Docker containers. The setup script downloads configurations from the endatix repository and handles everything automatically for a quick deployment.

warning

Important: The simple script runs a streamlined deployment focusing on functional quickstarts. It uses HTTP. For fully secured production setups, always configure HTTPS at your reverse proxy layer and provide strong environment passwords.

What is Endatix?

Endatix is a modern platform for creating and managing SurveyJS based forms and surveys. It consists of:

  • Endatix API: Backend service for form management and data collection
  • Endatix Hub: Web interface for creating forms and viewing responses

Prerequisites

Before proceeding, ensure you have installed:

  • Docker Desktop (includes Docker and Docker Compose)

Download from: https://docs.docker.com/get-docker/

Tested with Docker version 28.3.2 and Docker Compose v2.38.2.


Quick Start

Step 1: Get Setup Files

You need these files to get Endatix running:

  • setup.bat (Windows) or setup.sh (Linux/macOS)
  • docker-compose.yaml

Option A: Direct Download

Option B: Using Command Line

curl -o setup.bat https://raw.githubusercontent.com/endatix/endatix/main/docker/setup.bat
curl -o docker-compose.yaml https://raw.githubusercontent.com/endatix/endatix/main/docker/docker-compose.yaml

Step 2: Check Port Availability

Make sure these ports are free on your machine:

  • 8080 - Endatix API
  • 3000 - Endatix Hub

Step 3: Run the Setup Script

Double-click setup.bat or run in Command Prompt/PowerShell:

setup.bat

Step 4: Configure Your Setup

The script will prompt you for:

  • Admin Email: Default is admin@endatix.com
  • Admin Password: Default is P@ssw0rd
  • Seed sample forms: Whether to load sample forms and submissions into the database. Default is y (yes)
info

Note: For testing purposes, you can use the defaults. Change the admin credentials before any production use. Sample forms give you pre-built examples to explore the platform right away.

Press Enter to use defaults, or type your own values.

The script will automatically initiate the actions to:

  1. Download the required Docker images
  2. Create and start all containers
  3. Set up the database and initial admin user
  4. Optionally seed sample forms and submissions

Access Your Endatix Platform

Once setup is complete, open your browser and visit:

Sign in using the admin credentials you set during setup.

warning

Security Note: This setup uses HTTP connections for simplicity. Production environments require HTTPS, secure passwords, and additional security measures.


Managing Containers

Stop containers:

docker compose -f docker-compose.yaml stop

Start containers again:

docker compose -f docker-compose.yaml start

Remove containers (keeps data):

docker compose -f docker-compose.yaml down

View logs:

docker compose -f docker-compose.yaml logs

Troubleshooting

If you encounter issues:

  1. Ensure Docker Desktop is running
  2. Check that required ports (8080, 3000) are available
  3. Review the setup script output for error messages

For support, visit endatix.com or GitHub Discussions.

For production deployments, contact Endatix for guidance on secure, scalable setups with HTTPS, proper authentication, monitoring, and backup strategies.


Environment Configuration Reference

When self-hosting Endatix manually or beyond the provided scripts, these are the key environment configurations.

Endatix API (.NET) Configuration

Configuration is passed primarily via appsettings.json or Environment Overrides. When using Docker, you can pass these as environment variables.

Variable/SettingDescriptionDefault
ConnectionStrings__DefaultConnectionSQL Server connection stringRequired
Security__JwtSigningKeySecret used to sign API tokensRequired
Endatix__Hub__HubBaseUrlThe public URL of the Hub Front-endOptional
Endatix__Cors__CorsPolicies__0__AllowedOriginsArray of CORS URLs allowed["*"]
Email__SendGridSettings__ApiKey / Email__MailgunSettings__ApiKeyKeys for email delivery integrationsOptional

Endatix Hub (Next.js) Configuration

Configuration is passed via .env or system environment variables.

VariableDescription
ENDATIX_BASE_URLThe public or internal URL where the API is hosted (e.g., http://endatix-api:5001)
SESSION_SECRETSecret key to encrypt session cookies (e.g., generate with openssl rand -hex 32)
AUTH_SECRETSecret key used by Auth.js to encrypt/decrypt sessions
AUTH_URLCanonical URL of the frontend (helpful behind proxies)
NEXT_PUBLIC_IS_DEBUG_MODEApplication level debug mode flag ('true'/'false')

Raw Docker Compose Template

If you wish to spin up the architecture without the setup script or bake it into an orchestrator, you can use the standard Docker Compose template equivalent:

name: endatix

services:
endatix-api:
container_name: endatix-api
image: endatix/endatix-api:latest
environment:
ConnectionStrings__DefaultConnection: "Server=endatix-db;User Id=sa;Password=${SQLSERVER_SA_PASSWORD};TrustServerCertificate=True;"
Security__JwtSigningKey: ${SECURITY_JWT_SIGNING_KEY}
ports:
- "5001:8080"
networks:
- appnetwork
depends_on:
- endatix-db

endatix-hub:
container_name: endatix-hub
image: endatix/endatix-hub:latest
environment:
ENDATIX_BASE_URL: http://endatix-api:8080
AUTH_SECRET: ${AUTH_SECRET}
SESSION_SECRET: ${SESSION_SECRET}
ports:
- "3000:3000"
networks:
- appnetwork
depends_on:
- endatix-api

endatix-db:
container_name: endatix-db
image: mcr.microsoft.com/mssql/server:2022-latest
environment:
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: ${SQLSERVER_SA_PASSWORD}
ports:
- "1433:1433"
networks:
- appnetwork

networks:
appnetwork:
driver: bridge

That's it! 🚀 Your Endatix Platform is ready for exploring.