Docker First Time Setup gives 404 on all /ghost/assets/

I get 404 on /ghost/assets/* in the First Time Setup after clean Docker Install
only /var/lib/ghost/content is mounted, so the /assets/ files should exist self-contained within the docker image. Why are they not present?

Heya, I’m trying to set up Ghost on Unraid (for the 3rd time actually :) )
I had it semi-working before but Ghost didn’t generate resized images and showed 404s for them instead and the linked ‘content’ folder didn’t have any of the recently uploaded images in it at all (they also weren’t in the in-memory container … weird stuff!)

Anyway, my issue is that I now did a completely fresh setup after completely wiping both content, appdata, database and previous container image. I can access the /ghost page and could create my user. On the Let’s get started! page it then already fails on the 2nd entry (Customize your design) which fails to load a module. Most of the /ghost/assets/* files seem to 404. How come? These files are, from what I understand, part of the Ghost docker image itself which is, by default, not mounted as a volume so it cannot (should not) be a permission issue.
I know the info and problem is likely very broad, but I hope we can pick at one thing at a time to get it working.

Bonus question:
In other forum posts I heard mentions of ‘package.json’ and being able to edit HTML directly in specific files. The only place I could find package.json is the container image itself and when attempting to mount the Theme(s) folder externally, it doesn’t work because its contents are symlinks. Has this been successfully done via Docker install before?

What’s your URL?
I’ll provide once it’s useful. It fails in the admin panel already

What version of Ghost are you using?

How was Ghost installed and configured?

Container IP



mail__from:'Name' <>

/var/lib/ghost/content -> /mnt/user/ghost/example

What Node version, database, OS & browser are you using?

  • If my install uses Node it must be bundled
  • DB is mariadb 11.3.2
  • OS of host is Unraid 6.12.10 , Client is Windows 11 (22631)
  • Browser is Chrome 125.0.6422.78

What errors or information do you see in the console?

Failed to load resource: the server responded with a status of 403 () ghost/api/admin/users/me/?include=roles:1
Failed to load resource: the server responded with a status of 404 () ghost/assets/admin-x-settings/modals-ae924d1e.mjs:1
Uncaught (in promise) TypeError: Failed to fetch dynamically imported module:
[2024-05-24 22:18:15] INFO "GET /ghost/api/admin/newsletters/?include=count.active_members%2Ccount.posts&limit=50" 200 29ms
[2024-05-24 22:18:15] INFO "GET /ghost/api/admin/integrations/?include=api_keys%2Cwebhooks" 200 36ms
[2024-05-24 22:18:24] INFO "GET /ghost/assets/" 404 5ms
[2024-05-24 22:18:24] INFO "GET /ghost/assets/" 404 15ms
[2024-05-24 22:18:24] INFO "GET /ghost/assets/" 404 17ms
[2024-05-24 22:18:24] INFO "GET /ghost/assets/" 404 19ms
[2024-05-24 22:18:24] INFO "GET /ghost/assets/admin-x-settings/" 404 22ms

What steps could someone else take to reproduce the issue you’re having?
Install docker via Unraid out of the box, navigate to the /ghost website, create admin account in setup screen and click on the 2nd entry “Customize your design”

My docker-compose file is available at #1 GhostCMS - Installation Docker
Try to read the content and adjust the files needed to run according to your needs.

Thanks for the reply and the suggested docker file; however, I’m not looking for a CMS system for Ghost at this time and the content that’s not loading isn’t assets from me - it’s the official docker’s internal files that fail loading and I’m looking for a solution to that. :slight_smile:

The issue was caused by cloudflare caching because I did a clean install and parts of the old installation remained in cache.

I did get a bit further as today it appears to be showing something when I click “Customize your design” where yesterday it just showed a blurred background without a panel opening.



That gave me the hunch that this may be caching related, so I added a cloudflare cache rule for ‘/ghost’ in the hopes that this may help.

Lastly, given the (redacted) CORS header errors it was trying to access from For this adding a naked redirect to (either in cloudflare or nginx - I chose cloudflare) worked just fine. The process for cloudflare is outlined here if you need it, given that page rules are now deprecated.

And with that, the admin panel is accessible as it should be:

You might also want to add the /member route as an exceptions.

Tested this with BunnyCDN, but I would assume it would work with Cloudflare as well.

As an alternative, @smartgoat has an interesting approach in his blog post about BunnyCDN: exceptions based on the *ghost-members-ssr* and *admin-api-session* cookies. Not sure if that works with Cloudflare, but it’s the most elegant solution to me right now.

1 Like

Yes the cookie based approach also works with cloudflare. Here is the full guide about that How to Optimize Cloudflare Caching for Blazing Fast Ghost Blog.

The only 3 reasons to go with bunny are:

  1. They have good support.
  2. Better routing even when not caching (More noticeable in APAC region).
  3. Longer cache retention. Cloudflare aggressively purges cache, so if you have low traffic, then chances of hitting cache are higher with bunny.

Thanks for the tips you two. :smile: I’ll add /member to the exceptions for now and look into using cookies for this instead as per smartgoat’s guide.

However, switching to BunnyCDN isn’t something I’d want to do or consider as I’m quite happy with what Cloudflare can do on it’s free tier (and that it’s super stable and widely used, so you find plenty of help online). I don’t expect much traffic on my blog.

1 Like

Yeah, never meant to push you to BunnyCDN – just wanted to point out that there are additional exceptions that might be useful :smiley: