OpenEscool
Install guide

Install OpenEscool on your own server

From an empty VPS to a live site with HTTPS in about 30 to 45 minutes. Copy and paste each block into your server's terminal.

Last updated 2026-11-14 ยท The guide on GitHub is the source of truth.

What you need

  • A VPS running Ubuntu 24.04, for example a Hostinger VPS. KVM 1 is enough to start; pick KVM 2 for thousands of members or many uploaded videos.
  • A domain. Below, replace koko.com with yours.
  • About 30 minutes.

1. Set up the VPS

  1. Install a plain Ubuntu 24.04 (no control panel).
  2. Set a strong root password and note the server's IP address.
  3. In your domain's DNS, add an A record for @ and one for www, both pointing to the VPS IP. DNS can take minutes to hours.

2. Connect to the server

Open PowerShell (Windows) or Terminal (Mac):

ssh root@YOUR_VPS_IP

3. Install the software

PHP 8.3, MySQL, Nginx, Composer, Node.js and Git:

apt update && apt upgrade -y
apt install -y nginx mysql-server git unzip curl ufw certbot python3-certbot-nginx \
  php8.3-fpm php8.3-cli php8.3-mysql php8.3-sqlite3 php8.3-mbstring php8.3-xml \
  php8.3-curl php8.3-zip php8.3-bcmath php8.3-intl php8.3-gd composer
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt install -y nodejs

Turn on the firewall:

ufw allow OpenSSH && ufw allow 'Nginx Full' && ufw --force enable

Allow uploads up to 100 MB:

sed -i 's/^upload_max_filesize.*/upload_max_filesize = 100M/; s/^post_max_size.*/post_max_size = 110M/' /etc/php/8.3/fpm/php.ini
sed -i 's/^;env\[PATH\]/env[PATH]/' /etc/php/8.3/fpm/pool.d/www.conf
systemctl restart php8.3-fpm

4. Create the database

Replace CHANGE_THIS_PASSWORD with your own password:

mysql -e "CREATE DATABASE openescool CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'openescool'@'localhost' IDENTIFIED BY 'CHANGE_THIS_PASSWORD';
GRANT ALL PRIVILEGES ON openescool.* TO 'openescool'@'localhost'; FLUSH PRIVILEGES;"

5. Download OpenEscool

mkdir -p /var/www && chown www-data:www-data /var/www
cd /var/www
sudo -u www-data git clone https://github.com/amanverma-gh/openescool.git
cd openescool
sudo -u www-data cp .env.example .env
nano .env

Set these lines, using your domain and database password:

APP_NAME=OpenEscool
APP_ENV=production
APP_DEBUG=false
APP_URL=https://koko.com

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=openescool
DB_USERNAME=openescool
DB_PASSWORD=CHANGE_THIS_PASSWORD

Save with Ctrl+O, Enter, and exit with Ctrl+X. Then install and set up the database:

sudo -u www-data composer install --no-dev --optimize-autoloader
sudo -u www-data php artisan key:generate
sudo -u www-data php artisan migrate --force
sudo -u www-data php artisan storage:link
sudo -u www-data npm ci
sudo -u www-data npm run build
sudo -u www-data php artisan optimize
Don't run php artisan migrate --seed on a live site. The seeder adds demo users and posts.

6. Connect your domain (Nginx)

DOMAIN=koko.com
cat > /etc/nginx/sites-available/openescool <<EOF
server {
    listen 80;
    server_name $DOMAIN www.$DOMAIN;
    root /var/www/openescool/public;
    index index.php;
    client_max_body_size 110M;

    location / {
        try_files \$uri \$uri/ /index.php?\$query_string;
    }

    location ~ \.php\$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
    }

    location ~ /\.(?!well-known) {
        deny all;
    }
}
EOF
ln -sf /etc/nginx/sites-available/openescool /etc/nginx/sites-enabled/
rm -f /etc/nginx/sites-enabled/default
nginx -t && systemctl reload nginx

7. Turn on HTTPS

Once DNS points to the server. Use your own email for renewal notices:

certbot --nginx -d $DOMAIN -d www.$DOMAIN --agree-tos -m you@example.com --redirect -n

8. Background jobs

One cron entry runs emails, digests, event reminders and subscription checks:

(crontab -u www-data -l 2>/dev/null; echo "* * * * * cd /var/www/openescool && php artisan schedule:run >> /dev/null 2>&1") | crontab -u www-data -

9. Open your site

  1. Go to your domain and sign up. The first account becomes the platform admin.
  2. Open the user menu, then Admin settings: set your site name and logo, paste your Brevo API key and send a test email, choose your home page, and set search engine and upload options.
  3. Click Create a community and invite your members.

10. Payments

Add your Stripe and/or Razorpay keys to .env, then run sudo -u www-data php artisan optimize. Add these webhooks (use test keys first):

GatewayEndpoint
Stripehttps://koko.com/webhooks/stripe
Razorpayhttps://koko.com/webhooks/razorpay

The list of events for each gateway is in the payments guide.

Updating

Back up first (a VPS snapshot is easiest), then:

cd /var/www/openescool
sudo -u www-data php artisan app:update

Or click Update now in Admin settings, Updates. The command is safer, because you can see and fix any step that fails.

Troubleshooting

ProblemFix
500 Server Errortail -50 /var/www/openescool/storage/logs/laravel.log
Page doesn't loadCheck DNS points to the VPS; run nginx -t and systemctl status php8.3-fpm
Emails don't arriveAdmin settings, Email, Send test email; check the sender is verified in Brevo and the cron is set
Uploads failCheck upload_max_filesize, client_max_body_size and Admin settings, Upload limits
Changed .env, nothing happenssudo -u www-data php artisan optimize
Permission errorschown -R www-data:www-data /var/www/openescool

Still stuck? Ask at openescool.userjot.com.

Questions while installing?

Ask on the feedback board or open an issue on GitHub.