-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRemoteDatabaseConnect
More file actions
31 lines (24 loc) · 1.23 KB
/
RemoteDatabaseConnect
File metadata and controls
31 lines (24 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
This page will serve as a basic, vendor-neutral guide for setting up a PostgreSQL database and connecting your Chainlink node to it.
PostgreSQL is a popular and secure database available on a variety of platforms. This guide will not show you how to create and set up a PostgreSQL database, however, some common guides can be found below:
Amazon AWS
Azure
Docker
Google Cloud
Obtain Information About Your Database
In order to connect to a remote database, you will need to obtain information about the database and server. Take note of the database's:
Server or IP
Port
Username
Password
Database name
The user must be the owner of the desired database. On first run, the migrations will create the tables necessary for the Chainlink node.
Set Your DATABASE_URL Environment Variable
Below is an example for setting the DATABASE_URL environment variable:
DATABASE_URL
DATABASE_URL=postgresql://$USERNAME:$PASSWORD@$SERVER:$PORT/$DATABASE
You will need to change the following placeholders to their real values:
$USERNAME: The database username (must be owner)
$PASSWORD: The user's password
$SERVER: The server name or IP address of the database server
$PORT: The port that the database is listening on
$DATABASE: The database to use for the Chainlink node