github.com/ddev/ddev@v1.23.2-0.20240519125000-d824ffe36ff3/docs/content/users/providers/upsun.md (about)

     1  # Upsun Integration
     2  
     3  DDEV provides integration with the [Upsun by Platform](https://upsun.com/) hosting system, allowing Upsun users to easily download database and files from Upsun to a local DDEV-managed environment.
     4  
     5  DDEV’s Upsun integration pulls databases and files from an existing Upsun site/environment into your local system so you can develop locally.
     6  
     7  ## Upsun Global Configuration
     8  
     9  You need to obtain and configure an API token first. This only needs to be done once.
    10  
    11  1. Login to the Upsun Dashboard and go to *My Profile* → *API Tokens*. Create an API token DDEV can use.
    12  2. Add the API token to the `web_environment` section in your global DDEV configuration at `~/.ddev/global_config.yaml`:
    13  
    14  ```yaml
    15  web_environment:
    16    - UPSUN_CLI_TOKEN=abcdeyourtoken
    17  ```
    18  
    19  ## Upsun Per-Project Configuration
    20  
    21  1. Check out the Upsun site and configure it with [`ddev config`](../usage/commands.md#config). You’ll want to use [`ddev start`](../usage/commands.md#start) and make sure the basic functionality is working.
    22  2. Add `UPSUN_PROJECT` and `UPSUN_ENVIRONMENT` variables to your project.
    23  
    24      * Either in `.ddev/config.yaml` or a `.ddev/config.*.yaml` file:
    25  
    26          ```yaml
    27          web_environment:
    28          - UPSUN_PROJECT=nf4amudfn23biyourproject
    29          - UPSUN_ENVIRONMENT=main
    30          ```
    31  
    32      * Or with a command from your terminal:
    33  
    34          ```bash
    35          ddev config --web-environment-add="UPSUN_PROJECT=nf4amudfn23bi,UPSUN_ENVIRONMENT=main"
    36          ```
    37  
    38  3. Run [`ddev restart`](../usage/commands.md#restart).
    39  4. Run `ddev pull upsun`. After you agree to the prompt, the current upstream databases and files will be downloaded.
    40  5. Optionally use `ddev push upsun` to push local files and database to Upsun. The [`ddev push`](../usage/commands.md#push) command can potentially damage your production site, so we don’t recommend using it.
    41  
    42  ## Usage
    43  
    44  * `ddev pull upsun` will connect to Upsun to download database and files. To skip downloading and importing either file or database assets, use the `--skip-files` and `--skip-db` flags.
    45  * If you need to change the `upsun.yaml` recipe, you can change it to suit your needs, but remember to remove the `#ddev-generated` line from the top of the file.