Server Setup

Server Policy

  • Staging servers are created on the client's Digital Ocean account.

On Laravel Forge with MySQL Database

Requires a Server Provider to be setup in Laravel Forge.

Resources used

Server requirements

These are rule-of-thumb requirements for our servers. We can adjust as needed on a site-by-site basis.

Staging

  • Name: clientname-environment, example, fostercommmerce-staging
  • Type: App Server (PHP, Nginx, Database, Redis, Memcached)
  • Circle: Blank
  • Region: If there are existing Digital Ocean resources, then a region closest to those, otherwise a region closest to where most users of the site would be.
  • Server size: 2 GB RAM, 1vCPU core, 50GB SSD.
    • s-1vcpu-2gb
  • Network: Create new (if there's no existing network), otherwise, select the existing network.
  • Server OS: Ubuntu 24.04 or latest available Ubuntu LTS release.
  • PHP Version: 8.3 or latest version that the site supports
  • Database: MySQL 8
  • Database Name: clientname, for example, fostercommerce

Production

  • Name: clientname-environment, example, fostercommmerce-production
  • Type: App Server (PHP, Nginx, Database, Redis, Memcached)
  • Circle: Blank
  • Region: If there are existing Digital Ocean resources, then a region closest to those, otherwise a region closest to where most users of the site would be.
  • Server size: 8 GB RAM, 4vCPU core, 160GB SSD.
    • s-4vcpu-8gb
  • Network: Create new (if there's no existing network), otherwise, select the existing network.
  • Server OS: Ubuntu 24.04 or latest available Ubuntu LTS release.
  • PHP Version: 8.3 or latest version that the site supports
  • Database: MySQL 8
  • Database Name: clientname, example, fostercommerce

Steps

  1. On the Laravel Forge Servers page, click "Create Server". image
  2. In the modal that displays, choose the clients credentials.
  3. Next, complete the "Create Server" form using the details above for either staging or production.
  4. Leave "Post-Provision Recipe" blank unless there's a specific recipe that is required.
  5. Ensure "Add Server's SSH Key To Source Control Providers" is checked.
  6. Ensure DigitalOcean Weekly Backups is unchecked.
  7. Review the config and click "Create Server" when ready. image
  8. A "Server Credentials" modal will be displayed. image
  9. Save these credentials in a new secure note in Bitwarden called "Forge - {Server Name} - Server". image
    • Ensure that the client folder is selected for the collection
    • Fields:
      • Name: Sudo Password, type: Hidden
      • Name: Database Password, type: Hidden
      • (Optional) Name: Database Username, type: Text, value: forge
  10. Once those credentials have been saved in Bitwarden, dismiss the modal, and wait for Forge to complete provisioning of the server. image
  11. Once provisioning is done, Forge will load the sites page for that server. image
  12. In Digital Ocean, if this is a new site, assign the Reserved IP to this droplet
    • If you're doing a migration to a new server, don't assign the IP yet.