Ruby on Rails One-Click Application

DigitalOcean’s Ruby on Rails One-Click Application provides a convenient way to get your Rails application running on an Ubuntu server. With Nginx, Puma, and Postgres all pre-installed, the One-Click provides a solid foundation for hosting your app.


Droplets created using this One-Click have the following software components:

Component Version
Linux Ubuntu 18.04.1
Ruby Latest from
Rails Latest gem package
Puma Latest gem package
Nginx Latest from APT
Node.js Latest from APT
Postgres Latest from APT
Postfix Latest from APT
Certbot Latest from APT

In addition to the package installation, the One-Click also:

  • Enables the UFW firewall to allow only SSH (port 22, rate limited), HTTP (port 80), and HTTPS (port 443) access.

  • Creates a rails system user which deploys the application.

  • Creates a rails database user which the application uses to connect to PostgreSQL.

  • Configures Ruby to use vendored bundles and installs all Gems and processes locally to the rails user.

  • Configures Nginx to forward requests to a local UNIX socket, acting as a reverse proxy for the application server.


After you create a Ruby on Rails One-Click Droplet:

  • After the Droplet is created, you can view the Rails site by visiting the Droplet’s IP address in your web browser. It takes a moment for the installation to complete, so if it doesn’t appear immediately, wait a minute and reload the page.

  • The message of the day (MOTD) will show the system and database user passwords, which are also saved in /root/.digitalocean.passwords.

  • The MOTD will also show you SFTP credentials that you can use to upload files using software like FileZilla, WinSCP, or rsync.

  • The unit file for Rails is /etc/systemd/system/rails/service.

To manage the Rails site, log into the Droplet via SSH as root using either the password emailed to you or with an SSH key, if you added one during creation.

The application server, Puma, is managed by Systemd, so you can use the systemctl command to start, stop, restart, and check the status of Puma. For example, systemctl restart rails.service will restart it.

Because Ruby will be configured to use vendored bundles, use the rails user to interact with the default project via sudo -i -u rails.

API Creation

In addition to creating a Droplet from the Ruby on Rails One-Click application using the control panel, you can also use the DigitalOcean API.

You can list all One-Click application images using the API. As an example, to create a 4GB Ruby on Rails Droplet in the SFO2 region, you can use the following curl command. You’ll need to either save your API access token to an environment variable or substitute it into the command below.

curl -X POST -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer '$TOKEN'' -d \
    '{"name":"choose_a_name","region":"sfo2","size":"4gb","image":"rails-18-04"}' \

Next Steps

See Getting Started with Rails for an overview of working with Rails or jump to the Say Hello, Rails! directions to get started to deploy your app. Note that your site will be located at its IP address or domain name rather than http://localhost:8000.