Configure SIHub step by step
This guide is your starting point for operating sihub.at. The fully prepared files are in the project; you fill in the domain, server address, phone numbers and provider credentials with your actual data. Real calls and proof of 20 simultaneous calls are only possible after this setup.
SIHub stands for Super Intelligent Hub. The technical variable names remain compatible: continue to use AIHUB_*, the Redis/Docker project/service names and the LiveKit agent name aihub-voice. The renaming does not require a new workspace. The database is MariaDB; for an old SQLite installation, use the migration guide to migrate it.
All users, agents, workspace settings, knowledge, channels and other platform data you create are stored in MariaDB SIHub permanently. SIHub reconciles the entire schema at startup and adds missing tables, columns and indexes automatically. After a new repository version, the prepared update/restart process is sufficient; there is no need to create tables manually. Table mapping, status checks and behavior for incompatible changes are described under Database operations.
First, publish only the website and portal (as with TattooHub): The Apache quick start uses sudo bash apache2/install.sh prepare, its own service sihub and the ready-made HTTP/HTTPS files in apache2/. The complete commands are in the repository at apache2/README.md. For this direct operation, API/SMTP values belong in /etc/sihub/sihub.env. The following guide describes the full Docker/voice operation with a separate operator file.
If your installation is already running: Back up the current operator file and change it to AIHUB_PUBLIC_URL=https://sihub.at. Keep Redis URLs, keys and existing telephony bindings. After the Migration to MariaDB point to MariaDB. Then set up DNS and the new Apache/HTTPS files Server guide, section 5 to set up DNS and the new Apache/HTTPS files. Reload the configured app as soon as HTTPS is available. Change existing Twilio callbacks to https://sihub.at/hooks/twilio/KANAL_ID/voice and /status; direct website/widget links also use the new domain. On the LiveKit path, the SIP target remains the LiveKit address.
Subscriptions, agent shop and contact form: Set up commerce and contact explains Stripe products with your own prices, checkout, automatic renewal, the customer portal and the signed webhook. Contact requests, orders and subscriptions are stored in MariaDB; the startup sync adds new tables automatically. SMTP is preconfigured with mail.heartfrequency.solutions:587 and STARTTLS, login [email protected], sender/recipient [email protected]. Add the SMTP password to your operator file and then enable the mail worker. This setup also works in direct Apache operation without a voice worker.
1. Connect central AI and voice services
For your first working phone call, use this chain:
AT-Rufnummer / SIP-Provider → LiveKit Cloud → SIHub Voiceworker
├─ Deepgram: hört und transkribiert
├─ SIHub-Backend: zentrale KI mit Tokenabrechnung
└─ Cartesia oder ElevenLabs: spricht
SIHub Website / Portal → MariaDB + Redis
Text and voice use the same centrally configured AI provider. The voice worker sends every model request via the private protocol workspace-api-v2 to the SIHub backend, which reserves and bills the matching workspace/agent allowance. Shared platform allowances are supported. Speech and transport costs are recorded separately. You also need one TTS provider; Cartesia and ElevenLabs do not both need to be set up. Twilio is only needed for the LiveKit path if you choose it as the SIP carrier; the separate TWILIO_*-variables belong to the existing Gather/Say call path. The website continues to run as Flask/Gunicorn behind Apache.
2. Have these credentials ready
| Service | What you need to obtain | Where SIHub uses it |
|---|---|---|
| Domain/DNS | Access to sihub.at, public server IP |
A record @ for the main domain, Apache, HTTPS |
| App server | SSH key, sudo account, Ubuntu 24.04 LTS | /var/www/SIHub, Docker and Apache |
| LiveKit Cloud | Project URL, API key, API secret, SIP endpoint | Media rooms, worker dispatch, browser audio |
| Austrian phone number / SIP trunk | E.164 number, SIP host, authentication data, inbound routing, channel limit | LiveKit inbound/outbound trunk |
| Deepgram | API key and approved model | Streaming speech recognition |
| Central operator AI | API key and approved model of the selected text provider or private ModelServer | Shared model for text chat and voice via the SIHub backend |
| Cartesia or ElevenLabs | API key, voice ID and model ID | Streaming speech output |
| SMTP/Webhook, optional | Server/TLS/auth credentials or approved HTTPS target address | Summaries and notifications |
| SMTP for contact form | Password for [email protected], approval for sender [email protected] |
Sending stored contact requests via STARTTLS |
| Stripe for subscriptions/agent purchases | Secret key, webhook signing secret, your EUR price IDs | Checkout, recurring charges, agent orders and customer portal |
The phone number provider must support forwarding to LiveKit. Ask them for 30 concurrent SIP call channels, if you plan 20 production calls plus a reserve. Have them give you the specific configuration for their trunk: origination/inbound target, termination/outbound host, transport, authentication method, caller numbers and carrier IP ranges. Without a chosen provider, there is no universally correct carrier webhook or SIP password flow. LiveKit SIP provider setup
3. Set up the server, database and domain first
Work through the Server guide up to and including HTTPS. It covers Docker installation, SQLite migration, MariaDB, Redis, the admin user and the Apache files for your domain.
The generator creates one protected operator file:
cd /var/www/SIHub
python3 deploy/prepare_environment.py
If it already exists, it is not overwritten. Edit it instead with:
sudoedit /var/www/SIHub/deploy/.env.production
deploy/.env.production belongs to Docker mode. The root file .env belongs to the local Python installation; changes there do not automatically affect Docker. The operator file remains mode 0600. The generator already writes new database/Redis/session/worker keys and matching internal URLs; you do not need to copy these values from examples.
With a migrated SQLite installation, sign in with your existing account after the migration. For a new installation, create the admin with the interactive command shown in the server guide. Then open https://sihub.at/login.
The installer provisions the database and DB account once; the app then updates the schema of its existing database under a MariaDB lock. In direct Apache mode, sudo bash apache2/install.sh manage schema-status reads the current/target state without making changes. In Docker mode, the same command is:
sudo docker compose --env-file deploy/.env.production -f deploy/compose.yml run --rm --no-deps app python manage.py schema-status
4. Enter provider keys and models
Create the accounts in the official provider dashboards. Save the values below in deploy/.env.production; all placeholders must be replaced with real values. An existing chat product subscription does not prove API access with credit and model approval.
LiveKit
- Open LiveKit Cloud and create or select your SIHub project.
- Copy the project URL, API key and API secret from the project.
- Note the SIP endpoint for the subsequent carrier configuration.
LIVEKIT_URL=wss://DEIN_PROJEKT.livekit.cloud
LIVEKIT_API_KEY=DEIN_API_KEY
LIVEKIT_API_SECRET=DEIN_API_SECRET
AIHUB_VOICE_AGENT_NAME=aihub-voice
The project URL is the LiveKit address. sihub.at remains your website's address. For EU SIP, use the regional endpoint from the settings that actually belongs to your project. LiveKit regions
Deepgram for speech recognition
- Open the Deepgram Console and choose your project.
- Create an API key with streaming STT permission.
- Check model/region access and your concurrent connection limit.
DEEPGRAM_API_KEY=DEIN_API_KEY
DEEPGRAM_MODEL=nova-3
DEEPGRAM_BASE_URL=https://api.eu.deepgram.com/v1/listen
DEEPGRAM_MIP_OPT_OUT=1
nova-3 supports German. The EU endpoint is a regional STT endpoint; the other providers must be selected separately according to your requirements. Deepgram models and languages, EU endpoint
Central operator AI, here using OpenAI as an example
For OpenAI or Anthropic, you manage providers and task models under SIHub Admin → AI operations. There you can load available models and save the selection permanently. The following environment values apply until the selection is first saved in the admin area; the API keys always remain in the protected operator file. New keys are applied via the normal deploy.
- Open your OpenAI project and set up its API usage.
- Create a project API key and choose a text model ID that is actually available to you.
- Enter the model explicitly; SIHub does not guess which models your account is approved for.
SIHUB_INCLUDED_AI_PROVIDER=openai
SIHUB_INCLUDED_AI_MODEL=
OPENAI_API_KEY=DEIN_PROJEKT_API_KEY
OPENAI_MODEL=DEINE_VERFUEGBARE_MODELL_ID
The official OpenAI documentation requires keeping API keys server-side. The key belongs in the operator file. OpenAI API authentication
Alternatively, use SIHUB_INCLUDED_AI_PROVIDER to select one of the centrally supported providers: OpenAI, Anthropic, Gemini, Groq, xAI, Custom or ModelServer. For Groq, for example, GROQ_API_KEY and GROQ_MODEL are required. auto uses a fully configured central provider; a failed call does not automatically switch to another one. SIHUB_INCLUDED_AI_MODEL overrides the default model of an explicitly selected provider.
New voice sessions use the same selection and do not require their own model API key in the worker. Historical VOICE_LLM_*-, AIHUB_VOICE_LLM_ROUTE- and DGX voice values are not evaluated for this. Existing private operator files and keys are kept during the upgrade. Setting up all central providers is described under Operator AI.
Cartesia for speech output
- Open Cartesia and create an API key.
- Choose a suitable voice that is approved for use and copy its voice ID.
- Check model access and the streaming concurrency limit.
AIHUB_VOICE_TTS_PROVIDER=cartesia
CARTESIA_API_KEY=DEIN_API_KEY
CARTESIA_VOICE_ID=DEINE_VOICE_ID
CARTESIA_MODEL=sonic-3
Voice ID and model ID are different values. Cartesia streaming TTS
For ElevenLabs, set the following instead:
AIHUB_VOICE_TTS_PROVIDER=elevenlabs
ELEVENLABS_API_KEY=DEIN_API_KEY
ELEVENLABS_VOICE_ID=DEINE_VOICE_ID
ELEVENLABS_MODEL=eleven_flash_v2_5
Check the voice and model in your own account. The official model documentation lists eleven_flash_v2_5 as an alternative to the older turbo models. ElevenLabs models
5. Set up knowledge, assistant and channels
- Sign in to the portal with your own workspace.
- Under Knowledge enter your company information, FAQs, opening hours and approved answers.
- Create under Assistants an agent with German as its language, a clear greeting and a conversation goal. Check its answers under Use agent; this uses the central AI access.
- Assign the knowledge and publish an agent version. An unpublished draft is not enough for live voice.
- Create an active SIP/phone channel with
voice_engine=livekit,mode=liveand the published agent ID. For browser audio, also create a separatewebvoicechannel. - Note the channel ID and the actual workspace ID. You can also get the ID with:
sudo docker compose --env-file deploy/.env.production -f deploy/compose.yml run --rm --no-deps app python manage.py list-workspaces
If an interface does not yet offer every channel attribute, the LiveKit setup guide contains the exact JSON contract for POST /api/entities/channels. The API documentation explains authentication and CSRF for your own requests. Provider keys are never stored in the channel entity.
6. Connect phone number, trunks and dispatch
Now follow LiveKit setup, sections 2 to 5:
- In LiveKit, create an inbound trunk for your phone number and an outbound trunk for your provider.
- Configure the inbound target at the carrier to point to your LiveKit SIP endpoint.
- Create exactly matching dispatch metadata with the channel ID and
agentName=aihub-voice. - Note both
ST_...-trunk IDs and the verified E.164 caller number. - Add the operator binding to the same
deploy/.env.production:
AIHUB_LIVEKIT_CHANNEL_BINDINGS='{"DEINE_CHANNEL_ID":{"workspace_id":"DEINE_WORKSPACE_ID","inbound_trunk_id":"ST_INBOUND","outbound_trunk_id":"ST_OUTBOUND","from_number":"DEINE_VERIFIZIERTE_E164_NUMMER"}}'
Keep JSON values in single outer quotes, and the JSON keys inside them in double quotes. For additional channels, add further entries to the same object. A webvoice entry only needs its real workspace_id; it does not need a SIP trunk.
7. Check and apply via the usual deploy
First, check the file without calling any providers:
sudo docker compose --env-file deploy/.env.production -f deploy/compose.yml config --quiet
sudo docker compose --env-file deploy/.env.production -f deploy/compose.yml run --rm --no-deps app python manage.py check-config --voice
Missing values are shown only by their variable name. Exit code 1 means: correct the listed entries. A successful check verifies formats and presence; it does not prove valid provider keys or real trunk limits.
Workspaces automatically use live mode. There is no additional live approval. For an existing installation, use the normal Deploy action in AppHub or sync with deployment. This flow applies the configuration, updates data and services and checks for a real response from the central AI. The app and voice worker must use the same protocol version; old workers do not receive new sessions. See Deployment.
With a self-managed Docker installation, rebuild and restart the app and voice worker together after the backup:
sudo docker compose --env-file deploy/.env.production -f deploy/compose.yml --profile voice up -d --build --force-recreate app voice-worker-a voice-worker-b
sudo docker compose --env-file deploy/.env.production -f deploy/compose.yml ps
restart does not apply changed environment variables; up -d --force-recreate recreates the affected containers with the new file. Then check /api/voice/status in the signed-in portal and the worker registration in the LiveKit project. Also enable the reaper minute timer from the Server guide, so that expired rooms are closed after a worker crash.
Now make one authorized incoming call to your own phone number, then a test call from the portal to a consenting test person. Only after that, check browser audio and the stages for 5/20/30 calls under Capacity acceptance. With active carrier routing, real callers can immediately trigger billable sessions.
8. Optional extensions
Private model: A private ModelServer can be set up centrally for text and voice. The model requests stay in the SIHub backend with the same allowance check. A separate voice hybrid path or a customer-selectable model route is not used.
Tools and automations: Configure allowed HTTPS hosts, workspace bindings and credential references according to Tools. Start with a read-only action; write postings need unambiguous input and success checks. An API key alone does not create a finished CRM or calendar workflow.
Notifications: Set up SMTP or bound webhook targets according to Integrations and only then enable your own notifications timer. Check the outbox and the actual delivery.
Prices: Use AIHUB_USAGE_PRICING for your current contract prices. The exact field contract is described under Capacity acceptance. The values are cost estimates, not automatic invoicing or payment collection.
Subscriptions and agent sales: The actual sales prices come from your Stripe price IDs SIHUB_STRIPE_PRICE_*. For automatic payment collection, set up checkout and the payment webhook as documented there. Your own provider cost estimates in AIHUB_USAGE_PRICING and sales prices are managed separately.
Operations: Plan verified, separately stored backups, monitoring access and a recovery test using Deployment as a guide. Before going live with customers, the actually measured voice capacity and your remaining functional requirements must also be accepted.