Site Logo and Icons Break due to subfolder config

Hey guys,

Your work on discourse is great,
Just need small help,

After running discourse for few days I am having trouble with setting logo, as it breaks after few days (404 error in console),
All images in post working fine,

I can not upload again any logo,
Delete, reset and upload again doesn’t work,
at the same time Gravatar also stopped working,
I am not using cdn to serve images,
discourse is setup on subfolder using this post Subfolder support with Docker

Any ideas @tgxworld?

Probably better if @david looks at this cause he is in the middle of a revamp here.


This suggests there is an issue bigger than just site logos. Are you seeing any errors in /logs? What kind of server are you running Discourse on? Do you have available disk space?


Right now /logs are empty,
16 gb available disk space using NGINX server,

We don’t have enough traffic so we are on 5$ DO droplet Ubuntu 18.10 x64

1 Like

What happens if you try and re-upload a logo?

uploading 100% then blank,

Now my /logs have few errors

Deprecation notice: The flags webhook is deprecated. Please use reviewable instead. 
At /var/www/discourse/config/initializers/012-web_hook_events.rb:82:in `block (2 levels) in <top (required)>`

6 Webhook event failed: Connection refused - connect(2) for (Errno::ECONNREFUSED)

6 Errno::ECONNREFUSED (Failed to open TCP connection to (Connection refused - connect(2) for "" port 443)) /usr/local/lib/ruby/2.6.0/net/http.rb:949:in rescue in block in connect'

Try going to the rails console

/var/discourse/launcher enter app
rails c

and then run


Do you get anything returned?


Hmmm, that looks correct. But the URL it’s pointing to returns a 404:

Have you done anything which might have deleted files from your server? (Normally they would be under /var/discourse/shared/standalone/uploads/default).

Anyway, to try and recover, you can delete the upload record from the database and upload again. So in this case, run Upload.find(10).destroy! from the rails console.

1 Like

Ok now logo uploaded and working fine for now,
but I can not upload other logo and icons,

I don’t see any new files in /var/discourse/shared/standalone/uploads/default

original/1X contains two images but not accessible on /community/uploads/default/original/1X/


`ActionController::MissingFile (Cannot read file /var/www/discourse/public/community/uploads/default/original/1X/318d1773f36e3e13192b2007fffa029d71fad86c.png)
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack- `send_file'

/var/www/discourse folder does not exist

Actual structure of discourse on my server is like this



Is folder upload folder not mapped correctly? or permission issue?

Actually you can say right now upload functionality is totally broken,
on upload image path is created but it can not be accessed (404)

Why isn’t discourse installed at /var/discourse?

How was this installed?

Discourse installed at

following this post

And where does that tell you not to install it in /var/discourse?

Remapping is carried out by nginx, which is what that guide covers.

Discourse still needs to be installed in the normal way

Ok Thats my mistake,

What should I do now to move discourse to correct location with current settings,

Out of curiosity why are you going through the pain of a subfolder install?

This seems to be very relevant to your situation. A lack of understanding of the concepts here is going to keep coming back and biting you.


Actually you already know why everyone wants to have community on subdirectory instead of subdomain,
subdomain is treated as separate site in SERP and we don’t want to manage two sites,

I think for now I am going to stick to subdirectory,

So tell me how I can do it.

You’ve already made it clear that you have:

  • A broken Discourse installation, having deviated from the install guide
  • Gaps in your technical knowledge in implementing the subfolder install.

Google make it quite clear that subfolders and subdomains are treated equally - as your don’t currently have the expertise to install this you probably need to consider making a post in the #marketplace.

And bear in mind that complications do arise with subfolders and updates - you’re going to need to retain someone to help you maintain it down the line.