Self-Hosted: Updating your Hudu Version

To update your Hudu instance on self-hosted:

Before updating, always make sure you have a current backup. Plan for about 5-10 minutes of downtime. You can update your Hudu instance to a new version by running:

Run:

cd ~/hudu2 && sudo docker compose down && sudo docker compose pull && sudo docker compose up -d

 

* Note that if you are using an older version of docker, it will be:

cd ~/hudu2 && sudo docker-compose down && sudo docker-compose pull && sudo docker-compose up -d

 

  Action required: Standard support for Ubuntu 20.04 LTS ended May 2025. Prior to updating to Hudu v2.40, please ensure you have updated to Docker Engine v28 and Ubuntu 22.04 LTS or newer.

Redis Update

Redis version 6 or higher is required for Hudu versions 2.34.0 and later. The Redis version is specified in the docker-compose.yml file located in the ~/hudu2 directory. To ensure you stay on the latest version, replace the Redis image tag with 'latest'.

redis_version.png

 

Additional default.conf Updates by Version

v2.35.0 through v2.41.x

If you are updating your self-hosted instance to v2.35.0 or any version up to v2.41.x, add the required /cable location block beneath the final deny block in default.conf.

Navigate to /var/www/hudu2/config/nginx/site-confs/ and edit default.conf to include the following block under the last deny block:

 location /cable {
      proxy_pass http://app:3000/cable;
          proxy_http_version 1.1;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection "upgrade";
          proxy_set_header Host $host;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_read_timeout 240s;
          proxy_send_timeout 240s;
          proxy_set_header X-Forwarded-Proto $scheme;
          proxy_set_header X-Real-IP $remote_addr;
          proxy_pass_request_headers on;
          proxy_buffering off;
          proxy_redirect off;
          break;
  }

 

v2.42.0 and later

If you are updating your self-hosted instance to v2.42.0 or later, you must also add the following three location blocks above all previously configured locations.

If the /cable block is not already present, it must also be added.:

location = /.well-known/oauth-authorization-server {
    limit_except GET { deny all; }

    client_max_body_size 1k;

    # add_header Content-Type application/json;

    proxy_http_version 1.1;
    proxy_set_header Connection "";
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-Proto https;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    proxy_pass http://app:3000;
}

location = /.well-known/oauth-protected-resource {
    limit_except GET { deny all; }

    client_max_body_size 1k;

    # add_header Content-Type application/json;

    proxy_http_version 1.1;
    proxy_set_header Connection "";
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-Proto https;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    proxy_pass http://app:3000;
}

location /mcp {
    proxy_read_timeout 3600s;
    proxy_send_timeout 3600s;

    proxy_buffering off;
    proxy_cache off;

    proxy_http_version 1.1;
    proxy_set_header Connection "";

    chunked_transfer_encoding off;
    gzip off;

    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-Proto https;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    proxy_pass http://app:3000;
}

 

You can find the fully updated default.conf file in our setup guides. Each setup guide has slight variations for their default.conf files, so make sure you use the one from the guide you used to set up your instance:

Docker Cleanup

Over time, your Hudu server may accumulate old Docker images and stopped containers that take up unnecessary disk space.

Running a simple prune command during the update process helps keep your environment clean and efficient.

docker system prune -af

What This Does

  • Removes unused Docker images, containers, and networks.

  • Frees up space by clearing cached data from previous builds.

  • Keeps your Hudu data and volumes intact.

Recommended Routine

When updating Hudu, use the following commands:

docker compose down
docker system prune -af
docker compose pull
docker compose up -d

This ensures your Hudu installation runs on a clean and current Docker environment, minimizing conflicts and improving performance.

When to Run This

It’s recommended to run this cleanup process:

  • As part of your regular Hudu update routine.

  • Monthly, as part of ongoing server maintenance.

  • Whenever Docker begins consuming significant storage space.

Was this article helpful?
4 out of 6 found this helpful