Upsun User Documentation


Sign up

Get your free trial by clicking the link below.

Get your Upsun free trial

When you develop a project, a significant amount of work takes place locally rather than on an active Upsun environment. You want to ensure that the process of local development is as close as possible to a deployed environment.

You can achieve this through various approaches. For example, you can use Symfony Server with tethered data.

To do so, when testing changes locally, you can connect your locally running Symfony Server to service containers on an active Upsun environment.

This methodology has several advantages:

  • It avoids installing anything on your local machine but your stack runtime.
  • It ensures that you are using the same versions of all services on your local machine and in production.

1. Start your local Server Anchor to this heading

Use the official path to start your local server locally.

2. Create the tethered connection Anchor to this heading

  1. Create a new environment off of production:

    upsun branch new-feature main
  2. Open an SSH tunnel to the new environment’s services:

    upsun tunnel:open

    This command returns the addresses for SSH tunnels to all of your services that you can then use within your local source code:

    upsun tunnel:open
        SSH tunnel opened to rediscache at: redis://
        SSH tunnel opened to database at: pgsql://main:main@
        Logs are written to: /Users/acmeUser/.upsun/tunnels.log
        List tunnels with: upsun tunnels
        View tunnel details with: upsun tunnel:info
        Close tunnels with: upsun tunnel:close
        Save encoded tunnel details to the PLATFORM_RELATIONSHIPS variable using:
        export PLATFORM_RELATIONSHIPS="$(upsun tunnel:info --encode)"
  3. When you’ve finished your work, close the tunnels to your services by running the following command:

    upsun tunnel:close --all -y

Is this page helpful?