All Recipes
140 recipes available
Add cloudflare real ip config to nginx "updated - 2018-06-08"
Adds a list of cloudflare ip addresses so your app will receive the real ip address
cat >/etc/nginx/conf.d/cloudflare-real-ip.conf <<"EOF"
# CloudFlare IP addresses
# > IPv4
set_real_ip_from 103.21.244.0/22;
Artisan Helper
PickAdding `art` for artisan to the bash profile for easy access. It will work in envoyer style deploys looking for artisan in `./current` and `./default/current` directories.
#!/bin/bash
# Make using artisan a little easier
#
Install ElasticSearch 6.x
Updated Elasticsearch version to 6.x
echo ">> Installing Elastic GPG Key"
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo ">> Install apt-transport-https"
CraftCMS Server Setup
Check https://github.com/dative/craft-do-forge-recipe for more information
#!/bin/bash
# Craft CMS Server Setup
#
Show SSL Expiration Dates
Run as root as the Nginx conf files aren't accessible by the forge user by default. This will print a table of your sites with SSL enabled and when the certificate will expire. Useful for auditing.
#!/bin/bash
printf "%-50s | %-25s\n" "SITE" "EXPIRES"
echo "-------------------------------------------------------------------"
for site in `grep -hR "ssl_certificate /etc/nginx/" /etc/nginx/sites-enabled/|awk '/ssl_certificate/ {print $2}'`; do
Install MySQL Server 5.6
This one-line script will install the MySQL database server.
apt-get install mysql-server-5.6.
Install ElasticSearch 5.x
Updated Elasticsearch version to 5.x
echo ">> Installing Elastic GPG Key"
wget -O - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | apt-key add -
echo ">> Install apt-transport-https"
Install NetData
Installs NetData so you can monitor your servers. It is on port 19999, and allows you to view any resources used across the server, along with extension/apt usages. You can monitor Redis, MySQL,...
cd /root
apt-get install -y zlib1g-dev uuid-dev libmnl-dev gcc make git autoconf autoconf-archive autogen automake pkg-config curl
curl -Ss 'https://raw.githubusercontent.com/firehol/netdata-demo-site/master/install-required-packages.sh' >/tmp/kickstart.sh && bash /tmp/kickstart.sh -i netdata-all --dont-wait
git clone https://github.com/firehol/netdata.git --depth=1
Check Laravel Versions
This Recipe loops through all the sites on your Forge box, checks for the `artisan` file and prints the Laravel version if present.
cd /home/forge
for d in */ ; do
cd $d
if [ -f artisan ]; then
Install Digital Ocean Monitoring Tools
Run this recipe to install the Digital Ocean monitoring tools onto your DO droplets. Be sure to run this as the Root user.
#!/usr/bin/env bash
curl -sSL https://agent.digitalocean.com/install.sh | sh
Update PHP.ini & Restart PHP 7.1
A working PHP 7.1 version of http://forgerecipes.com/recipes/35 Sensible defaults updated, change to your own specifications then add into Forge as a Recipe with Root access.
#!/usr/bin/env bash
declare -A replacers
List WP Users (Requires WP-CLI)
After changing to the default Forge installation directory (/home/forge) the script loops over every folder and if a "wp-config.php" file exists it prints the folder name, then runs the `wp user li...
cd /home/forge
for d in */ ; do
cd $d
if [ -f wp-config.php ]; then