Skip to main content

Server requirements

RequirementMinimum version
PHP8.2
Node.js18 LTS or later
Composer2.x
DatabaseSQLite 3 or MySQL 8
Web serverNginx or Apache with URL rewriting
Queue workerSupervisor (production)
Required PHP extensions: bcmath, ctype, curl, dom, fileinfo, json, mbstring, openssl, pcre, pdo, tokenizer, xml, zip
PHP 8.3 is recommended. The application ships with PHP 8.3 in its development toolchain.

Clone and install dependencies

git clone https://github.com/TheCodeStudioxyz/sniko-conversational-ai.git
cd sniko-conversational-ai
composer install --no-dev --optimize-autoloader
npm install
Omit --no-dev if you want development tools (Debugbar, Pint, Sail, PHPUnit). For production, always use --no-dev.

Configure the environment

Copy the example environment file and generate an application key:
cp .env.example .env
php artisan key:generate
Then open .env and set the values for your deployment:

Application

APP_NAME=Sniko
APP_ENV=production
APP_KEY=                        # generated by key:generate
APP_DEBUG=false
APP_URL=https://your-domain.com

Database

SQLite requires no additional setup. Ensure the database file exists:
touch database/database.sqlite
The default .env settings work without changes:
DB_CONNECTION=sqlite

ElevenLabs

ELEVENLABS_API_KEY=sk_your_elevenlabs_api_key_here
This is the platform-level key used for server-side API calls. Individual users can also supply their own keys in Settings.

Twilio

TWILIO_ACCOUNT_SID=ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TWILIO_AUTH_TOKEN=your_auth_token
TWILIO_FROM_NUMBER=+15550001234

Payments

STRIPE_KEY=pk_live_your_publishable_key
STRIPE_SECRET=sk_live_your_secret_key
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret

Calendar integrations (optional)

GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GOOGLE_REDIRECT_URI="${APP_URL}/calendar/google/callback"

MICROSOFT_CLIENT_ID=your_microsoft_client_id
MICROSOFT_CLIENT_SECRET=your_microsoft_client_secret
MICROSOFT_REDIRECT_URI="${APP_URL}/calendar/microsoft/callback"
MICROSOFT_TENANT_ID=common

Queue and cache

The default configuration uses the database driver for queues, cache, and sessions — no Redis required:
QUEUE_CONNECTION=database
CACHE_STORE=database
SESSION_DRIVER=database
If you prefer Redis, set REDIS_HOST, REDIS_PASSWORD, and REDIS_PORT, then switch the drivers to redis.

Run database migrations

php artisan migrate
For a fresh install, this creates all required tables. The queue and cache tables are created automatically.

Build the frontend

npm run build
This runs vite build and outputs compiled assets to public/build/. The build must be run any time you update frontend code.

Configure the queue worker

A persistent queue worker is required for batch calling, data extraction, webhook processing, and other background jobs.

Production: Supervisor

Copy the included Supervisor configuration to your Supervisor config directory and reload:
sudo cp supervisor-sniko.conf /etc/supervisor/conf.d/sniko.conf
Edit the file to replace the placeholder paths with your actual installation path and web server user:
[program:sniko-queue]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/sniko-conversational-ai/artisan queue:work --sleep=3 --tries=3 --max-time=3600
autostart=true
autorestart=true
user=www-data
numprocs=2
redirect_stderr=true
stdout_logfile=/var/www/sniko-conversational-ai/storage/logs/queue.log
stopwaitsecs=60

[group:sniko]
programs=sniko-queue
Reload Supervisor:
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start sniko:*

Development: composer run dev

For local development, a single command starts the PHP dev server, queue listener, and Vite in parallel:
composer run dev
This runs:
  • php artisan serve — Laravel development server
  • php artisan queue:listen --tries=1 — Queue worker
  • npm run dev — Vite HMR dev server

Web-based installer

If you prefer a guided setup, navigate to /installer in your browser after starting the web server. The installer walks you through a 6-step process:
1

Welcome

The installer checks whether setup is needed. If the application is already installed, it redirects you to the dashboard.
2

License activation

Enter your license key (minimum 20 characters). The installer validates the key against the licensing server.
3

Requirements check

The installer verifies that all required PHP extensions are loaded and that the PHP version meets the minimum requirement.
4

Database configuration

Enter your MySQL host, port, database name, username, and password. The installer tests the connection before saving it to .env.
5

Database migration

The installer runs php artisan migrate to create all tables.
6

Admin account

Create the first administrator account (first name, last name, email, password). After this step the installer logs you in automatically and redirects to the dashboard.
The installer is protected by the installer middleware. Once the installation flag is written, /installer routes redirect to the dashboard and are no longer accessible.

File permissions

The web server user must be able to write to the following directories:
chmod -R 775 storage bootstrap/cache
chown -R www-data:www-data storage bootstrap/cache

Optional: MCP server (PM2)

Sniko ships with a Model Context Protocol server that exposes agent and conversation data to compatible AI tooling. It runs as a separate Node.js process:
npm install -g pm2
pm2 start ecosystem.config.cjs
The MCP server listens on port 3001 by default (MCP_HTTP_PORT=3001). Logs are written to storage/logs/pm2-error.log and storage/logs/pm2-out.log.

Verify the installation

After completing setup, confirm the following:
  • The dashboard loads at APP_URL.
  • Settings → ElevenLabs validates your API key without errors.
  • The queue worker is running: sudo supervisorctl status sniko:*
  • A test agent can be created and simulated in the browser.
If the frontend shows a Vite manifest error after deployment, run npm run build again to regenerate the compiled assets.

Build docs developers (and LLMs) love