Setup Script¶
The setup.sh script bootstraps the Astradial OSS environment. It detects the platform and offers two deployment modes.
Usage¶
Mode Selection¶
On launch, the script prompts:
Astradial OSS Setup
====================
1) Linux / VPS (full self-hosted stack)
2) Mac / Windows (cloud mode → open.astradial.com)
Select mode [1/2]:
Full stack runs locally via Docker Compose.
Containers started:
| Container | Purpose |
|---|---|
astradial-editor | Next.js dashboard |
astradial-api | Node.js REST API |
astradial-asterisk | Asterisk 20 PBX |
astradial-db | MariaDB |
astradial-redis | Redis (caching / sessions) |
astradial-workflow | Workflow Engine |
Behaviour:
- Admin tab is visible in the Editor for org management
- SIP server = the machine's own IP address
- All data stored locally
ASTRADIAL_MODE=selfhosted
Only the Editor runs locally. Everything else proxies to open.astradial.com.
Containers started:
| Container | Purpose |
|---|---|
astradial-editor | Next.js dashboard (API proxied to cloud) |
Behaviour:
- Admin tab is not visible (use staging for admin tasks)
- API calls proxy to
https://open.astradial.com - SIP registers to
opensip.astradial.com:5060 ASTRADIAL_MODE=cloud
Environment Variables¶
The script auto-generates a .env file:
# Auto-generated by setup.sh
ASTRADIAL_MODE=selfhosted # or "cloud"
JWT_SECRET=<auto-generated>
INTERNAL_API_KEY=<auto-generated>
DB_HOST=astradial-db # selfhosted only
DB_NAME=astradial_oss # selfhosted only
DB_USER=astradial # selfhosted only
DB_PASS=<auto-generated> # selfhosted only
API_URL=http://localhost:8080 # selfhosted
# API_URL=https://open.astradial.com # cloud mode
Secrets are auto-generated
JWT_SECRET and INTERNAL_API_KEY are generated at setup time using openssl rand. Never commit the .env file.
After Setup¶
Once setup completes:
- Open the Editor at
http://localhost:3000 - Create an account and organisation
- Add SIP extensions
- Register your softphone (Zoiper, Ooh SIP, etc.)
- For inbound DIDs, email
cats@astradial.com
Resetting
To reset and start fresh, run ./setup.sh --reset. This tears down all containers and removes the .env file. Database volumes are preserved unless you pass --purge.