Deploy Hatamoto on DigitalOcean
By the end you have Hatamoto running on a DigitalOcean Droplet, with PostgreSQL and HTTPS already set up, and a link in the Web Console that creates your owner account. You paste one cloud-config file into the create form, so there is nothing to type on the server. The clicking takes a few minutes and the install runs by itself afterwards.
The Droplet costs $6.00 a month and the public IPv4 address is included. DigitalOcean lists x64 images only, so this guide is for amd64.
What it costs
Hatamoto needs 1 GB of RAM, so the 1 GiB Basic Droplet is the smallest that fits. DigitalOcean bills per second and never charges more than the monthly price.
| Item | Price |
|---|---|
| Basic Droplet, Regular: 1 vCPU, 1 GiB RAM, 25 GiB SSD, 1,000 GiB transfer | $6.00 a month |
| Basic Droplet, Regular: 2 vCPUs, 2 GiB RAM, 60 GiB SSD, 3,000 GiB transfer | $18.00 a month |
| Public IPv4 address | Included |
| Weekly automated backups | 20% of the Droplet price, so $1.20 a month on the $6.00 plan |
| Snapshots | $0.06 per GB a month |
Prices as of 13 November 2026, from DigitalOcean's Droplet pricing. They change, so check the provider before you order.
Before you start
- A DigitalOcean account, from cloud.digitalocean.com.
- An SSH public key, if you want to log in from your own computer. Without one, use the Droplet's Web Console.
- A domain name you can edit DNS for. It is optional: without one, Hatamoto uses a free name of the form
203-0-113-7.sslip.io, which suits a trial. - An email address, which Hatamoto passes to the certificate authority for expiry notices.
Step 1: Open the Droplet form
Log in at cloud.digitalocean.com. Click the green Create button at the top, then Droplet. With no Droplets yet, the Resources tab has a blue Get Started with a Droplet button that does the same.
Step 2: Choose a region and an image
Under Choose Region, pick the datacentre nearest your visitors, such as Sydney for readers in Australia. Under Choose an image, open the OS tab, pick Ubuntu and select 24.04 (LTS) x64. DigitalOcean says cloud-init, the tool that reads your file, is on its latest Ubuntu images.
Step 3: Choose the plan
If the form shows Choose configuration type, pick Bundled. Then choose Shared CPU, Basic, the Regular option, and the card for 1 GiB of RAM and 1 vCPU at $6.00 a month. For a busier site, the 2 vCPU card with 2 GiB is $18.00.
Step 4: Add your SSH key
Under Choose Authentication Method, pick SSH Key and use Add SSH Key to paste your public key. DigitalOcean recommends keys over a Password. The Hatamoto setup does not need SSH, but you will want it for maintenance.
Step 5: Paste the script into Startup scripts
Expand Additional Options if it is collapsed and tick Startup scripts. A box opens. Paste this cloud-config file into it:
#cloud-config
runcmd:
- sh -c 'curl -fsSL -o /tmp/hatamoto-install.sh https://hatamoto.dev/install.sh && chmod +x /tmp/hatamoto-install.sh && env HATAMOTO_DOMAIN=cms.example.com HATAMOTO_ADMIN_EMAIL=you@example.com /tmp/hatamoto-install.sh'HATAMOTO_DOMAIN is the domain you want the site on and HATAMOTO_ADMIN_EMAIL is your email address. Replace cms.example.com and you@example.com with your own. For the free sslip.io name instead, delete the whole env part so the line ends with /tmp/hatamoto-install.sh.
The script runs as root, so there is no sudo. Anyone with access to your DigitalOcean account can read the box later, so leave HATAMOTO_SETUP_CODE out and let Hatamoto make a random code. You cannot edit user data once the Droplet exists, so check it now.
Step 6: Create the Droplet
Under Finalize Details, leave Quantity at 1. Hostname is optional: a full name such as cms.example.com makes DigitalOcean create reverse DNS records for it. Click Create Droplet. When the progress bar finishes, the Droplet appears in the list with its IP address.
Step 7: Point your domain at the Droplet
Copy the Droplet's IPv4 address. At your DNS host, add an A record for cms.example.com with that address. To use DigitalOcean's own DNS, open Networking, then Domains, then Add a domain, point your registrar at DigitalOcean's nameservers, open the domain and choose Create a record. Pick type A, enter the Hostname and choose the Droplet under Will direct to.
If the record is not live when the install ends, Hatamoto starts on the sslip.io name and moves to your domain within minutes of the record working.
Step 8: Open ports 80 and 443 (optional)
A new Droplet has no cloud firewall, and Hatamoto's installer already turns on the server's own firewall for ports 22, 80 and 443, so the site works as it is. If you want a cloud firewall as well, open Create, then Firewall, and enter a Name. The inbound rules start with SSH only, so add TCP 80 and TCP 443 from all IPv4 and all IPv6 addresses. Under Apply to Droplets, type the Droplet's name. Keep the SSH rule, because the Web Console needs it.
Step 9: Watch the install and open the setup link
Click the Droplet's name in the Droplets list, then Web Console at the top, or use Actions, then Connect. Log in as root. Allow a few minutes for the install, and follow it with:
cat /var/log/cloud-init-output.logWhen it finishes, the console prints a block that starts with "Hatamoto is ready." and shows again at each login until the owner account exists. Open the long link from that block in your browser. The setup code is already filled in, and the part after # stays in your browser. Create the owner account, then carry on with First run.
Step 10: Turn on snapshots
Open the Droplet, then the Backups & Snapshots tab. In the snapshot section, name a snapshot and choose Take a Snapshot. DigitalOcean recommends powering the Droplet off first with Actions, then Turn off, and turning it back on afterwards. For copies without remembering, tick Enable automated backups instead. Hatamoto also keeps its own nightly backup on the Droplet; see Backups.
Check it worked
On the Droplet, run:
curl -i http://127.0.0.1:8090/healthThe first line of the answer is HTTP/1.1 200 OK. Then open your domain in a browser. You should see a padlock and the starter home page.
If something goes wrong
- If nothing installed, check the image. cloud-init reads user data on DigitalOcean's latest Ubuntu and CentOS images, so recreate the Droplet from Ubuntu 24.04.
- If the file has a typo, destroy the Droplet and create a new one with the fixed file, or log in and run the one-line command from Install on a VPS by hand.
- If the site times out after you add a firewall, add TCP 80 and TCP 443 rules for all IPv4 and IPv6 addresses and confirm the firewall is applied to your Droplet.
- If the browser warns about the certificate, check that the
Arecord points at the Droplet's address. Until it does, the site answers on the sslip.io name and switches by itself. - If the bill still shows a Droplet you switched off, destroy it. A powered-off Droplet is billed until you do.
Use the command line instead
DigitalOcean's doctl takes the same file with --user-data-file. Install doctl, create a personal access token and run doctl auth init. Save the script as cloud-init.yaml and run:
doctl compute droplet create hatamoto --region nyc1 --image ubuntu-24-04-x64 --size s-1vcpu-1gb --ssh-keys <ssh-key-fingerprint> --user-data-file cloud-init.yaml --waitThis command is composed from the doctl reference and has not been run for this page. doctl compute region list and doctl compute size list show the other slugs.
FAQ
How much does it cost to run Hatamoto on DigitalOcean?
The smallest Droplet that meets the 1 GB minimum is $6.00 a month. Hatamoto is free to install. Weekly automated backups add $1.20 a month on that plan.
Where do I paste the install script?
In the create form, under Additional Options, tick Startup scripts and paste the cloud-config file into the box. DigitalOcean's docs call it user data.
Do I need SSH?
No. The Web Console on the Droplet's page opens a terminal in your browser, and the setup link appears in it. SSH is handy later for maintenance.
Can I use Debian?
Hatamoto supports Debian 12 and 13, and DigitalOcean lists a Debian 13 image. Its docs only promise cloud-init user data on the latest Ubuntu and CentOS images, so this guide uses Ubuntu 24.04.
Is there an arm64 Droplet?
DigitalOcean lists x64 images only, so this page covers amd64. Hatamoto itself also runs on arm64 servers elsewhere.
What if I do not have a domain yet?
Delete the env part of the script. Hatamoto then uses a free sslip.io name built from the Droplet's address. It works for a trial, but the name is shared with other servers, so use your own domain for a real site.
How do I keep the same address if I rebuild the Droplet?
Create a Reserved IP and assign it to the Droplet. It is free while assigned and $5.00 a month while it sits unassigned.
Hatamoto installs the same way on Vultr, Amazon Lightsail, Amazon EC2, Hetzner Cloud and Linode. The full option list is in Install on a VPS.