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.

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

Capistrano turns a repeatable SSH deployment procedure into a command such as bundle exec cap production deploy. It connects to an already provisioned VPS, checks prerequisites, fetches a release from source control, runs your configured tasks, links persistent files and directories, switches the current symlink, and removes old releases. This guide shows how to configure that workflow safely for a production VPS, including Rails integrations, shared files, dry runs, troubleshooting, and rollback.

What Capistrano does—and what it does not do

Capistrano is a Ruby, Rake, and SSH deployment automation framework. It runs from your application project and executes tasks on remote servers over SSH. The framework does not create a VPS, install an operating system, provision a database, or replace a service manager. You must prepare an SSH-accessible server first, then describe your deployment procedure in Capistrano configuration.

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

Its central safety feature is release-based deployment. Each deployment is checked out into a new timestamped directory. Persistent data remains in a separate shared directory, while current points at the release serving traffic. Publishing a release is therefore a symlink change rather than an in-place overwrite.

Prerequisites for a reliable VPS deployment

  • Ruby and Bundler on the workstation: Capistrano is installed in the project bundle. The official quick start documents Ruby 2.5 or newer; confirm that requirement against the Capistrano release selected for your application.
  • A source-control repository: The VPS must be able to fetch the repository using the SCM configured for the project, commonly Git.
  • SCM binaries on the VPS: Install Git or the relevant source-control client on the deployment server, not only on your laptop.
  • A dedicated, non-privileged deployment account: Give it ownership of the deployment directory and only the narrowly scoped privileges required by your release tasks.
  • SSH key authentication: Test a non-interactive SSH login as the deployment user. A deployment that waits for a password, host-key confirmation, or interactive sudo prompt will stall.
  • Application runtime dependencies: Install the language runtime, system packages, database client libraries, web server, process manager, and any other dependencies your application needs.
  • A POSIX-compatible shell and a writable application parent directory: For example, create /var/www and permit the deployment account to create the application directory below it.

Keep privileged operating-system setup outside the normal deploy command. If a release needs a service restart, use a controlled service-manager policy or a narrowly permitted command rather than unrestricted interactive sudo.

#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.

Prepare the VPS

  1. Create the deployment user. Use a separate account such as deploy, disable password login where appropriate, and install its public SSH key in ~/.ssh/authorized_keys with correct ownership and permissions.
  2. Install the runtime and Bundler. Match the Ruby and Bundler versions used by the application. Install native libraries needed to compile gems and any runtime packages needed after compilation.
  3. Install the source-control client. Verify that the deployment user can authenticate to the repository without an interactive prompt.
  4. Create the application parent directory. Ensure the deployment account can create and modify the eventual releases, shared, and current paths.
  5. Prepare the process and web layers. Configure the application server, reverse proxy, background workers, and service manager independently. Capistrano can run restart tasks, but it does not supply these components.
  6. Test the exact SSH session. From the machine where Capistrano will run, execute ssh deploy@your-vps.example and confirm that the shell starts, the repository is reachable, and commands do not require a terminal.

Use your real hostname or IP in configuration. The examples below use illustrative names and paths; replace them with values for your VPS.

Install Capistrano in the application

Add Capistrano to the development bundle so every operator and CI job uses the locked version:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
group :development do
  gem "capistrano", require: false
end

Run Bundler, then generate the standard file layout:

bundle install
bundle exec cap install

Initialization creates a Capfile, a shared configuration file at config/deploy.rb, and stage files such as config/deploy/production.rb and config/deploy/staging.rb. Treat these as templates. The generated host, repository, user, and path values are not production-ready until you replace them.

Configure the common deployment settings

Put values shared by every stage in config/deploy.rb. A minimal configuration looks like this:

set :application, "my_app"
set :repo_url, "git@example.com:organization/my_app.git"
set :branch, ENV.fetch("BRANCH", "main")
set :deploy_to, "/var/www/my_app"

append :linked_dirs,
       "log",
       "tmp/pids",
       "tmp/cache",
       "tmp/sockets",
       "vendor/bundle"

append :linked_files,
       "config/database.yml",
       "config/secrets.yml"

Choose the repository and branch policy

:repo_url must be reachable by the deployment account using the configured SCM credentials. Decide whether production always follows a protected branch, a release branch, or a branch supplied through BRANCH. Do not let an accidental local branch determine a production deployment.

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

Choose the deployment root

:deploy_to is the parent of the release hierarchy. It should be outside the repository checkout and writable by the deployment user. Keep one application per root so releases, logs, uploads, and secrets cannot be mixed accidentally.

Declare persistent directories and files

Use append :linked_dirs for state that must survive a new checkout, such as logs, process IDs, sockets, caches, uploaded files, or a shared Bundler directory. Use append :linked_files for configuration containing secrets or machine-specific settings. Capistrano creates symlinks from shared into each new release; create and populate required files in shared before the application boots.

Only link data that truly must persist. A cache can be shared when the application tolerates stale entries; generated build output usually belongs in the release instead. Never place credentials in the repository merely because a linked file is declared.

Configure the production stage

Keep host-specific settings in config/deploy/production.rb:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
server "203.0.113.10",
       user: "deploy",
       roles: %w[app db web]

set :rails_env, "production"

Use the VPS hostname or IP, the dedicated deployment user, and only the roles required by your tasks. A single-server application can use one server with several roles. A split architecture can assign roles to different hosts in the same stage file. Keep staging in its own stage file so it cannot silently deploy to production.

If SSH requires a non-default key, port, jump host, or agent forwarding, configure those options explicitly and test them outside Capistrano first. Avoid forwarding private keys unless your workflow requires it and you understand the trust implications.

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.

Load the integrations your application needs

The Capfile loads Capistrano’s core tasks and optional integrations. A Rails application commonly uses:

require "capistrano/setup"
require "capistrano/deploy"
require "capistrano/scm/git"
require "capistrano/bundler"
require "capistrano/rails"
require "capistrano/rails/assets"
require "capistrano/rails/migrations"

Use capistrano/rails when you want the Rails integration as a whole. If you need only asset compilation or database migrations, load those integrations individually. The Bundler integration installs the bundle during deployment; link .bundle when your project relies on shared Bundler configuration.

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

Rails’ integration supplies tasks including cap deploy:migrate and cap deploy:compile_assets. Confirm that migrations are safe to run before the new release is made live; backward-compatible database changes are essential when old and new application processes overlap.

Understand the release hierarchy

Path Purpose What happens during deployment
releases/ Timestamped application checkouts A new release is created, tasks run there, and old releases are eventually pruned.
shared/ Persistent files and directories Linked paths are stored here and symlinked into every release.
current Active-release symlink It points to the newest successfully published release.

Place production secrets, database configuration, uploaded assets, and other persistent state under shared only when they are listed as linked paths. A file left in one release disappears from the next checkout. Conversely, linking an entire application directory can hide files that should have come from source control, so keep links narrowly scoped.

Run a first deployment safely

  1. Create required shared paths. Before the first boot, create directories such as shared/config, shared/log, and upload locations as needed. Put required linked files in their exact shared locations with restrictive permissions.
  2. Inspect prerequisites. Run bundle exec cap production deploy --prereqs to inspect task dependencies when diagnosing a new configuration.
  3. Perform a dry run. Run bundle exec cap production deploy --dry-run. Review the task sequence and rendered commands. A dry run does not replace testing SSH access, repository credentials, file permissions, or application startup.
  4. Deploy the release. Run bundle exec cap production deploy. Capistrano checks prerequisites, creates the release, installs dependencies, runs configured migrations or assets tasks, links shared paths, publishes current, and cleans old releases.
  5. Verify the service. Check the application endpoint, process-manager status, logs, database connectivity, background jobs, uploaded-file access, and asset delivery. Watch the service after publication rather than assuming a successful SSH task means the application is healthy.

Use --trace with any command when you need the full Rake backtrace:

bundle exec cap production deploy --trace

Control release retention and application restarts

Keep enough releases to recover from a bad deployment, but remove obsolete checkouts so disk usage does not grow without limit. The cleanup task runs as part of the normal deployment flow; choose a retention count appropriate for release frequency, disk capacity, and recovery needs.

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.

Capistrano does not know how your application server should restart unless you configure that task. A restart must happen after code, assets, or dependencies change, and it must be coordinated with long-running workers. Place restart commands in a custom task or use the integration appropriate to your process manager. Ensure the deployment account can invoke that operation without an interactive privilege prompt.

Rails-specific persistent paths

Common Rails candidates include the following, but link only paths your application actually uses:

  • log for application logs.
  • tmp/pids for process ID files.
  • tmp/cache for a cache that should survive releases.
  • tmp/sockets for Unix sockets used by an application server.
  • vendor/bundle or .bundle when dependencies or Bundler settings are shared on the VPS.
  • Upload directories for user-generated files that are stored locally rather than in object storage.
  • config/database.yml and config/secrets.yml when that is the project’s secret-management design.

Modern Rails applications may use environment variables or an external secret manager instead of these files. In that case, do not create obsolete linked files just because they appear in an example. The deployment must provide every value required at boot through the mechanism your application expects.

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

Roll back an unusable release

If the newly published release fails health checks, use Capistrano’s rollback task:

bundle exec cap production deploy:rollback

Rollback changes current back to a prior release in the release directory. It does not repair a broken VPS, restore a deleted shared secret, reverse an incompatible database migration, or fix a service-manager configuration. After rolling back, inspect logs and the failed release, then address the cause before attempting another deployment.

Database changes need special planning. A code rollback is safe only when the database schema remains compatible with the older code. Prefer additive, backward-compatible migrations and a separately tested reversal plan for destructive changes.

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.

Troubleshoot common failures

SSH authentication or permission errors

Test the same user, key, port, and hostname with plain SSH. Check authorized_keys permissions, repository credentials, ownership of :deploy_to, and whether the command is waiting for a password. Fix the server-side problem before rerunning Capistrano.

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

The repository cannot be fetched

Verify that the deployment user—not your interactive account—can access the repository and that the SCM binary is installed on the VPS. A repository URL that works locally can fail remotely because it references a local SSH agent, filesystem path, or unavailable credential.

A linked file is missing

Confirm that the file exists under the exact shared path and that its parent directory exists. Check the resulting symlink inside current. A typo in linked_files or an omitted secret commonly causes the release to fail during boot.

Assets or gems fail during deployment

Compare the VPS runtime, native libraries, Node or asset-toolchain requirements, and Bundler lockfile with the development environment. Run the failing task with --trace, then correct the missing dependency or version mismatch on the server.

The deploy succeeds but the site still serves old code

Check where the web server and application process obtain their working directory. Confirm that current points to the new release, restart processes that preload application code, and inspect reverse-proxy or cache behavior. A successful symlink switch does not automatically restart every process.

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.

Disk space is exhausted

Inspect releases, logs, caches, and uploaded files. Reduce release retention only after confirming that your rollback policy still has enough recovery points, and move large user uploads to storage designed for that workload when appropriate.

Use staging and production as separate stages

Keep a config/deploy/staging.rb file with a different host, deployment root, branch policy, and environment settings. Deploy the same command pattern with bundle exec cap staging deploy before production. This tests tasks, shared-path creation, migrations, asset compilation, and restart behavior on a server that does not carry production traffic.

Do not rely on stage names alone for safety. Protect production credentials, restrict who can run the production command, and require an explicit review of the stage file whenever host or branch settings change.

Operational and security practices

  • Commit the Gemfile.lock so operators use the same Capistrano and plugin versions.
  • Review every custom task for shell quoting, privilege escalation, destructive commands, and assumptions about the current directory.
  • Keep secrets out of Git, deployment logs, and command-line arguments where they can be recorded.
  • Use least-privilege SSH and service-management permissions for the deployment account.
  • Monitor disk usage, release cleanup, process health, error rates, and background-job queues.
  • Test a rollback on staging, including the application server restart and database compatibility steps.
  • Document how to recreate shared files and directories; a rollback cannot recover a secret that was never backed up.

Capistrano is most effective when the manual SSH procedure is already understood and deterministic. Automate stable, observable steps; keep provisioning, secret storage, backups, and incident response as explicit operational systems rather than hiding them inside an opaque deploy task.

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

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.