Skip to main content

Gluebox Node, Cubic setup notes

apt install nginx php php-fpm php-mysql php-gd php-xml php-mbstring php-curl php-zip php-cli php-xmlrpc mysql-server unzip curl git composer ufw -y


Configure PHP-FPM : Ensure correct socket (e.g. /run/php/php8.1-fpm.sock)
Edit /etc/php/8.1/fpm/php.ini:
memory_limit = 512M
upload_max_filesize = 100M
post_max_size = 100M
date.timezone = UTC



#!/bin/bash
echo "[Gluebox Node] First boot script starting..."

# Enable services to start at boot
systemctl enable nginx
systemctl enable mysql
systemctl enable php8.3-fpm

# Start services immediately
systemctl start nginx
systemctl start mysql
systemctl start php8.3-fpm

# Set permissions for Drupal
chown -R www-data:www-data /var/www/drupal

# Optional: Secure MySQL (use predefined answers for automation)
# mysql_secure_installation <<EOF
# n
# y
# y
# y
# y
# EOF

# Optional log for confirmation
echo "[Gluebox Node] Services enabled and started." >> /var/log/firstboot.log


# /etc/systemd/system/firstboot.service
[Unit]
Description=Run Gluebox Node first boot script
After=network.target

[Service]
Type=oneshot
ExecStart=/usr/local/bin/firstboot.sh
RemainAfterExit=true

[Install]
WantedBy=multi-user.target

ln -s /etc/systemd/system/firstboot.service /etc/systemd/system/multi-user.target.wants/firstboot.service