Free tools Windows power users keep installed
One-click scans. No signup required.
The reliable way to run Rails on an Ubuntu VPS is to install the Ruby version declared by the application, install its locked gems with Bundler, prepare PostgreSQL, compile assets, and run Rails behind a process manager and reverse proxy. For a conventional deployment, that means Puma managed by systemd with Nginx terminating public HTTP and HTTPS. Rails also documents Kamal, a Docker-based deployment path, as an alternative.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
This guide assumes a fresh Ubuntu LTS server, SSH access, a domain name or test IP, and a Rails application stored in version control. Package names, Ruby releases, Rails tasks, and JavaScript or database services must be adjusted to the application’s Gemfile, lockfile, and Ubuntu LTS release.
As an Amazon Associate I earn from qualifying purchases.
Recommended Free Tools
Choose the deployment shape before installing anything
There are three sensible ways to put Rails on a VPS. The first is a conventional host deployment: Ruby and the application run directly on Ubuntu, Puma serves Rails, systemd keeps Puma running, and Nginx accepts Internet traffic. The second is Kamal, Rails’ documented container deployment tool, which builds an image and runs the application with Docker on the server. The third is a provider image that preinstalls a tested combination of Ubuntu, Ruby, Rails, PostgreSQL, Nginx, Docker, TLS tooling, and systemd.
| Option | Runtime and upgrades | Operational trade-off | Best fit |
|---|---|---|---|
| Puma, systemd, and Nginx on the host | Ruby and gems are installed directly on Ubuntu. Upgrades are explicit package, Ruby, and application changes. | Lowest container overhead and straightforward access to host services, but you must manage dependencies, service units, and rollbacks. | A single application or a team comfortable administering Linux services. |
| Kamal with Docker | The application and its runtime are shipped as an image. Deployments replace containers rather than modifying the host Ruby installation. | More reproducible releases and a defined rollback model, with Docker, registry, image, and proxy configuration to operate. | Teams that want containerized releases without building a full orchestration platform. |
| One-click Rails image | The provider supplies a preconfigured baseline; the catalog’s versions and scripts can change. | Fastest initial setup, but less control over defaults and a provider-specific upgrade path. | A first server where convenience matters more than a bespoke build. |
Rails’ Getting Started guide lists an Ubuntu LTS server with at least 1 GB of RAM for its Kamal example. That is a documented minimum for that deployment path, not a capacity guarantee for your workload. No authoritative performance or traffic figure establishes how many users any particular VPS can serve; measure your application after deployment.
#1 Best Overall
- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
Prepare and secure the Ubuntu VPS
Update the operating system first
Canonical’s server documentation targets the latest Ubuntu LTS and treats package management, users, firewalls, authentication, databases, web servers, and containers as normal administration tasks. Start with updates before adding application software:
sudo apt update
sudo apt full-upgrade -y
sudo reboot
Reconnect after the reboot and confirm the release with lsb_release -a. Keep the LTS release’s repositories enabled unless your application explicitly requires another source. Avoid copying a package list written for a different Ubuntu release without checking package names and supported versions.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteCreate a non-root deployment account
Use root only for operating-system administration. Create a dedicated account for the Rails files and service:
sudo adduser --disabled-password --gecos '' deploy
sudo usermod -aG sudo deploy
sudo install -d -m 700 -o deploy -g deploy /home/deploy/.ssh
Install your public SSH key in /home/deploy/.ssh/authorized_keys, set ownership to deploy:deploy, and set mode 600. Test a second SSH session as deploy before changing the server’s SSH policy. Only after key login works should you consider disabling password authentication or root login in the SSH daemon configuration; keep an existing administrative session open while testing.
Limit exposed ports
Permit SSH and the web ports you actually use. The following UFW example allows OpenSSH, HTTP, and HTTPS, then enables the firewall:
sudo apt install ufw -y
sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable
sudo ufw status verbose
Do not open PostgreSQL, Redis, or Puma’s internal port to the Internet unless a specific architecture requires it and you have separately restricted the source addresses. A cloud provider’s network firewall, if present, should enforce the same policy.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Match Ruby to the application
Read the project’s declared version
Inspect the repository’s .ruby-version, the ruby requirement in its Gemfile, and the lockfile before installing Ruby. Rails and gems can require a particular Ruby range; installing the newest interpreter simply because it is available can create incompatibilities.
Use Ubuntu’s package when the distribution version is acceptable
The Ruby project’s installation documentation gives this apt example:
Rank #2
- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
sudo apt-get install ruby-full
The same documentation warns that major package managers can install an older Ruby than the latest release. That is acceptable when the application supports Ubuntu’s packaged version and you value the distribution’s update process. Check the result with ruby --version and compare it with the project’s requirement.
Use a version manager for a pinned runtime
If the project pins Ruby, install a maintained version manager and its build dependencies, then install the exact value recorded by the project. With rbenv and ruby-build, the workflow is conceptually:
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →sudo apt install build-essential git libssl-dev zlib1g-dev libreadline-dev libyaml-dev libffi-dev -y
rbenv install "$(cat .ruby-version)"
rbenv local "$(cat .ruby-version)"
ruby --version
The exact prerequisite packages and available Ruby definitions depend on the Ubuntu LTS release and the ruby-build version. If the project uses another manager, follow that manager’s supported installation method instead. Confirm that the ruby, gem, and bundle commands resolve to the selected runtime for the deployment account.
Install application and native dependencies
Install only the services the app needs
Most Rails applications need Git, a compiler toolchain for native gems, and database client development libraries. Add JavaScript tooling, image libraries, Redis, a job backend, or other services only when the Gemfile and application configuration require them. There is no universal package list for Rails.
sudo apt update
sudo apt install git build-essential pkg-config -y
Install PostgreSQL client or server packages according to whether the database is on this VPS. Gems such as database adapters and image processors may need additional development headers. If Bundler reports a missing header or library, install the Ubuntu development package named in that error, then rerun the bundle.
Clone the existing application
For an existing project, clone the repository as the deployment user into a deliberate path such as /srv/myapp. For a new project, create it locally or on the server only when you are intentionally starting from scratch; do not overwrite an existing application with a new Rails skeleton.
sudo install -d -o deploy -g deploy /srv/myapp
sudo -u deploy git clone YOUR_REPOSITORY_URL /srv/myapp
cd /srv/myapp
Replace the repository value with your actual Git remote. Keep releases and shared configuration in a layout your deployment process understands, and never put production secrets in the repository.
Install the locked gems
Use the Bundler version recorded by the project’s lockfile when one is specified. Then install into the environment used by the service:
Rank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
cd /srv/myapp
bundle install
In production, teams commonly exclude development and test groups through Bundler configuration, but the correct groups depend on build tasks and the Rails version. Run the project’s documented setup or deployment script if it performs additional JavaScript or asset installation.
Set up PostgreSQL and the production database
Create a least-privilege role and database
If PostgreSQL runs on the VPS, create a role dedicated to the application rather than using the PostgreSQL superuser. The names below are examples; use names that match your application:
sudo -u postgres createuser --pwprompt rails_app
sudo -u postgres createdb -O rails_app rails_production
Do not grant ownership or superuser privileges beyond what the application needs. If the database is managed elsewhere, create the equivalent role and database with that provider and allow the VPS address through the provider’s network controls.
Provide connection settings outside the repository
Configure DATABASE_URL or the production entries in config/database.yml through a protected environment file or secret manager. Restrict that file to the deployment account and the service that needs it. A connection URL normally contains a password, so do not paste it into shell history, issue trackers, or committed configuration.
Prepare the schema
Rails documents database connections and migrations, and its db:prepare task can create a database and run migrations where the application and Rails version support that behavior:
cd /srv/myapp
RAILS_ENV=production bundle exec rails db:prepare
Inspect the application’s deployment scripts before relying on this as a one-step migration. Some projects require a separate database creation, migration, seed, or data-backfill task. Run migrations before routing public traffic, and take a verified backup before a migration that changes or removes data.
Configure secrets and compile assets
Set production credentials safely
Set RAILS_ENV=production, provide SECRET_KEY_BASE, and provide the Rails master key or other credential required by the application. Store values in a secret manager or a root-readable, service-readable environment file; never commit config/master.key, registry tokens, database passwords, or API keys.
Make the secret source available to both one-off release commands and the long-running Puma service. A frequent failure is running migrations with one environment and starting Puma with another, producing apparently missing credentials or tables.
Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
Precompile assets using the project’s supported task
Run the asset task documented by the project’s Rails version after installing the required JavaScript packages:
cd /srv/myapp
RAILS_ENV=production bundle exec rails assets:precompile
Some applications use a different asset pipeline or a separate build command. Follow the repository’s scripts when they differ. Confirm that generated files land in the directory Nginx will serve, usually the application’s public directory, and that the deployment user can read them.
Run Rails with Puma and systemd
Use an internal bind address
A representative topology is:
Internet :443 or :80 → Nginx → Puma/Rails → PostgreSQL
Puma should listen on localhost or a Unix socket, not on a publicly reachable interface. The port, socket path, worker count, and thread count must be chosen from the application’s Puma configuration and the VPS resources. More workers are not automatically faster; they consume memory and can overwhelm the database.
Create a dedicated systemd unit
Place an environment file outside the repository, for example /etc/myapp/myapp.env, and restrict its permissions. Then create a unit such as /etc/systemd/system/myapp.service, changing paths and the Bundler executable to match the server:
[Unit]
Description=My Rails application
After=network.target postgresql.service
[Service]
Type=simple
User=deploy
Group=deploy
WorkingDirectory=/srv/myapp
EnvironmentFile=/etc/myapp/myapp.env
ExecStart=/usr/local/bin/bundle exec puma -C config/puma.rb
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
Find the correct executable with sudo -u deploy which bundle. If Ruby is installed through a per-user version manager, systemd may not load the interactive shell’s PATH; use the manager’s absolute Ruby and Bundler paths or a carefully maintained wrapper script. Reload and start the service:
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →sudo systemctl daemon-reload
sudo systemctl enable --now myapp.service
sudo systemctl status myapp.service
sudo journalctl -u myapp.service -e
Journal output should show Puma starting without credential, database, or asset errors. Keep logs available through journald or your chosen centralized logging system, and define retention so an unhealthy application cannot fill the disk.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Configure Nginx as the public reverse proxy
Proxy dynamic requests and serve static files
Install Nginx and create a server block for the application’s domain. This example assumes Puma listens on localhost port 3000:
sudo apt install nginx -y
server {
listen 80;
server_name example.com;
root /srv/myapp/public;
location /assets/ {
try_files $uri =404;
}
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Rails’ reverse-proxy guidance uses Nginx or Apache in front of the application server and forwards the host and client-IP headers. If Puma uses a Unix socket, use the socket’s Nginx-compatible upstream syntax instead of the localhost port. Test the configuration before reloading:
Best Value
sudo nginx -t
sudo systemctl reload nginx
Point the domain’s DNS record to the VPS address. Test locally with curl against the internal Puma endpoint and externally with the domain. A 502 response usually means Nginx cannot connect to Puma; check the service status, bind address, port or socket path, and filesystem permissions.
Enable HTTPS and renewal
Obtain a certificate with the ACME client or certificate provider selected by the operator after DNS resolves correctly. Configure Nginx to listen on 443, redirect plain HTTP to HTTPS, and preserve the forwarded protocol header. Verify renewal as a scheduled operation rather than assuming the first certificate issuance solved it. Check that the certificate covers every hostname the application serves and that inbound port 443 is allowed by both UFW and the provider firewall.
Alternative: deploy with Kamal and Docker
Rails’ current Getting Started guide states that Rails comes with Kamal, a deployment tool that can deploy an application directly to a server. Its documented workflow uses Docker, a production-ready Dockerfile, an Ubuntu LTS host with at least 1 GB of RAM, a container registry account, and a configured proxy. This path avoids maintaining a host-level Ruby installation for the application, but it still requires careful secrets, database, storage, and backup planning.
Prepare the image and registry settings
Review the generated production Dockerfile and ensure it installs the Ruby version and native libraries required by the application. Configure the image name, server address, SSH user, registry namespace, and registry credential in Kamal’s deployment configuration. Export registry credentials only through a protected environment mechanism; do not commit them.
Run setup and deploy
After DNS, SSH access, Docker availability, registry authentication, and the production database settings are ready, the documented command sequence is:
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchbin/kamal setup
bin/kamal deploy
Adapt the configuration before running these commands. Do not copy an example image name or server address unchanged. If the proxy section is configured with a domain, use the guide’s SSL option so the proxy can obtain and serve HTTPS. Confirm how the application handles persistent uploads, compiled assets, background jobs, and database migrations inside the container workflow; a container replacement must not delete user data.
Decide when Kamal is preferable
- Choose Kamal when reproducible image builds, isolated dependencies, and a consistent deployment or rollback command are more valuable than minimizing moving parts.
- Choose the host-based Puma stack when the team already operates systemd and Nginx, needs the smallest practical runtime footprint, or wants direct access to host services.
- Do not choose containers as a substitute for backups, monitoring, secret management, or migration discipline; Kamal changes the packaging and release workflow, not those responsibilities.
One-click Ubuntu Rails images
A preconfigured image can shorten the first installation. One documented provider image lists Ubuntu 24.04, Ruby 3.4.7, Rails 8.1.1, PostgreSQL 15, Nginx, Docker, SSL/TLS setup, and systemd integration. Those are catalog facts for that image and can change; verify the current listing, supported upgrade path, and included security updates before relying on it.
After launching such an image, still inspect the Ruby and Rails versions, rotate any default credentials, apply Ubuntu updates, review firewall rules, confirm which services are enabled, and read the image’s documentation before deploying production data. A one-click image is a starting configuration, not proof that your application’s Gemfile, native gems, background jobs, or storage requirements are satisfied.
Verify the deployment before declaring it production-ready
Test the request path
- On the server, check that
systemctl is-active myapp.servicereports an active service and thatjournalctl -u myapp.servicecontains no boot errors. - Request a health endpoint or a harmless Rails page through Nginx on localhost and confirm a successful response.
- From another network, open the HTTPS domain and verify the certificate, redirects, static assets, cookies, and login flow.
- Reboot the VPS during a maintenance window and confirm that PostgreSQL, the Rails service, and Nginx return automatically in the intended order.
Check application-specific dependencies
- Run or inspect the production migration process and verify the schema version.
- Exercise background jobs, scheduled tasks, mail delivery, and webhook callbacks if the application uses them.
- Upload and retrieve a file, confirming that persistent storage survives a release or container replacement.
- Confirm log rotation, disk-space alerts, and error reporting.
- Perform a database backup and restore it into a separate environment; a backup that has never been restored is not a verified recovery plan.
- Test certificate renewal and record who receives expiry alerts.
Troubleshoot the failures that appear most often
| Symptom | Likely cause | Checks and correction |
|---|---|---|
bundle install fails while compiling a gem |
Missing compiler, development header, or library version. | Read the first missing-header message, install the matching Ubuntu development package, verify the selected Ruby, and rerun Bundler. |
| Puma exits immediately under systemd | Wrong executable path, working directory, environment file, Ruby version, or secret. | Run the exact command as the service user, inspect journalctl -u myapp.service, and use absolute paths that systemd can resolve. |
| Nginx returns 502 Bad Gateway | Puma is stopped, listening on another port or socket, or inaccessible to Nginx. | Check systemctl status, confirm the bind setting, test the upstream locally, and inspect Nginx’s error log. |
| Assets return 404 or the page is unstyled | Precompilation used the wrong environment or Nginx’s root does not match the application’s public directory. | Run the project-supported production asset task, verify generated files and permissions, and test the Nginx root and asset location. |
| Rails cannot connect to PostgreSQL | Incorrect URL, role password, database name, host policy, or service state. | Check PostgreSQL status, test the credentials with a database client, compare the service’s environment file with the migration environment, and review local access rules. |
| Changes work in a shell but not after a reboot | Interactive shell initialization supplied Ruby or environment variables that systemd does not load. | Use a systemd-readable environment file and absolute Ruby, Bundler, and Puma paths; then reload the unit and restart it. |
| HTTPS works intermittently or renewal fails | DNS, port 80 or 443 firewall rules, an incomplete Nginx configuration, or an ACME challenge blocked by redirects. | Check DNS from outside the VPS, allow the challenge path, run the certificate client’s renewal test, and inspect its logs. |
Ongoing operations
Deployment is not finished when the first page loads. Schedule Ubuntu security updates, review Ruby and gem advisories, and plan Rails upgrades around the project’s compatibility requirements. Keep a tested rollback for both application releases and database changes. Monitor CPU, memory, disk, database connections, request latency, error rates, failed jobs, and certificate expiry. Restrict SSH access, rotate credentials, and remove unused services and firewall rules.
For a host-based stack, document the systemd unit, environment-file location, Nginx configuration, Puma bind address, release directory, migration command, and backup job. For Kamal, document the image tag, registry, proxy settings, persistent volumes, secrets, and the exact deploy and rollback commands. This written runbook is what lets another operator recover the service when the original installer is unavailable.
Final decision
Use Puma with systemd and Nginx when you want a transparent Ubuntu service layout and are prepared to manage Ruby and native dependencies. Use Kamal when containerized, repeatable releases and image-based rollback justify Docker’s additional configuration. Whichever route you choose, match the application’s declared Ruby, keep secrets outside Git, prepare PostgreSQL before serving traffic, terminate public TLS at the proxy, and verify backups, restarts, logs, and certificate renewal before calling the VPS production-ready.
Quick Recap
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.




