Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › DevOps

How to Install Dokku on a Docker-Ready Ubuntu VPS (22.04, 24.04 and 26.04)

By Freedom251 Team · · 9 min read

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

Install Dokku on a fresh Ubuntu 22.04, 24.04 or 26.04 VPS running on AMD64 (x86_64) or arm64, using a sudo-capable account. Dokku’s documented minimum is 1GB of memory for its Docker scheduler. Run the stable, version-tagged bootstrap script, import an SSH key, and set a global virtual host before deploying an application. A registered domain is recommended but optional; wildcard DNS produces the cleanest URL for each app.

The procedure below uses the v0.38.31 tag shown in Dokku’s 2026 documentation. Release tags change, so check the current official installation page before copying the command. The documented install normally takes 5–10 minutes, depending on your internet connection.

As an Amazon Associate I earn from qualifying purchases.

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

What Dokku installs and why the VPS requirements matter

Dokku describes itself as “an extensible, open source Platform as a Service that runs on a single server of your choice.” It turns application source into a Docker image, either from a Dockerfile or by detecting a supported language with buildpacks, and then runs containers from that image. Web processes are routed automatically through components such as nginx. Background processes and scheduled cron tasks are managed by Dokku as well.

That architecture explains why a small virtual machine can host several simple services, but also why builds need memory. The 1GB figure is Dokku’s operational minimum for the Docker scheduler, not a performance guarantee or a promise that every workload will fit. Dependency compilation, image layers and concurrent builds can require more headroom.

Supported operating systems, architectures and capacity

Requirement Documented value What it means for your setup
Ubuntu release 22.04, 24.04 or 26.04 Use a fresh installation of one of these releases. Do not assume an older or newer release is supported until the current Dokku page lists it.
CPU architecture AMD64 (x86_64) or arm64 (armv8) Choose the matching image when creating the VPS. A 32-bit image is outside the documented support list.
Memory At least 1GB This is the minimum stated for the Docker scheduler. More RAM gives builds and multiple applications more predictable room.
Privileges A user able to run sudo Run the bootstrap as that account rather than as an unprivileged user.
Domain Recommended, not mandatory A domain or wildcard record gives stable hostnames; an IP address or an sslip.io hostname can be used when you do not have a registered domain.

Dokku’s supported list also includes Debian 11 and later on x64, but this guide is limited to the Ubuntu VPS path in the title.

Is Docker already required?

The documented installation starts with a fresh, compatible Ubuntu VPS and a sudo-capable user. It does not list a separately preinstalled Docker package as a prerequisite. In practice, “Docker-ready” should mean that the provider supplies a normal Ubuntu image on an architecture Dokku supports, with enough memory and network access for the bootstrap process. Avoid layering an old, manually configured Dokku or Docker installation onto the host; a clean server makes failures easier to diagnose and avoids conflicting settings.

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

Prepare the VPS before running the installer

1. Choose a fresh image

Create the server from Ubuntu 22.04, 24.04 or 26.04, selecting AMD64 or arm64 to match your application and provider image. Confirm that you can log in with the account that will run the installer and that the account has sudo rights.

2. Plan the hostname

Decide whether applications will use a wildcard such as *.domain.tld, one shared domain, the server’s IP address, or an sslip.io hostname. You can install without a domain and add one later, but setting the global virtual host before the first deployment prevents confusing routing results.

3. Check memory honestly

Use at least 1GB of RAM for the Docker scheduler. If your VPS has less than that, Dokku warns that builds and deployments can fail unexpectedly, including pre-receive-hook failures while dependencies are installed. A larger plan is the predictable fix. Swap can provide a safety margin on a very small machine, but it is slower than physical memory.

Install the stable, tagged Dokku release

Log in as the sudo-capable user and run the two commands below from a directory where you are comfortable saving the bootstrap script:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Download the tagged bootstrap script:

    wget -NP . https://dokku.com/install/v0.38.31/bootstrap.sh
  2. Run it with the same release tag:

    sudo DOKKU_TAG=v0.38.31 bash bootstrap.sh

The commands and tag above are the stable path documented for 2026. The script URL is Dokku’s v0.38.31 bootstrap script. If the official page shows a newer stable tag when you install, use that tag consistently in both the URL and the DOKKU_TAG value. Do not mix a downloaded script from one release with a different tag.

Allow roughly 5–10 minutes for the installation on a normal connection. The duration is Dokku’s operational estimate, not a benchmark; a slow or interrupted connection can take longer. Keep the terminal open and read any error output rather than assuming that a returned shell prompt means the host is ready.

Import the deployment SSH key

Dokku needs an SSH key that it can associate with a deployment user. The official command imports the keys listed in the login account’s authorized_keys file under the name admin:

cat ~/.ssh/authorized_keys | sudo dokku ssh-keys:add admin

Run this as the account whose key file you intend to use. The command reads the file in that account’s home directory, so check that the public key used by your Git client is actually present there before running it. If the file contains several authorized keys, review them first so you understand which credentials will be accepted for the imported entry.

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

Do this before attempting the first application deployment. A package installation can complete successfully while deployments still fail because no usable SSH key has been registered.

Set the global virtual host

Set the hostname that Dokku will use as the global application domain:

dokku domains:set-global example.com

Replace example.com with a name whose A or CNAME record points to the VPS. This setting is global: it establishes the base used when Dokku creates hostnames for applications. The installation is not considered deployable until both SSH push-user configuration and virtual-host configuration are complete.

Choose a DNS layout

Wildcard DNS: the clearest multi-app setup

Create a wildcard A record such as *.domain.tld pointing to the VPS (or the equivalent wildcard record supported by your DNS provider). With the global domain set to domain.tld, an application named blog is reached at blog.domain.tld. Each app receives a readable, separate hostname without manually allocating a port.

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

One domain without a wildcard

A single domain can work when you have one application or cannot create wildcard DNS. In that arrangement, applications are reached in the form domain.tld:$RANDOM_PORT. The port-based URL is less convenient for several apps and should be expected rather than treated as an installation error.

No registered domain yet

Dokku documents using the server IP or an sslip.io hostname when a registered domain is unavailable. This is useful for a trial or an internal proof of concept. For a long-lived, multi-application VPS, a domain with wildcard DNS is usually easier for users to remember and for you to manage.

DNS choice Typical app address Best fit
Wildcard record app.domain.tld Several applications on one VPS and clean, predictable hostnames.
Single domain domain.tld:$RANDOM_PORT One app or a DNS setup that cannot provide a wildcard.
IP or sslip.io Address based on the VPS IP or sslip.io name Testing before purchasing or delegating a domain.

Verify readiness before deploying an app

Use this checklist after the bootstrap completes:

  • The VPS runs Ubuntu 22.04, 24.04 or 26.04 on AMD64 or arm64.
  • You can run sudo from the account used for installation.
  • Available memory meets the 1GB minimum, or you have deliberately added swap and accepted the slower-build trade-off.
  • The deployment public key is present in ~/.ssh/authorized_keys and has been imported with dokku ssh-keys:add.
  • The global domain is set with dokku domains:set-global.
  • The chosen A, CNAME or wildcard DNS record points to the VPS.

Only after these items are complete should you create or push the first application. Dokku can then build from a Dockerfile or select a buildpack, create the image, start the container and route its web process through the configured virtual host.

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

What to do when a small VPS runs out of memory

Recognize the symptom

Dokku specifically warns that less than 1GB of available memory can cause unexpected build or deployment errors. A common symptom is a pre-receive-hook failure while a dependency is being installed. The failure may appear to be an application problem even though the host simply cannot provide enough memory for the build.

Prefer more physical RAM

Increasing the VPS memory allocation is the most predictable remedy for repeated builds, large dependency trees or several applications building at once. The 1GB requirement is a floor; it does not reserve capacity for your application runtime, database, monitoring or other services on the same server.

Use swap as a safety margin

The advanced Dokku guidance suggests increasing Linux swap to as much as twice the physical memory. Its example expands a 512MB machine’s swap file to 1GB. Swap can prevent an abrupt out-of-memory failure, but it cannot deliver the same performance as RAM. Treat it as an emergency cushion for light workloads, not as evidence that a 512MB VPS meets Dokku’s 1GB recommendation.

Stable bootstrap versus advanced installation paths

Most installations should use the tagged bootstrap above. Dokku’s advanced guidance documents other choices for maintainers and automation, including installing from the potentially unstable master branch, overriding the Dokku repository, skipping recommended Herokuish dependencies, and configuring unattended installs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Approach Advantages Costs and risks Use it when
Tagged stable bootstrap Known release, straightforward support path and the fewest decisions. You follow the release’s defaults and must update the tag when a newer stable version is published. Normal production or personal VPS installation.
master or source customization Access to development changes, repository overrides or tailored dependencies. Potential instability, more troubleshooting and less predictable behavior. You have a specific customization or automation requirement and can maintain it.
Unattended installation Repeatable provisioning in automation. A wrong answer in the automated configuration can leave the host installed but not deployable. Image building or scripted infrastructure where every setting is known in advance.

An advanced path does not remove the basic requirement to configure the virtual host and push user. A successful package or source install alone is not a finished Dokku host.

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

Common installation and deployment failures

“Unsupported” operating system or architecture

Recheck the image label and CPU architecture. The documented Ubuntu list is 22.04, 24.04 and 26.04, with AMD64 or arm64. If your provider image is outside that list, rebuild the VPS with a supported image rather than forcing the bootstrap.

The bootstrap command cannot download or complete

Confirm outbound connectivity, the exact script URL and the sudo-capable account. Copy the current tagged command from Dokku’s official page if the release tag has changed since this guide was written. On a partially modified host, a fresh compatible VPS is usually easier to recover than repeatedly layering installers over a failed attempt.

Pre-receive hook fails during dependency installation

Check the host’s available memory first. Dokku associates this class of failure with systems below 1GB available memory. Move to a larger plan or add swap according to the advanced guidance, remembering that swap is slower.

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

The app installs but its hostname does not resolve

Verify that the global domain exactly matches the DNS name you configured and that the A, CNAME or wildcard record points to the VPS. If you chose a single domain, expect a port-qualified address rather than a separate subdomain. If you have no registered domain, use the documented IP or sslip.io alternative.

SSH push is rejected

Confirm that the public key used by your Git client appears in the account’s ~/.ssh/authorized_keys and that you ran the import command. Re-run the command only after checking which keys the file contains; changing DNS will not fix an authentication problem.

Operational decisions after the first deployment

Dokku’s single-server model keeps the platform compact: one VPS supplies the scheduler, image builds, web routing, background processes and cron management. That simplicity also concentrates resources and failure domains on one machine. Keep application count and build concurrency within the memory available, and plan a migration or larger VPS before the host becomes permanently memory constrained.

Keep a note of the Dokku release tag used during installation. When upgrading, read the current official documentation because supported Ubuntu releases, tags and installation options change. A command that was correct for v0.38.31 may not be the correct command for a later release.

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

Installation summary

  1. Provision a fresh Ubuntu 22.04, 24.04 or 26.04 VPS on AMD64 or arm64.
  2. Ensure the login account can run sudo and the server has at least 1GB RAM, adding swap only as a calculated safety margin.
  3. Download the current stable tagged bootstrap script and run it with the matching DOKKU_TAG.
  4. Import the deployment key with cat ~/.ssh/authorized_keys | sudo dokku ssh-keys:add admin.
  5. Set the global domain with dokku domains:set-global example.com or use the documented IP/sslip.io alternative.
  6. Point DNS at the VPS, preferably with a wildcard record for clean per-app hostnames.
  7. Deploy only after SSH and virtual-host configuration are complete.

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.

DevOpsDockerDokkuself-hostingUbuntuVPS

Leave a Reply

Your email address will not be published. Required fields are marked *

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.

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.