Skip to main content

Getting started: Installation

Spawn makes it easy to create disposable copies of databases for your development environment, and to automate them within DevOps pipelines. It uses a command line interface to create and manage those copies, and to make scripting and automation simple.

This tutorial will walk you through installing Spawn, using a database copy and creating an image of your own data from which you can further copies.

Request a Spawn account#

Spawn is currently a closed beta and not accepting new participants at this time.


Download and run the install script

curl -sL | sh

Add spawnctl to your path

export PATH=$PATH:$HOME/.spawnctl/bin

Spawn also supports Raspberry Pi (ARM-based Linux operating systems). Please follow the standard installation instructions for Linux above.

Authenticate spawnctl with your Spawn account#

Authenticate spawnctl to link your Spawn account

spawnctl auth

Create a copy of a sample database#

Spawn instantly creates copies of databases as cloud-hosted containers and passes the connection details back to you. These copies are called data containers. The data containers are created from data images -- prepared images of the database you want to copy, complete with all the data and configuration.

To make it easy to get started we've created some public data images based on familiar sample databases.

Create a copy of the PostgreSQL Pagila demo database by running

spawnctl create data-container --image postgres-pagila:v11.0 --name spawn-tutorial --lifetime 1h

The --name flag is optional. If you don't specify a name a random one will be generated for you based on the image name.

Spawn creates the database copy and returns the connection details:

Data container 'spawn-tutorial' (97477) created!

Using pgAdmin (or your preferred client) you can connect to this database as normal. Copy in the server name and port, the username and password and click Connect.

pgAdmin connection dialog

This database copy is a full version of PostgreSQL running in a container. You can use it just like any other, querying and updating as normal.

pgAdmin query

List data containers to see the one that was just created:

spawnctl get data-containers
ID Name Revision Status Engine CreatedAt ExpiresAt
97477 spawn-tutorial rev.0 Completed PostgreSQL:11.0 29 seconds ago 59 minutes from now

In the next section, we'll learn how to do more with your data container than just connect to it.