PostOwl is a SvelteKit application inspired by using SQLite for the database. It’s currently optimised for SvelteKit’s adapter-node to enable deployment to

More deployment options coming soon!

We’ll be adding instructions for deploying to other hosts soon. If you have success deploying to other platforms, please let us know or submit a PR documenting how you did it.

Sending email in production

PostOwl uses nodemailer to send email notifications when you send letters to friends.

The application will run without a real SMTP server configured so you can enter dummy data for the SMTP settings when deploying if you don’t need to send emails.

If you’d like to send emails but don’t have an SMTP server to use, we recommend mailgun. Their free tier will cover usage for a personal PostOwl site. You’ll need to own a domain name to get set up with mailgun. Follow their documentation to activate your domain for email sending. Then generate an SMTP password from their admin interface (click ‘Reset password’ under Sending > Domain Settings > SMTP credentials to get a password for a new domain).

Deployment to

PostOwl runs for free on which is one of the reasons we’re recommending their platform for the first release. If you follow the steps here you should have a live site in about 15 minutes.

The PostOwl repository contains the files you need to deploy your PostOwl site to

  1. Create an account with
  2. Add your credit card to Fly. PostOwl runs well on Fly’s free tier but they require an active, valid credit / bank card to prevent abuse. Unless you have a very busy site, hosting will be free.
  3. Install flyctl and sign in with fly auth login
  4. Clone the PostOwl code to a directory on your computer: git clone
  5. Enter the directory you cloned the repo to: cd postowl
  6. Rename .env.production.example to .env.production
  7. Edit .env.production:
    1. Don’t change the value of DB_PATH
    2. Edit all values with your in them (make sure to set a secure password)
    3. For the SMTP details, see the section above Sending email in production. You don’t need to use real values to try the app.
  8. Run fly launch and respond to the prompts:
    1. Choose a name for your app (e.g. yourapp- app names need to be unique across all of or hit enter to let Fly auto-generate a name
    2. Choose a Fly organization to deploy to if prompted
    3. Select the region to deploy to (Fly will automatically select one close to you)
  9. Edit the generated Dockerfile, replace RUN npm run build with RUN mkdir /data && npm run build
  10. Edit the generated fly.toml file. After the [build] section paste the lines below:
cmd = ["/app/scripts/"]
entrypoint = ["sh"]
  1. Run fly deploy

Fly will let you know when the app is deployed. Visit the URL shown in your terminal and sign in with the ADMIN_PASSWORD you set in .env.production.

Have fun creating letters! 🦉

‘Scale to zero’ on

‘Scale to zero’ means that when your site is inactive, the machine will automatically shutdown. This saves costs and electricity. For low traffic personal sites it’s ideal.

In the past, the problem with shutting down is that it would take some time for your site to start up again - remember the Heroku free plan?! use firecracker vms which start almost instantly. If your site goes to sleep, you’ll hardly notice it starting up. In our tests it takes about one second for the server to respond to an http request from a cold start! 🔥

The default configuration in PostOwl has auto_stop_machines = true in fly.toml.example. We recommend you keep this setting. We have code that gracefully closes the database connection and shuts down the application server before the machine stops.

Now you can have the benefits of a dynamic web application without the costs of keeping a VPS up all the time. And you’re being kind to the environment! 🌳

Connect a domain to your app

You can serve PostOwl from a domain or subdomain you own.

  • Run fly ips list -a myapp 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 fly certs create -a myapp
  • Run fly certs show -a myapp to watch your certificates being issued.

More details and considerations for subdomains in the fly docs