跳到主要内容

🧙 Installation Wizard

Monitron SaaS includes a beautiful, step-by-step installation wizard that makes setup a breeze. No manual .env editing needed!


🚀 Accessing the Wizard

Navigate to your domain:

https://your-domain.com/install
信息

Can't see the wizard? Make sure:

  1. Your web server points to the public/ directory
  2. The .env file exists (even if empty — copy from .env.example)
  3. File permissions are set correctly (see File Permissions)

Step 1 of 6: 👋 Welcome

The welcome screen gives you an overview of what the wizard will do. Nothing to configure here — just click "Let's Get Started" to continue.


Step 2 of 6: ✅ Requirements Check

The wizard automatically checks your server for all required PHP extensions and settings.

What Gets Checked

CheckWhy It's Needed
PHP >= 8.2Monitron requires modern PHP
BCMath extensionMath calculations for uptime percentages
Ctype extensionString validation
cURL extensionMaking HTTP requests to your monitored services
DOM extensionParsing HTML/XML responses
Fileinfo extensionDetecting file types for uploads
JSON extensionAPI communication and config storage
Mbstring extensionMulti-byte string support (Unicode)
OpenSSL extensionSSL certificate checking and HTTPS
PDO extensionDatabase connections
Tokenizer extensionPHP code processing
XML extensionXML response parsing
GD or ImagickImage processing for avatars and logos
storage/ writableCache, logs, uploads
bootstrap/cache/ writableFramework cache

✅ All Green?

Great! Click "Continue" to proceed.

❌ Something Red?

The wizard shows exactly which requirement failed. Here's how to fix common ones:

Missing PHP extension (e.g., php-curl):

# Ubuntu/Debian
sudo apt install php8.3-curl
sudo systemctl restart php8.3-fpm

# CentOS/RHEL
sudo yum install php-curl
sudo systemctl restart php-fpm

Directory not writable:

sudo chown -R www-data:www-data /var/www/monitron/storage
sudo chmod -R 775 /var/www/monitron/storage
sudo chown -R www-data:www-data /var/www/monitron/bootstrap/cache
sudo chmod -R 775 /var/www/monitron/bootstrap/cache

Step 3 of 6: 💾 Database Setup

Here you'll configure your database connection. The wizard supports three database engines:

FieldExample ValueNotes
Host127.0.0.1Use IP, not localhost (avoids socket issues)
Port3306Default MySQL port
DatabasemonitronMust already exist
Usernamemonitron_userDatabase user
Passwordyour_passwordDatabase password

Before running the wizard, create the database and user:

-- Log in to MySQL
mysql -u root -p

-- Create database
CREATE DATABASE monitron CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- Create user and grant permissions
CREATE USER 'monitron_user'@'localhost' IDENTIFIED BY 'your_secure_password';
GRANT ALL PRIVILEGES ON monitron.* TO 'monitron_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
注意

Important: Always use utf8mb4 charset! This ensures proper support for emojis and special characters in monitor names, incident descriptions, etc.

🐘 PostgreSQL

FieldExample Value
Host127.0.0.1
Port5432
Databasemonitron
Usernamemonitron_user
Passwordyour_password

Create the database first:

-- Log in to PostgreSQL
sudo -u postgres psql

-- Create user and database
CREATE USER monitron_user WITH PASSWORD 'your_secure_password';
CREATE DATABASE monitron OWNER monitron_user;
\q

📄 SQLite

Select SQLite and the wizard creates the database file automatically at database/database.sqlite. No configuration needed!

注意

SQLite is for testing only. It doesn't handle concurrent writes well, which means monitoring checks can fail under load. Use MySQL or PostgreSQL for production.

🧪 Test Connection

Click "Test Connection" before proceeding. The wizard will:

  1. Try to connect to your database
  2. Show a ✅ success message or a ❌ error with details
  3. Only let you proceed if the connection is successful

Step 4 of 6: 👤 Admin Account

Create your first administrator account:

字段描述
NameYour display name (e.g., "John Smith")
EmailYour email address (used to log in)
PasswordAt least 8 characters. Make it strong!
Confirm PasswordType it again to make sure

This account will be the super admin with full access to everything. You can create more users and teams later from the dashboard.

信息

Tip: Use a real email address! Monitron can send you email notifications about your monitors. You can always change it later in your profile settings.


Step 5 of 6: 🖥️ Server Configuration

This step shows you the configuration files you need for your specific web server. The wizard provides ready-to-copy configs for:

Web Server Configs

Click the tab for your web server to see the config:

  • 🟢 Nginx — Copy to /etc/nginx/sites-available/monitron
  • 🟠 Apache — Copy to your VirtualHost config
  • ⚡ LiteSpeed — Configuration instructions
  • 🟡 Caddy — Copy to your Caddyfile
  • 🔵 IIS — Web.config for Windows/IIS

Each config is customized with your domain name and file paths!

⏰ Cron Job

The wizard shows you the exact cron entry to add:

* * * * * cd /var/www/monitron && php artisan schedule:run >> /dev/null 2>&1

🔄 Supervisor Config

For queue workers, copy the Supervisor configuration shown.

信息

Don't skip this step! Even though you can click through, you NEED to set up the cron job and queue workers for Monitron to actually perform monitoring checks.


Step 6 of 6: 🎉 Complete!

That's it! The wizard has:

  1. ✅ Written your .env configuration file
  2. ✅ Run all database migrations (created 14+ tables)
  3. ✅ Seeded default application settings
  4. ✅ Created your admin account and default team
  5. ✅ Created the storage/installed.lock file

Click the "Go to Dashboard" button to start using Monitron SaaS!


🔒 After Installation

Once the wizard completes, it creates a storage/installed.lock file. This file:

  • Prevents anyone from running the wizard again
  • Redirects /install requests to the dashboard
  • Protects your installation from being reconfigured
危险

Never delete storage/installed.lock unless you need to completely reconfigure your installation! Deleting it will expose the setup wizard to anyone who visits /install.


🔄 Running the Wizard Again

If you absolutely need to run the wizard again (e.g., database corrupted):

# Remove the lock file
rm /var/www/monitron/storage/installed.lock

# Then visit /install in your browser
注意

Warning: Running the wizard again will overwrite your .env file, re-run migrations, and create a new admin account. Back up your database first!