Self-hosting
Logbuch loads nothing from other servers. Ghost does, and here is how to serve its tools yourself.
Logbuch loads nothing from other servers. Its fonts, icons and scripts are part of the theme and come from your own site, and so does the code highlighting. It sets no cookie. Ghost is different. Out of the box it loads some of its own tools from public servers, and a theme can't change that. If you run Ghost on your own server, you can serve them yourself. Checked against Ghost 6.75.0.
What Logbuch stores in the reader's browser
Logbuch keeps three choices in the reader's browser, each one only after the reader makes it. Nothing of it is sent to your site or anywhere else.
| What | Where | Name | How long |
|---|---|---|---|
| Light or dark, when the reader switches it | session storage | niched-color-scheme | until the tab closes |
| The chosen tab of a code example, such as pnpm or npm | session storage | logbuch-code-tab | until the tab closes |
| The chapters read in a series | local storage | logbuch-series-progress | until the reader unticks the box |
Series progress is off until the reader ticks "Remember the chapters I have read" in a series. Before that, nothing is stored. Unticking it deletes what was stored, and so does clearing the browser's data for your site. If your privacy policy lists what your site keeps in the browser, these are the three entries.
What Ghost loads by default
| What | From | When |
|---|---|---|
| Portal, the sign-up window | cdn.jsdelivr.net | members, donations or recommendations are on |
| Search | cdn.jsdelivr.net | always |
| Comments | cdn.jsdelivr.net | comments are on and a reader scrolls near the end of a post |
| Announcement bar | cdn.jsdelivr.net | an announcement is set |
| Admin toolbar | cdn.jsdelivr.net | only for signed-in staff |
| Stripe | js.stripe.com | paid memberships are on |
| Fonts from Brand → Typography | fonts.bunny.net | you picked a font there (Fonts) |
| Profile images of members | gravatar.com | a member is signed in |
On Ghost(Pro) you can't change Ghost's configuration, so this list applies as it is. On your own server you can move almost all of it.
Turn off Gravatar
For a signed-in member, Ghost asks gravatar.com for a profile picture, using a code made from the member's e-mail address. Turn that off in Ghost's config.production.json:
"privacy": {
"useGravatar": false
}
Use useGravatar and not useTinfoil. The second switch also removes the structured data that search engines read from your posts.
Serve Portal, Search and Comments yourself
Ghost can load its tools from any address you give it. I test Logbuch with Portal, Search, Comments and the announcement bar served this way.
1. Find the versions your Ghost uses
The copies have to match your Ghost version. Look them up in the file core/shared/config/defaults.json of the Ghost version you run (with a Ghost-CLI install, under current/). Search for portal, sodoSearch, comments and announcementBar. Each has a version, such as 2.72 for Portal in Ghost 6.75.0. Check again after every Ghost update.
2. Download the files
On the server, with Node.js installed (Ghost needs it anyway), fetch the packages with the versions from step 1:
mkdir -p /srv/ghost-apps && cd /srv/ghost-apps
npm install @tryghost/portal@~2.72 @tryghost/sodo-search@~1.9 @tryghost/comments-ui@~1.6 @tryghost/announcement-bar@~1.1
mkdir -p public
cp -r node_modules/@tryghost/portal/umd public/portal
cp -r node_modules/@tryghost/sodo-search/umd public/search
cp -r node_modules/@tryghost/comments-ui/umd public/comments
cp -r node_modules/@tryghost/announcement-bar/umd public/announcement
3. Serve them with Caddy
Caddy serves the files under /niched-apps/ on your own domain and passes everything else to Ghost. Your Caddyfile, with your domain:
example.com {
encode zstd gzip
handle_path /niched-apps/* {
root * /srv/ghost-apps/public
file_server
}
reverse_proxy 127.0.0.1:2368
}
Reload Caddy after the change (systemctl reload caddy, or restart the container).
4. Tell Ghost where they are
In config.production.json, with your domain:
"portal": {
"url": "https://example.com/niched-apps/portal/portal.min.js"
},
"sodoSearch": {
"url": "https://example.com/niched-apps/search/sodo-search.min.js",
"styles": "https://example.com/niched-apps/search/main.css"
},
"comments": {
"url": "https://example.com/niched-apps/comments/comments-ui.min.js"
},
"announcementBar": {
"url": "https://example.com/niched-apps/announcement/announcement-bar.min.js"
}
If you run Ghost in Docker, set the same values as environment variables instead: portal__url, sodoSearch__url, sodoSearch__styles, comments__url, announcementBar__url, and privacy__useGravatar=false. Restart Ghost.
Because the files come from your own domain, the browser needs no extra permissions. If you serve them from another domain, that server has to send CORS headers, since Ghost loads them with crossorigin="anonymous".
Don't turn Portal off
Ghost also accepts "url": false to switch Portal off entirely. Don't do that if you use members: the sign-up block at the end of a post, the box on members-only posts and the members pages all rely on Portal to send their e-mails. Serve it yourself instead.
Video
A video you upload to Ghost comes from your own site. A link to YouTube or Vimeo, pasted as a bookmark, loads nothing from the provider until the reader plays the video, and YouTube's player then comes from its no-cookie address. An embed loads the provider's player with the page, and no theme can prevent that. If you use embeds, say so in your privacy policy (see Post types).
What you can't move
- Stripe for paid memberships always loads from js.stripe.com.
- Bunny Fonts: a font picked under Brand → Typography always loads from fonts.bunny.net. Leave both fonts on Theme default to avoid it.
- Requests that Ghost's tools make by themselves once loaded. Portal, for example, contains an image address on static.ghost.org.
Check it
Open your site in a browser with the developer tools open (F12), on the Network tab, and reload the page. With the setup above and the fonts on Theme default, every request goes to your own domain, unless you use paid memberships.