All Recipes
140 recipes available
frankenphp
Prerequisite, a base server, as a worker server, run recipe as root open ports 80/443 install frankenphp enable mercure set as a service create base caddy config file
#!/bin/bash
ufw allow http
ufw allow https
# Download FrankenPHP binary
Fix NGINX 413 Request Entity Too Large (cannot upload larger files)
If you cannot upload larger files via your website, it might be because your Nginx config is missing client_max_body_size. This recipe will go through your all websites on the server and add a l...
FILES=/etc/nginx/sites-available/*
restart=0
for f in $FILES
Optimize SSL
Enable SSL Session Cache, add Optimized SSL Cyphers, enable SSL Stapling. This is part of a larger SSL optimization process described here: https://laravel-news.com/2016/01/optimizing-ssl-laravel-f...
cat > /etc/nginx/conf.d/ssl_optimizations.conf <<EOT
# Session Cache Settings
ssl_session_cache shared:SSL:20m;
ssl_session_timeout 180m;
Install Floating IP
#!/bin/sh
# Install (Hetzner Cloud) Floating IP on Ubuntu 20.4 or Ubuntu 22.04 machine.
# Run this script as root user!
# Make sure to update IP_ADDRESS!
Supervisor Permissions for forge user
Allow forge user to execute supervisorctl commands to e.g. restart a daemon during deployment.
echo 'forge ALL=(ALL) NOPASSWD: /usr/bin/supervisorctl' | sudo EDITOR='tee -a' visudo
# Example usage in Deploy Script:
# sudo supervisorctl restart daemon-<deamon id>:*
Install nvm
Installs nvm (node version manager)
# Execute as forge
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
# Usage in Deploy Script with .nvmrc file:
Install wkhtmltopdf 12.6.1 (Jammy / Ubuntu 22.04.3 LTS)
Install the latest version of wkhtmltopdf on the latest Ubuntu versions as provided by Forge i.e. 22.04. This also works when you have PHP 8.2 set as your default PHP version. Works fine as of 09/0...
# ***
# Created by Rob Allport for https://www.f9web.co.uk
# ***
Install Google Chrome
Install the latest Google Chrome on your Forge server
# Grab latest Chrome .deb
wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -O /tmp/chrome.deb
# Run the dpkg
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