Building from source
Installation
This method is not recommended for most users. To build Zipline from source, you will need to have the following dependencies installed:
- nodejs@22
- pnpm@10.2.0
- ffmpeg (for generating thumbnails, optional)
If you would like to see what versions Zipline has been successfully built on,
visit the actions
history.
Click the latest one on the top, and you can see runs labelled like build (20.x, amd64)
. This means that Zipline was successfully built on node version
20.x on an amd64 architecture.
First, clone the repository:
git clone https://github.com/diced/ziplinecd zipline
Next, install the dependencies:
pnpm install
Before building Zipline, you will have to create a .env
file, as well as have a PostgreSQL database running. An example .env looks like this:
# Replace username and password with your PostgreSQL credentialsDATABASE_URL=postgresql://username:password@localhost:5432/zipline# These two are optional, but you can set them to change the hostname and portCORE_HOSTNAME=0.0.0.0CORE_PORT=3000
You will also want to setup a datasource for your
instance. By default, Zipline will use ./uploads
for local file storage. You
can configure a different datasource (e.g. S3) by setting the appropriate
environment variables in the .env
file.
You will also need to generate a secret for zipline, to do this you can use the command below to append it to your .env
file:
echo "CORE_SECRET=$(openssl rand -base64 42 | tr -dc A-Za-z0-9 | cut -c -32 | tr -d '\n')" >> .env
What 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.
Then build Zipline:
pnpm build
Finally, start the server:
pnpm start
Updating
To update Zipline, simply run the following command:
git pull
Then update dependencies and build Zipline:
pnpm installpnpm build
Then start the server:
pnpm start