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

Deploying with Kamal means running the deployment command on your laptop or CI runner, not on the VPS. Kamal connects to the server over SSH, builds your application image, pushes it to a container registry, starts the new container, waits for GET /up to return 200 OK, and asks kamal-proxy to move traffic from the old container to the new one.

The practical sequence is: install Kamal locally, add a Dockerfile and config/deploy.yml, point DNS at the VPS, store credentials in .kamal/secrets, run kamal setup once, then use kamal deploy for subsequent releases. With ssl: true, kamal-proxy can obtain a Let’s Encrypt certificate on a single host, provided public DNS and port 443 are ready.

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

What Kamal changes about VPS deployment

Kamal is a command-line deployment tool for containerized web applications. Your computer (or a CI runner) is the control plane. The VPS supplies Docker and runs the application containers, while Kamal performs the remote work through SSH. You do not normally install Kamal on the VPS.

Each release is built from the checked-out source revision. Kamal pushes the resulting image to a registry, pulls it on the server, starts a new container, and uses kamal-proxy as the traffic switch. The proxy keeps the old container serving requests until the new one passes its health check. This avoids the brief outage caused by stopping the old process before the replacement is ready.

#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:Upgraded 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.
  • Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.

Read the current command and configuration reference at kamal-deploy.org before production use. Kamal and kamal-proxy defaults can change between releases.

Prerequisites and a preflight checklist

Deployment machine

  • A laptop, build host, or CI runner with Ruby and SSH available.
  • Kamal installed with gem install kamal. Confirm the installation with kamal version.
  • A checked-out application repository containing a working Dockerfile.
  • SSH key authentication to the VPS. Use a dedicated non-root deployment user where possible, with the permissions needed to run Docker and manage the application.

One third-party setup guide lists Ruby 2.7 or newer for the deployment machine. Treat that as a guide-specific requirement and verify the Ruby version supported by the Kamal release you install.

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

VPS and network

  • A publicly reachable VPS with a supported Linux distribution and Docker installed, or an account that allows Kamal to install Docker during setup.
  • An SSH-reachable public IPv4 address. Open TCP port 22 for administration, TCP port 80 for HTTP, and TCP port 443 for HTTPS.
  • Enough disk space for the current image and at least one previous image during a rolling replacement. Kamal prunes old images as part of setup and deployment, but it cannot compensate for an undersized disk.
  • A DNS A record such as app.example.com pointing to the VPS public IPv4 address. Add an AAAA record only when IPv6 is correctly configured and reachable.
  • A container registry that the deployment machine and VPS can authenticate to. Public or private registries work; credentials belong in secrets, not in the repository.

Application requirements

  • The application must listen on the container interface, not only on 127.0.0.1. Bind to 0.0.0.0 on the port exposed by the image.
  • Provide a lightweight health endpoint at /up that returns HTTP 200 when the process is ready to receive traffic. If your framework uses another endpoint, configure the proxy to use that path and test it directly.
  • Make startup deterministic. Database migrations, asset compilation, and other release tasks should either run during image build or be an explicit, repeatable deployment step.

How the pieces fit together

Piece Where it runs Purpose
Kamal CLI Your laptop or CI runner Builds, authenticates, connects over SSH, and orchestrates the release.
Container registry Registry service Stores the image that the VPS pulls.
Docker VPS Runs the application and proxy containers.
kamal-proxy VPS Listens on ports 80 and 443, performs health checks, terminates TLS when enabled, and routes requests to the active container.
Application container VPS Serves your web application on the configured internal port.

For a normal release, Kamal starts the new container beside the old one. kamal-proxy checks the configured health path, then switches requests when the new container is healthy. After the switch, the old container is stopped and unused images are pruned according to Kamal’s deployment behavior.

Step 1: make the application container-ready

Create and test a Dockerfile

The Dockerfile must produce a self-contained production image. Install dependencies, copy the application, build static assets if needed, expose the listening port, and define a command that stays in the foreground. Test the exact image locally before involving the VPS:

docker build -t example-app:local .
docker run --rm -p 3000:3000 example-app:local

Replace the port and start command with those used by your framework. From another terminal, verify the health route:

curl -i http://127.0.0.1:3000/up

Do not proceed until the response is HTTP 200 and the process remains healthy after the container starts with production settings.

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.
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 internal application port

Kamal’s proxy uses port 80 as the application-port default when no value is set. Explicitly declaring your real port is safer, especially when the image listens on 3000, 8000, or another framework-specific port. The proxy connects to that internal container port; users still reach the VPS through ports 80 and 443.

Step 2: install Kamal and create its files

  1. Install Kamal on the deployment machine: gem install kamal.
  2. Check that the executable is available: kamal version.
  3. From the application repository, scaffold the deployment files: kamal init.
  4. Review the generated config/deploy.yml and .kamal/secrets. Add .kamal/secrets to version-control ignores if the scaffold has not already done so.

The command creates the configuration and a secrets file; it does not make an application reachable by itself. You still need to set the server address, image name, registry credentials, DNS, and application settings.

Step 3: configure config/deploy.yml

The following is a minimal single-VPS shape. Replace every example value with your own service name, registry namespace, hostname, address, and port.

service: example-app
image: registry.example.com/team/example-app

servers:
  web:
    - 203.0.113.10

proxy:
  host: app.example.com
  app_port: 3000
  ssl: true

registry:
  server: registry.example.com
  username: deploy-user
  password:
    - KAMAL_REGISTRY_PASSWORD

env:
  clear:
    APP_ENV: production
  secret:
    - SECRET_KEY_BASE
    - DATABASE_URL

Service and image

service is the deployment’s logical name. image is the complete registry path Kamal builds and pushes. Keep the name stable between releases so the server can identify the current service and its previous image.

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.

Servers and roles

The web role lists the VPS address that will run the web container. If you later define separate roles for workers or scheduled jobs, deploy only the role you intend to change with the --roles flag. The --hosts flag is useful when narrowing a command to particular machines during maintenance.

Proxy settings

proxy.host is the public hostname used for routing and certificate issuance. app_port must match the port on which the container listens. Set ssl: true only after the hostname resolves publicly to this server and port 443 is reachable.

Rank #3
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black
  • 【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.

kamal-proxy checks GET /up by default. Its documented response-timeout default is 30 seconds. When SSL is enabled, HTTP-to-HTTPS redirection is on by default. Forwarded headers are off by default in that mode unless you enable them explicitly, so applications that need the original protocol or client address must be configured accordingly. Path prefixes are stripped by default; set strip_path_prefix: false when your application must receive the original prefix.

Registry and environment values

Put the registry server and username in the deploy file, but reference the password by a secret name. Values under env.clear are ordinary configuration that can appear in deployment metadata; values under env.secret are read from .kamal/secrets and passed securely to the deployment. Never commit registry passwords, database URLs, signing keys, or encryption keys.

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

Step 4: populate .kamal/secrets

Use one NAME=value entry per secret. The names must match the references in deploy.yml. A typical file might contain:

KAMAL_REGISTRY_PASSWORD=replace-with-registry-token
SECRET_KEY_BASE=replace-with-application-secret
DATABASE_URL=replace-with-production-database-url

Protect the file with restrictive permissions and supply equivalent values through your CI secret store when deployments run automatically. If a secret changes, push the environment explicitly with kamal env push and then redeploy if the running process must be restarted with the new value.

Step 5: verify DNS, SSH, and firewall access

  1. Resolve the hostname from a public network and confirm that its A record returns the VPS IPv4 address. Do not rely only on a local hosts-file override.
  2. Test SSH using the same user and key Kamal will use: ssh deploy-user@203.0.113.10.
  3. Confirm that the deployment user can run Docker, either directly or through the host’s configured privilege mechanism.
  4. Open ports 80 and 443 in both the VPS firewall and any cloud security group. Keep port 22 restricted to trusted source addresses when practical.
  5. Check that no other web server is already binding ports 80 or 443. kamal-proxy needs those ports on the host.

Public DNS is required before automatic HTTPS can work. Certificate validation cannot complete against a hostname that still points to an old server, a private address, or nowhere.

Step 6: run the first bootstrap with kamal setup

Run this from the repository root, using the configuration and secrets you just prepared:

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.
kamal setup

The first-time bootstrap performs the following sequence:

  1. Connects to the configured VPS over SSH.
  2. Installs Docker when the host does not already have it.
  3. Logs in to the configured container registry.
  4. Builds the checked-out application image and pushes it.
  5. Pulls the image onto the VPS.
  6. Starts kamal-proxy and the application container.
  7. Waits for GET /up to return 200 OK.
  8. Switches traffic to the healthy container.
  9. Stops the old container, when one exists, and prunes unused images.

Watch the command output for the first failing stage. A registry error is different from a health-check failure, and fixing the wrong layer can hide the actual problem.

Step 7: enable HTTPS with kamal-proxy

With a single host, proxy.ssl: true tells kamal-proxy to obtain a certificate from Let’s Encrypt and terminate TLS on port 443. The certificate challenge requires the public hostname to resolve to the VPS and inbound port 443 to be open. Port 80 should also be available so the proxy can serve HTTP and redirect visitors to HTTPS.

After setup, test both the certificate and application routing:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -I http://app.example.com
curl -I https://app.example.com
curl -i https://app.example.com/up

If your application needs custom certificates rather than automatic issuance, kamal-proxy can load certificate and private-key material from secrets using its certificate and private-key settings. Treat private keys like any other production secret.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Step 8: deploy normal releases

Commit the Dockerfile, application changes, and deployment configuration, check out the exact revision you intend to release, and run:

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.
kamal deploy

Kamal builds that checked-out version, pushes the image, starts a replacement container, waits for the health check, and asks kamal-proxy to move traffic without taking the service offline. The command supports useful scoping and configuration flags:

  • --skip-push skips the image push when the required image is already available to the server.
  • --roles limits the operation to selected roles.
  • --hosts limits the operation to selected hosts.
  • --destination selects a deployment destination when your configuration defines one.
  • --config-file selects another configuration file; the default is config/deploy.yml.

Use kamal redeploy when the servers are already bootstrapped and you need to redeploy without repeating server bootstrap, proxy startup, image pruning, or registry-login steps.

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

Recovery when setup or deployment fails

Setup stopped partway through

Read the last completed operation before retrying. If a proxy or accessory was created but is unhealthy, reboot that component and then run a deployment:

kamal proxy reboot
kamal accessory reboot
kamal deploy

Run only the reboot command that applies to the component named in the error. A reboot does not fix an incorrect image, missing secret, blocked port, or application crash.

The health check never returns 200

  • Confirm the process is listening on 0.0.0.0, not only localhost.
  • Verify proxy.app_port matches the container’s listening port.
  • Request the endpoint from inside the container and inspect application logs.
  • Ensure /up does not require authentication, a browser cookie, or a database operation that is unavailable during startup.
  • If the real endpoint differs, change the proxy health-check path in the configuration and test that path directly.

HTTPS does not issue a certificate

  • Check that the A record has propagated to this VPS.
  • Remove or correct an AAAA record that points to an unconfigured IPv6 address.
  • Open TCP 443 in every firewall layer.
  • Make sure another service is not occupying ports 80 or 443.
  • Temporarily validate plain HTTP routing so you can separate DNS or challenge failures from application failures.

The registry login or pull fails

Recheck the registry hostname, username, token scope, and the exact secret name referenced by deploy.yml. The VPS must be able to reach the registry, and a private image requires a successful login on the server even when the build and push worked locally.

Operational practices for a reliable VPS deployment

Keep releases reproducible

Build from committed revisions, pin operating-system and language dependencies where practical, and avoid “latest” image tags in application configuration. A reproducible image makes a failed release diagnosable and allows you to redeploy the previous commit.

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

Separate web traffic from background work

Do not put a long-running worker in the web process unless that is intentional. Define separate roles or accessories for workers, schedulers, and supporting services, and deploy them deliberately rather than restarting everything for every web change.

Plan database changes for overlap

Because the old and new containers can coexist during a release, schema changes should be backward-compatible with both application versions. Add columns before using them, deploy code that tolerates the old schema, and remove obsolete fields only after the old code is gone.

Observe before declaring success

A green health check proves that the endpoint returned 200; it does not prove that every user flow works. After each release, inspect application and proxy logs, exercise a representative authenticated request, verify background jobs, and watch error rates before pruning your rollback option.

Useful command reference

Command When to use it Important behavior
gem install kamal Install or update the CLI locally Run on the deployment machine, not the VPS.
kamal version Confirm the installed CLI Useful when comparing behavior across machines.
kamal init Create deployment scaffolding Generates config/deploy.yml and .kamal/secrets.
kamal setup First deployment to a host Bootstraps Docker, registry access, kamal-proxy, and the initial container.
kamal deploy Routine release Builds, pushes, starts, health-checks, and switches traffic.
kamal redeploy Redeploy an already prepared host Skips bootstrap, proxy startup, pruning, and registry login.
kamal env push Update deployed environment values Pushes environment data to the server; restart or redeploy processes that must read new values.
kamal proxy reboot Recover a failed proxy component Use after inspecting the failure, then deploy again.

Final pre-release checklist

  • The Docker image starts locally and serves /up with HTTP 200.
  • The deployment machine has the intended Kamal version and SSH key.
  • The VPS user can run Docker and has adequate disk space.
  • The registry credentials are valid and stored outside version control.
  • The hostname’s A record points to the VPS; IPv6 records are correct or absent.
  • Ports 22, 80, and 443 are allowed as required.
  • app_port matches the application’s listening port.
  • Secrets in .kamal/secrets match the names in deploy.yml.
  • You have tested HTTP and HTTPS routing before announcing the release.

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.

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