Profile picture Schedule a Meeting
c a n d l a n d . n e t

Ghost on Dokku with Sqlite

Dusty Candland | | ghost, dokku, sqlite

I'm using the Ghost modern publishing platform for my daily newsletter. It has a great UI, email support, and it's self hosted. I'm using Dokku for the hosting and Sqlite for the DB.


Setup the Dokku appplication to use Sqlite (not actually supported), and install via Docker image.

dokku apps:create candland-cms
dokku domains:add

dokku config:set --no-restart database__client=sqlite3 database__connection__filename=/var/lib/ghost/content/data/ghost.db database__useNullAsDefault=true database__debug=false

dokku config:set --no-restart NODE_ENV=production

dokku git:from-image ghost:latest

dokku proxy:ports-add http:80:2368

dokku proxy:ports-remove http:2368:2368

Setup pesistent storage for the database and content files.

dokku storage:ensure-directory

dokku storage:mount /var/lib/dokku/data/storage/candland-cms:/var/lib/ghost/content

dokku ps:rebuild

Setup the domain and SSL

dokku config:set --no-restart

dokku letsencrypt

dokku config:set url=

Database backups

Setup Litestream on the server

dokku plugin:install litestream

dokku litestream:auth

dokku litestream:create candland-cms /var/lib/dokku/data/storage/candland-cms/data ghost.db s3://

dokku litestream:start candland-cms

Email Setup

I set up Mailgun for the newsletter sending, so I'm going to use that for the transactional email config too.

dokku config:set mail__transport=SMTP \
mail__options__service=Mailgun \ \
mail__options__port=465 \
mail__options__secure=true \ \

dokku ps:rebuild

Check out the final result (yeah, I changed the subdomain).


I'm not sure export/import are needed for minor version upgrades.

  1. Export everything

  2. Upgrade docker image

dokku git:from-image ghost:latest
  1. Import everything


Latest docker images


These are webmentions via the IndieWeb and Mention this post from your site: