Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Use Deployer’s Laravel recipe to pull each Git revision over SSH, install its Composer dependencies, link shared Laravel files, run your selected Artisan tasks, and switch Nginx to the new release through a current symlink. The result is a repeatable Ubuntu deployment with short publish interruptions and a practical path to rollback.

The essential setup is a deployment account with SSH-key access, PHP 8.3 or newer for current Laravel releases, a writable deployment path, a configured deploy.php, and an Nginx server whose document root is current/public.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What Deployer changes in a Laravel deployment

Deployer is a free, open-source deployment tool written in PHP. It connects to one or more servers over SSH and executes a recipe that defines hosts, tasks, release directories, shared files, permissions, publishing, cleanup, and rollback-oriented operations.

Instead of replacing the live application directory in place, Deployer creates a new numbered release, prepares it, and then changes a symlink named current. Nginx continues serving the path /var/www/html/current/public; changing the symlink makes the new release live as one publish operation. Previous releases remain available until cleanup removes them, which gives you a controlled recovery point.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.

Prerequisites on Ubuntu

Server and application requirements

  • An Ubuntu server reachable by SSH. Deployer’s documented provisioning recipe targets Ubuntu.
  • SSH-key authentication for the account that will run deployments. Provisioning may require temporary root key access; recent Ubuntu images commonly disable root SSH by default, so enable key access for provisioning and disable root login afterward if your policy permits.
  • PHP 8.3 or newer for a server running a current Laravel application, as listed in Laravel’s current deployment documentation.
  • Git, Composer, the PHP extensions required by your application, and a process manager or queue worker setup if your application uses queues.
  • An empty or dedicated deployment path such as /var/www/html, writable by the deployment account.
  • A Git repository URL that the remote server can read, normally through a deploy key or another non-interactive credential.
  • An Nginx virtual host configured to serve the release’s public directory rather than the project root.

Choose the deployment account and path first

Use a dedicated account for normal releases and give it ownership of the deployment path. Keep root for initial provisioning and system administration. The account must be able to create the Deployer directories, write shared storage, run Composer and Artisan, and reload any service that you explicitly configure it to reload.

For the examples below, the deployment path is /var/www/html and the host is example.com. Substitute your real values consistently in deploy.php and the Nginx configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install Deployer and create the Laravel recipe

Install the executable

Obtain the current Deployer PHAR from Deployer’s official installation instructions, make it executable, and place it on the command path:

chmod +x deployer.phar
sudo mv deployer.phar /usr/local/bin/dep
dep --version

The command must be available on the machine from which you launch deployments. That can be your workstation, a build runner, or a controlled administration host; Deployer then connects to Ubuntu over SSH.

Initialize a Laravel deployment file

From the Laravel project directory, generate the Laravel recipe:

dep init -t Laravel

If your Deployer version does not offer the template selector, initialize a normal file and import the Laravel recipe explicitly:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
dep init
<?php

namespace Deployer;

require 'recipe/laravel.php';

The generated deploy.php is executable configuration, not merely a list of values. It contains the host definition and the task graph that Deployer will run.

Configure deploy.php

Set the Git repository and host

Replace the generated values with your repository and server:

<?php

namespace Deployer;

require 'recipe/laravel.php';

set('repository', 'git@github.com:user/project.git');

host('example.com')
    ->set('deploy_path', '/var/www/html');

The repository string must be readable by the remote deployment account. Test that account’s SSH key can authenticate to your Git service without an interactive password before the first deployment.

Add optional deployment behavior deliberately

Keep the recipe’s defaults unless you have a clear reason to change them. Add hooks only after deciding whether they must run before or after code publication. For example, the official Deployer guide shows this migration hook:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
after('deploy:update_code', 'artisan:migrate');

You can also add an explicit service reload task when workers or another long-running process must pick up the new code. A reload belongs in your deployment plan only when the deployment account has the required service permissions and you know which process manager is responsible for the process.

What the Laravel recipe prepares automatically

The Laravel recipe encodes the filesystem conventions that a release needs. Understanding them helps you decide what belongs in Git, what belongs in server secrets, and what must survive every release.

Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
Recipe setting or path Purpose Operational consequence
shared_dirs: storage Keeps Laravel’s runtime storage outside individual releases. Logs, uploaded files, framework caches, and other storage data persist when a new release is created.
shared_files: .env Stores environment configuration once on the server. Each release receives a symlink to the shared .env; secrets do not need to be committed to Git.
writable_dirs: bootstrap/cache, storage Marks directories Laravel and its runtime need to write. Deployer applies recursive writability so PHP, queue workers, and Artisan can create required files.
bin/artisan Points tasks at the Artisan executable inside the active release. Optimization, migrations, cache operations, and other commands run against the code being deployed.
storage/logs/*.log Identifies Laravel log files for deployment log handling. Release operations can report relevant application logs while troubleshooting.

Do not copy a production .env into every release manually. Let the recipe create the shared link, then protect the shared file with the deployment account and server permissions.

Understand the release layout and task order

A successful deployment creates a Deployer-managed layout beneath the deployment path:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
/var/www/html/
├── .dep/
├── current -> releases/<release>
├── releases/
│   ├── 1/
│   ├── 2/
│   └── ...
└── shared/
    ├── .env
    └── storage/

The Laravel task flow is designed to prepare a release before publishing it:

Task What it does Why it matters
deploy:prepare Reports status, creates the deployment structure, locks the deployment, creates a release, updates code, sets up the environment, links shared paths, and makes writable directories writable. Builds an isolated candidate release and prevents overlapping runs.
deploy:vendors Installs Composer dependencies for the release. Ensures the checked-out code has its production vendor tree before application tasks run.
artisan:storage:link Creates Laravel’s configured public storage links. Makes files stored under Laravel’s storage system reachable through the application’s public path when configured.
artisan:optimize Caches framework bootstrap information. Prepares the release for production execution.
artisan:migrate Runs database migrations. Changes schema only when you have deliberately enabled this step.
deploy:publish Points current at the new release, unlocks the deployment, cleans old releases, and reports success. Publishes atomically from Nginx’s point of view and removes obsolete releases according to the recipe’s cleanup behavior.
artisan:reload Reloads configured running services. Lets workers or other long-lived processes load the new code without an uncontrolled restart.

The recipe also exposes tasks for maintenance mode, application-key generation, database seeding and rollback commands, cache and route operations, event and view caching, and route listing. Run dep task commands on your installed version to inspect the exact task names and options available to your recipe.

Prepare Ubuntu and SSH safely

Provision only with the access you need

Deployer’s Ubuntu provision guidance assumes root SSH key authentication. On an image where root SSH is disabled, temporarily enable key-based root access for provisioning, complete the required package and account setup, and then disable root SSH again. Never use password authentication for an unattended deployment.

VPS providers commonly used for this style of self-managed deployment include Linode, DigitalOcean, Vultr, AWS, and GCP. The provider does not change Deployer’s workflow; you remain responsible for Ubuntu patching, PHP and Nginx updates, firewall rules, backups, process supervision, and SSH key rotation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

Check connectivity before running a release

  1. From the machine where dep is installed, connect to the host with the same user and key that Deployer will use.
  2. Confirm the deployment account can create and modify /var/www/html.
  3. Confirm the server can fetch the configured Git repository without a prompt.
  4. Check the installed PHP version with php -v and verify the extensions your application requires.
  5. Check that Nginx and PHP-FPM are running and that the Nginx user can read the release and shared paths.

Run the first deployment

After the repository, host, SSH key, and path are verified, run:

dep deploy

Watch the task output rather than treating a zero exit code as the only check. You should see a release created under releases, shared links established, Composer dependencies installed, and the publish step changing current. If the deployment stops before publishing, the previous current release remains the live one.

Validate the live release

  1. On the server, inspect readlink -f /var/www/html/current and confirm it points to the newly created release.
  2. Open the application through its normal hostname and exercise an authenticated page, a form submission, and any critical integration.
  3. Check Laravel logs under the shared storage path and the Nginx and PHP-FPM logs.
  4. Verify that uploaded files and generated links still resolve through the shared storage directory.
  5. Confirm APP_DEBUG is disabled in production and that the application’s health endpoint or equivalent check returns the expected status.

Point Nginx at current/public

The web server must expose Laravel’s public directory, not the project root. A minimal server block location is:

root /var/www/html/current/public;

location / {
    try_files $uri /index.php$is_args$args;
}

The try_files rule serves existing assets directly and sends other requests to Laravel’s front controller while preserving query strings. Because Nginx always reads through current/public, Deployer can prepare a new release privately and publish it by changing the symlink.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

After changing Nginx configuration, validate it with your system’s Nginx configuration test, reload Nginx, and then request the site. Ensure the PHP-FPM socket or upstream configuration matches the PHP version installed for the application.

Run migrations without turning deployment into a database gamble

Decide whether migrations are automatic

The Laravel recipe provides artisan:migrate, but the task is not automatically a substitute for a migration policy. If you want every deployment to run migrations, add the documented hook:

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
after('deploy:update_code', 'artisan:migrate');

Laravel requires production migrations to use its forced, non-interactive behavior. Use the recipe’s production migration handling and verify the generated command for your installed Deployer and Laravel versions before enabling it on a critical database.

Make schema changes compatible with both releases

  • Back up the database and test the migration against a production-like copy before publishing.
  • Prefer additive, backward-compatible changes first: create a nullable column or new table, deploy code that can use both shapes, backfill, and remove obsolete structures only in a later release.
  • Do not publish code that expects a column or index before the migration that creates it has completed.
  • Define what happens if the migration fails. Deployer can leave the old release live when a pre-publish task fails, but a database change already applied may require a forward fix rather than a code rollback.
  • Schedule long-running backfills separately from the request-serving deployment so they do not hold a release lock or exhaust the application database.

Database rollback and code rollback are different operations. Switching current back to an earlier release does not undo a migration; keep a tested restoration or forward-migration procedure.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Reduce interruption during publishing

The release model minimizes the interval in which Nginx changes from one complete release to another. It does not make every operation instantaneous: Composer installation, migrations, cache warm-up, queue restarts, and external service checks can still take time before or after publication.

Use maintenance mode only when the change requires it

The Laravel recipe exposes maintenance-mode tasks. Enable maintenance mode for changes that cannot safely serve requests during the transition, and disable it after the release and its checks complete. For backward-compatible code and schema changes, leaving the old release live until the new one is ready generally avoids an unnecessary maintenance window.

Reload long-running workers deliberately

Queue workers and other persistent processes keep old PHP code in memory. Configure an explicit reload task, or use artisan:reload where your recipe and service configuration support it, so workers adopt the new release. Confirm that the deployment account can perform the reload and that your process supervisor restarts failed workers.

Keep secrets, permissions, and writable data correct

  • Store production secrets in the shared .env, not in the Git repository or a release-specific copy.
  • Keep user uploads and generated files in shared storage; otherwise a new release can hide data written into the previous release directory.
  • Ensure both the deployment account and the PHP-FPM account can access the shared paths without making the entire application tree world-writable.
  • Allow Deployer’s recursive writable-directory operation to manage bootstrap/cache and storage; avoid broad permission commands that expose secrets.
  • Run configuration, route, event, and view cache tasks only after the release contains the intended environment and dependencies.

Rollback and recovery

When a release fails before publication

Inspect the failed task output and the Laravel, Nginx, and PHP-FPM logs. Because preparation happens in a separate release directory, the previous current target normally continues serving traffic. Correct the underlying problem—SSH access, repository authentication, Composer requirements, permissions, a failed Artisan command, or a service reload—and deploy again.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When the new release is live but unhealthy

Stop sending traffic to the faulty code by pointing current to the last known-good release through your approved Deployer rollback procedure. Then investigate the failed health check, worker behavior, configuration, or compatibility issue. Do not delete the old release until logs and rollback are no longer needed.

When a migration caused the incident

Do not assume a code rollback repairs the database. Follow the migration’s tested recovery plan, restore from the appropriate backup when necessary, or deploy a forward fix that restores compatibility. Record the migration state before attempting another release.

Troubleshoot the most common failures

Symptom Likely cause Checks and fix
SSH authentication fails Wrong user, key, host key, or disabled root access during provisioning. Run a manual SSH connection with the exact key and user; install the public key for the deployment account and use root only for the provisioning step that requires it.
Git clone or fetch asks for credentials The remote server cannot authenticate to the repository. Install a read-only deploy key or other non-interactive credential and test the repository URL as the deployment account.
Composer cannot write files Release or vendor directories are owned by another user or lack disk space. Check ownership, free space, PHP and Composer versions, and the deployment path permissions before retrying.
“Permission denied” for logs or cache PHP-FPM and the deployment account do not share access to writable paths. Correct ownership and group permissions for storage and bootstrap/cache; do not make the whole project writable.
The site shows an Nginx 404 or directory listing Nginx points at the project root or the wrong release path. Set root to /var/www/html/current/public, retain the front-controller try_files rule, test the configuration, and reload Nginx.
New code is live but workers run old code Long-lived workers were not reloaded. Add an explicit reload task for the configured process supervisor and verify worker logs after publishing.
Deployment is locked A previous run ended before unlocking. Confirm no deployment is active, then use the recipe’s unlock task; never remove a lock while another release is running.
Migration fails after code checkout Incompatible schema change, missing database access, or a migration that needs interactive confirmation. Review database connectivity and migration compatibility, use production force semantics, and keep the previous release live until the issue is resolved.

A repeatable operating checklist

  • Confirm the Laravel application’s PHP 8.3-or-newer requirement and required extensions are met.
  • Verify SSH-key access from the deployment runner and repository access from Ubuntu.
  • Review the repository, host, deployment path, and hooks in deploy.php.
  • Check that the shared .env and storage paths exist or can be created with correct ownership.
  • Decide explicitly whether migrations, maintenance mode, cache tasks, storage links, and service reloads belong in this release.
  • Back up the database before a migration that can alter or remove data.
  • Run dep deploy and watch each task through deploy:publish.
  • Verify the current target, HTTP health, logs, queues, scheduled work, and critical user flows.
  • Keep the previous release available until the new release has passed its checks and rollback window.

Why this approach fits a self-managed Ubuntu server

Deployer gives you control over Ubuntu, SSH, release retention, hooks, migration timing, and service reloads. That control also means you own operating-system patching, PHP and Nginx upgrades, credentials, backups, monitoring, queue supervision, and incident recovery. The symlink-based release process reduces avoidable interruption, but reliable production delivery still depends on compatible migrations, correct permissions, health checks, and a practiced rollback plan.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.