---
title: "Upgrading Dreamfactory within Gold - DreamFactory"
source: "https://wiki.dreamfactory.com/Upgrading_Dreamfactory_within_Gold"
canonical_url: "https://wiki.dreamfactory.com/Upgrading_Dreamfactory_within_Gold"
converted_at: "2025-10-29T16:53:47.715Z"
format: "markdown"
converted_by: "html-to-md-ai"
---
[]()

						

			# Upgrading Dreamfactory within Gold

									
									From DreamFactory
								
												
					Jump to:					[navigation](#mw-head), 					[search](#p-search)
				
				## Upgrade Procedure

DreamFactory Gold is a multi-tenant system where multiple instances share the same codebase, but with separate DBs. To upgrade the DreamFactory codebase, you will need to update the actual code as well as run any migrations and / or seeds against the individual instance databases.

Once you're in your DreamFactory Gold instance, you'll need access to /var/www/launchpad.

First, we will upgrade the DreamFactory "Base" installation for all of your Gold instances. Navigate to /var/www/launchpad

1. - If you're updating to the latest version, you'll checkout the master tag. If you're moving to a specific version number, you'll checkout that version number as the tag.

- <source lang=bash>$ git checkout master</source>

- If you have unsaved changes, you'll receive a message indicating which files have changes in them. You will need to stash the changes.
- **You must do this step BEFORE checkout if you have made changes to or replaced any files in the main DreamFactory repo **(such as changes to composer.json.)

- <source lang=bash>$ git stash</source>

- Repeat the checkout step.

2. Pull the latest from git (again, using the appropriate tag -- master or version number).
- <source lang=bash>$ git pull origin master</source>

- <source lang=bash>$ sudo chmod -R 2775 storage/ bootstrap/cache/</source>

3. Use Composer to update all the vendor repos.
- <source lang=bash>$ composer install --no-dev</source>

4. Migrate the database.
- <source lang=bash>$ php artisan migrate --seed</source>

5. Clear the application cache.
- <source lang=bash>$ php artisan cache:clear</source>

Now that the base launchpad directory has been upgraded, you still will need to perform some of these actions on your DreamFactory instances. This is done by a process we call "encapsulation". It basically mounts an individual instance to a temporary location so you can perform actions from the shell on it.

Now change your directory to /var/www/console
<source lang="bash">
$ cd /var/www/console
</source>
Create the encapsulation
<source lang="bash">
$ sudo php artisan dfe:capsule <instance-name>
</source>
You will receive a directory location based on your Gold install setup to navigate to. This is the encapsulation point.
<source lang="bash">

- Instance "instance" encapsulated in /data/capsules/mycluster/instance.

</source>
Navigate to this directory. From there you can perform upgrade operations on an individual instance. This is necessary when there are database migrations and additional seeds which need to be applied to the instance's database.</br>
From the capsule directory:
<source lang="bash">
$ sudo php artisan cache:clear
$ sudo php artisan config:clear
$ sudo php artisan migrate --seed
</source>
After the migrations have run, you will need to remove the capsule mount. Navigate back to the /var/www/console directory.
<source lang="bash">
$ sudo php artisan dfe:capsule <instance name> --destroy
</source>
This will clean up and remove the capsule mount. Repeat the above steps for all the instances on your Gold Cluster.

					
						Retrieved from "[https://wiki.dreamfactory.com/index.php?title=Upgrading_Dreamfactory_within_Gold&oldid=33863](https://wiki.dreamfactory.com/index.php?title=Upgrading_Dreamfactory_within_Gold&oldid=33863)"