Skip to content

Add instructions to docs for setting up an external PostgreSQL server with Coder #3508

Closed
@mafredri

Description

@mafredri

We should add an example to the docs for setting up an external PostgreSQL database.

It doesn't have to be very comprehensive, but it's good to illustrate how a user can go about doing it.

I'm not saying these are the instructions we should use, but something along the lines:

# Install and start the database server.
sudo apt update
sudo apt install postgresql
sudo systemctl enable postgresql
sudo systemctl start postgresql

# Create a role and empty database for coder to use.
# NOTE: Use a strong password instead of "secret42".
# NOTE: Consider using a more limited user than superuser.
sudo -u postgres psql \
	-c "create role coder login superuser password 'secret42';" \
	-c "create database coder;"

# Start the coder server.
export CODER_PG_CONNECTION_URL="postgres://coder@localhost/coder?password=secret42"
coder server

Metadata

Metadata

Assignees

Labels

docsArea: coder.com/docs

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions