Building from source
Build and run Zipline from source. Not recommended for most users.
Building Zipline from source is not recommended for most users, as it requires setting up a development environment and managing dependencies manually. However, if you want to contribute to the project or need to customize it in ways that are not supported by the pre-built Docker image, building from source can be a good option.
Install Prerequisites
- nodejs@22
- pnpm@10.10.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.
Clone the repository
git clone https://github.com/diced/zipline
cd ziplineInstall dependencies
pnpm installBuilding Zipline
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 credentials
DATABASE_URL=postgresql://username:password@localhost:5432/zipline
# These two are optional, but you can set them to change the hostname and port
CORE_HOSTNAME=0.0.0.0
CORE_PORT=3000You 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')" >> .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.
Then build Zipline:
pnpm buildRun the server
pnpm startUpdating
To update Zipline, simply run the following command:
git pullThen update dependencies and build Zipline:
pnpm install
pnpm buildThen start the server:
pnpm startLast updated on