Skip to main content
Launch Crate
Featured Post Setup

Environment Variables: The Ten You Actually Need

Date
Sep 16, 2026
Author
Ines Carvalho
Read time
2 min
Views
12,949

A short list of the environment keys that matter on day one, and safe defaults for everything else.

Put the queue worker under a process manager such as systemd or Supervisor, otherwise emails and webhooks will quietly pile up.

Before you start

Launch Crate needs PHP 8.2 or newer, a database and somewhere to run a queue worker. Everything else is optional and can be added later.

Most installs take under ten minutes on a fresh server. The web installer checks requirements, writes the environment file and creates the first admin.

  • PHP 8.2+ with intl, mbstring and gd
  • MySQL 8, PostgreSQL 14 or SQLite 3.35+
  • A process manager for the queue worker
  • One cron entry for the scheduler

“Simplicity is prerequisite for reliability.”

— Edsger W. Dijkstra, EWD 498 (1975)

Step by step

We recommend starting with SQLite for local development and switching to MySQL or PostgreSQL before launch; the migration command handles the move.

APP_ENV=production
APP_URL=https://shop.example.com
DB_CONNECTION=mysql
QUEUE_CONNECTION=redis
MAIL_MAILER=smtp

Troubleshooting

Keep your environment file out of version control and back it up somewhere safe; it holds the keys that decrypt your data.

If the installer stops at the requirements screen, the message names the missing PHP extension and the package that provides it.

Scheduled tasks run from a single cron entry that calls the scheduler every minute; there is no need to add one line per job.

File permissions trip up more installs than anything else: the web server needs write access to storage and the cache folder, nothing more.

How we work on posts like this

Mistakes stay visible. If a post turns out to be wrong, we correct it in place, mark the correction and explain what we got wrong, rather than quietly swapping the text. Readers trust a build log more when they can see it being honest about its errors.

Questions or a better approach? Leave a comment below, or reply to the build-log email and we will fold the best ideas into the next release.

12 Comments Discussion
  1. Pavel Horak 10:21 pm

    Clear, practical and no fluff. Thank you.

    1. Zoe Lambert 5:09 am

      Same here, this saved me an afternoon.

    2. Raj Patel 1:33 am

      Seconding this request.

      1. Zoe Lambert 10:34 pm

        It worked for me on 3.1 after running the upgrade command.

      2. Arjun Mehta 12:43 am

        Agreed, the screenshots help a lot.

      3. Ines Carvalho Author 10:47 am

        Thanks for reading! Yes, that is on the roadmap for the next point release.

  2. Arjun Mehta 11:35 pm

    Great write-up. Would love a follow-up on how you handle this with multiple environments.

  3. Freya Nilsen 7:11 am

    Would you share the full config file? The snippet is helpful but I am missing context.

    1. Yusuf Demir 12:06 pm

      Seconding this request.

  4. Arjun Mehta 10:56 am

    We switched to this approach after the last post and support tickets dropped noticeably.

  5. Sofia Rossi 8:22 am

    Would you share the full config file? The snippet is helpful but I am missing context.

  6. Kwame Asante 5:47 pm

    This is exactly the checklist I needed. Printing it and taping it next to my monitor.

Leave a comment

Your email address will not be published. Required fields are marked *

Version 3.2 is out

Ship your next Side Project Faster

One-command install • 14 payment and login providers • 9 starter themes • Admin dashboard • Search-ready pages • Installable app

PHP 8.4 Laravel 12 Tailwind 4 Vite PWA