> For the complete documentation index, see [llms.txt](https://openendpoints.gitbook.io/doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://openendpoints.gitbook.io/doc/installation/docker-container/deploy-on-digital-ocean.md).

# Deploy on Digital Ocean

This is an **example installation** on [DigitalOcean](https://digitalocean.com). For sure there are many more paths how-to install OpenEndpoints on DigitalOcean.

1. Sign up to DigitalOcean or be invited to an existing account
2. On the left hand navigation go to “API” and “Generate New Token” with a name such as your name. Record the token somewhere for later.
3. Create a Project
   1. Top-left of the navigation all projects are listed
   2. Click on “New Project”
   3. Enter the name “Endpoints”
   4. For “What’s it for” answer “Operational / Developer tooling”
   5. For “Environment” answer “Production”
4. Upload the Endpoints software as a Docker image to DigitalOcean Docker Repository
   1. Go to “Container Registry” on the left hand side navigation
   2. Use a name which is unique to your company or product; this is globally unique across all of DigitalOcean. We use “endpoints” in this example.
   3. On your local computer (e.g. Mac): Install "doctl", see <https://docs.digitalocean.com/reference/doctl/how-to/install/>
   4. `doctl auth init`
   5. `doctl registry login`
   6. `docker pull public.ecr.aws/x1t6d0t7/endpoints-he`
   7. \`docker tag public.ecr.aws/x1t6d0t7/endpoints-he registry.digitalocean.com/endpoints/endpoints
   8. `docker push registry.digitalocean.com/endpoints/endpoints`
5. Create a database:
   1. Click on “Databases” in left navigation
   2. Click "create"
   3. Choose “PostgreSQL”
   4. Currently we recommend PostgreSQL 14 (although other versions will probably work).
   5. We recommend starting with the cheapest version which is “Basic Node” with 1GB of RAM.
   6. Choose your Data Center.
   7. Under “Choose a unique database cluster name” choose something like “endpoints”.
   8. Click the green “Create a Database Cluster” at the bottom of the screen to actually start the creation process. (The creation process takes a while, e.g. 5-10 minutes.)
   9. After you start the creation process, the resulting screen displays information about the database, with a few tabs such as “Overview”, “Insights” etc.
6. Create the application:
   1. On the left navigation click on “App Platform”
   2. Create a new app
   3. Select "source provider" of “DigitalOcean Container Registry”
   4. Add the following environment variables:
      1. `JAVA_OPTIONS` is `-verbose:gc`
      2. `ENDPOINTS_BASE_URL`- Use whatever domain you want the service to be running under e.g. <https://endpoints.mycompany.com/>
      3. `ENDPOINTS_JDBC_URL`
         1. Go to the database settings screen
         2. Go to the bottom right of the screen “Connection Details”
         3. Select the default “Public Network”
         4. Use a format like `jdbc:postgresql://<host>:<port>/<database>?user=<username>&password=<password>`
      4. `ENDPOINTS_SERVICE_PORTAL_ENVIRONMENT_DISPLAY_NAME` is e.g. `DigitalOcean`
   5. Choose an app name, this is used in the internal URL but otherwise doesn’t matter much
   6. Wait for it to deploy
   7. See the URL and check it works
   8. Enter a CNAME in your DNS from the URL you want to the one that DigitalOcean has supplied
   9. Go to Settings, in “App Settings” under “Domains” add the domain you want the service to run under, so that HTTPS certificates work.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://openendpoints.gitbook.io/doc/installation/docker-container/deploy-on-digital-ocean.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
