Docker
Install and run Zipline with Docker*
Zipline can be easily installed and run using Docker Compose. This is the recommended installation method for most users, as it abstracts away the complexities of setting up the environment and dependencies.
Set up docker-compse.yml
First, download the docker-compose.yml file:
curl -LO https://zipline.diced.sh/docker-compose.ymlIf you don't already have a .env file with a database password and zipline secret, you can generate one with the following command:
echo "POSTGRESQL_PASSWORD=$(openssl rand -base64 42 | tr -dc A-Za-z0-9 | cut -c -32 | tr -d '\n')" > .env
echo "CORE_SECRET=$(openssl rand -base64 42 | tr -dc A-Za-z0-9 | cut -c -32 | tr -d '\n')" >> .envWhat does this command do?
openssl rand -base64 42 | tr -dc A-Za-z0-9 | cut -c -32 | tr -d '\n'openssl rand -base64 42: Generate 42 random bytes in base64 encoding.tr -dc A-Za-z0-9: Remove all characters except for letters and numbers.cut -c -32: Cut the string to 32 characters.tr -d '\n': Remove the newline character.
Zipline will fail to start without the POSTGRESQL_PASSWORD and CORE_SECRET
variables.
You will also want to setup a datasource for your
instance. By default, Zipline will use ./uploads (the docker-compose.yml
also includes a volume for this) for local file storage. You can configure a
different datasource (e.g. S3) by setting the appropriate environment
variables in the .env file.
Run the server
docker compose pull
docker compose up -dAfter starting, Zipline will be available at http://<ip>:3000 where <ip> is the IP address of the machine running Zipline.
You will be redirected to a setup page where you can configure the default super administrator username and password.
Updating
To update Zipline, simply run the following command:
docker compose pull
docker compose up -dThis will pull the latest Zipline image and restart the server.
Next steps
After setting up Zipline, you may want to:
- Harden your instance by following the hardening guide
- Setup 2FA or Passkeys for extra security
- Explore the configuration options to customize your instance
- Setup a reverse proxy for better performance and security