All Recipes
144 recipes available
Add PM2 Install
Install PM2
sudo npm install -g pm2
Install "pv"
# Author: Rob Allport for f9web.co.uk
sudo yes | pt install pv -y
Install wkhtmltopdf 12.6.1 (Ubuntu 20.10)
This script will install the latest wkhtmltopdf on a Forge server running Ubuntu 20.10
# Author: Rob Allport for f9web.co.uk
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb
sudo dpkg -i wkhtmltox_0.12.6-1.focal_amd64.deb
Spatie Image Optimizer Optimizers installation
Install Image Optimizers used by the Spatie Image Optimizer https://github.com/spatie/image-optimizer
sudo apt-get install jpegoptim
sudo apt-get install optipng
sudo apt-get install pngquant
sudo npm install -g svgo@1.3.2
Install PHP Redis extension for PHP 8.0
sudo apt-get install libzstd-dev
yes | sudo pecl install redis
sudo echo "extension=redis.so" > /etc/php/8.0/mods-available/redis.ini
sudo ln -sf /etc/php/8.0/mods-available/redis.ini /etc/php/8.0/fpm/conf.d/20-redis.ini
Change all SSL sites on this server to use HSTS
PickHSTS is a setting you can enable on your SSL-enabled domains to ensure browsers will never connect to the non-secured version of your web site. https://https.cio.gov/hsts/ If you run this scr...
# Set the text we want to insert into each record
INSERT='\ # Enable HSTS (added manually)\n add_header Strict-Transport-Security "max-age=31536000" always;\n'
# For every site in sites-available without the phrase "HSTS" in it...
MSSQL recipe
Installs the MSSQL php packages for php 7.4
#!/bin/sh
PHP_MSSQL_DRIVERS=Ubuntu2004-7.4
PHP_MSSQL_RELEASE=5.9.0
Installing latest version of MongoDB
1. Registering the key to use the official mongodb apt repository 2. Update the package manager so it knows about the new repository 3. Install last version of MongoDB & some php tools to build t...
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update
[WIP] Install gRPC PHP extension
Instructions: - https://github.com/grpc/grpc/tree/master/src/php - https://github.com/protocolbuffers/protobuf/tree/master/php
sudo pecl install protobuf
sudo pecl install grpc
Fix Broken Ubuntu Dependencies
Repair potentially broken Ubuntu broken dependencies
# Repair broken apt
apt --fix-broken -y install
apt-get -f -y install
Install MeiliSearch
Install MeiliSearch with Laravel Forge https://www.meilisearch.com/
# Install MeiliSearch
curl -L https://install.meilisearch.com | sh
# Move the MeiliSearch binary to your system binaries
Disable MySQL8 Binary Logs
I had a Forge instance with five WordPress websites and MySQL binary logs took up over 10GB of space and eventually crashed the server. Run this to disable binary logging and be sure to check that ...
# Disable MySQL8 Binary Logs
echo "disable_log_bin" >> /etc/mysql/my.cnf
# Restart MySQL