# Configure logo, logo\_small as code

**URL:** https://meta.discourse.org/t/configure-logo-logo-small-as-code/378736
**Category:** Support
**Created:** [August 15, 2025, 1:27pm UTC](https://meta.discourse.org/t/configure-logo-logo-small-as-code/378736 "2025-08-15T13:27:56Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Eric\_Keller](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eric_keller/32/517693_2.png) [@Eric\_Keller](https://meta.discourse.org/u/Eric_Keller)
#### Post date: [August 15, 2025, 1:27pm UTC](https://meta.discourse.org/t/configure-logo-logo-small-as-code/378736/1 "2025-08-15T13:27:56Z")

</div>

Dear discourse community.

I recently automated the deployment and restoring of production backup to a dev and test instance of the discourse forum.  
This allows to have identical data on all sites.  
Yet I would like to customize the site logo depending on the instance.

following up this site\_setting.yml as advertized in this other topic:[Comprehensive list of SiteSettings?](https://meta.discourse.org/t/comprehensive-list-of-sitesettings/108678)

> <https://github.com/discourse/discourse/blob/main/config/site_settings.yml>

I was able to configure key settings of the sites with different variables.  
Yet the logo part is not very well documented, so I tried several approach.

```plaintext
...
# Available options:
#
# default - The default value of the setting. For upload site settings, use the id of the upload seeded
# in db/fixtures/010_uploads.rb.
...

branding:
  logo:
    default: -5
    client: true
    type: upload
  logo_small:
    default: -6
    client: true
    type: upload

```

Basically the default seems to be an integer index as defined int he [010\_uploads.rb](https://github.com/discourse/discourse/blob/main/db/fixtures/010_uploads.rb):

```plaintext
  -5 => "discourse-logo-sketch.png",
  -6 => "discourse-logo-sketch-small.png",

```

In the UI setting history I found the reference to the latest logo and logo\_small as links to the /upload directory.

e.g.: `/uploads/default/original/3X/2/4/242dc879cbffed41ee64646a0dffded5c34bb9c6.png`

In my app setting .yml I then started by experimenting with the default value:

```plaintext
  # Backup
  DISCOURSE_s3_backup_bucket: "backup-test"

  # Logo
  DISCOURSE_logo: -5
  DISCOURSE_logo_small: -6

```

Setting up `DISCOURSE_logo` and `DISCOURSE_logo_small` to the default as specified in the site\_settings.yml

rebuilding the site did cause some 500 and the site was not operational anymore.  
I also tried to pass on a string reference to the upload I would like to be the logo of this specific site, unfortunatelly the same effect, an unusable site.

```plaintext
DISCOURSE_logo: "/uploads/default/original/3X/2/4/242dc879cbffed41ee64646a0dffded5c34bb9c6.png"

```

My chain of thoughts was to upload different logos for dev, test and prod on the prod instance then after restoring the productive backup ensure the site rebuild will point to the correct logo for the specific instance.

Any help would greatly be appreciated.

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [August 16, 2025, 2:16am UTC](https://meta.discourse.org/t/configure-logo-logo-small-as-code/378736/2 "2025-08-16T02:16:47Z")

</div>

I’ve gone down this path too (although not quite as far) for the same reasons.

Eventually, I gave up and have lived with poor differentiation between the site clones.

At least it is relatively easy to rename the volumes of the serverd, which reduces the likelihood of doing something truly stupid!!!
