Blog of science and life

Feed - perfect solution

Link as QR code of article - perfect solution - A review

After a month trying, I must say that: is awesome!.

After a year using Hosthatch, I tired of their terrible uptime, sometime the servers is down for 2 days. I'm not sure why, but I'm sure that I'm not going back to them.

Luckily, I've found It's cheap, fast and reliable. I'm moving all my services to And to be honest, it's so easy that make me feel like I'm cheating.

Guide to migrate

If you have a Dockerfile for your service, you can migrate to in 5 minutes.

Here are some examples.

Vaultwarden (No Postgres, No Redis)

Create Dockerfile

FROM vaultwarden/server:latest

Launch a new app

Run fly launch and follow the instruction. You can choose any name and server region you want.

After deployed, you can access at <app-name>

Create new volume

Just need 1GB for now, you can scale later. Why 1GB? Because they give us 3GB storage for free every month. You can run 3 apps for free.

fly volumes create <vol-name> --region sin --size 1

After created, add [mount] section to your fly.toml file.


Set ENVs

There are 3 ways to set ENVs (Secrets) for your app:

  • Using flyctl secrets set command
  • Using [env] section in fly.toml file
  • cat .env | flyctl secrets import


Run flyctl deploy to deploy your app.

You can also use flyctl deploy --no-cache to skip cached build, or flyctl deploy --local-only to deploy using local docker.

Then run fly open to open <app-name>

Migrate data

You can use the Web UI of Vaultwarden to export/import data as JSON format.

Config domain

  1. Root-domain

    The documentation has excellent guide for this. You can follow it here.

    But I still copy a version here for lazy people like me.

     Let's say we have and a Fly app called custom-quartz.
     - Run `flyctl ips list -a custom-quartz` to get the IPv4 and IPv6 addresses.
     - Head over to your DNS provider and add A and AAAA records for with the IPv4 and IPv6 values.
     - Run `flyctl certs create -a custom-quartz`
     - Run `flyctl certs show -a custom-quartz` to watch your certificates being issued.
     - Connect to and use your application with auto-renewing Let's Encrypt TLS certificates, edge TLS, HTTP/2 support and more.
  2. Sub-domain

    First, execute flyctl certs create <app-name>.<your-domain>.com. Then add a new CNAME record to your DNS provider, redirect to <app-name>

    If the result of flyctl certs check <app-name>.<your-domain>.com look like this, you are successfully deployed Vaultwarden.

    The certificate for <app-name>.<your-domain>.com has been issued.
    Hostname                  = <app-name>.<your-domain>.com
    DNS Provider              = cloudflare
    Certificate Authority     = Let's Encrypt
    Issued                    = rsa,ecdsa
    Added to App              = 27 minutes ago
    Source                    = fly

    Kudos to this awesome article

Tricks and tips

Copy file to app server

flyctl ssh sftp shell

Then you can use sftp command to copy file to app server. Example: put <local-file> <remote-file> or get <remote-file> <local-file>


I'll keep using it and write more review/guide later. If you have any question, feel free to ask me.