How to work on Owncast

Owncast is a straightforward web application and compared to many projects is very easy to get running locally and contributing to.

  • The backend is written in Go.
  • The frontend is written in React.

If you’re interested in contributing to Owncast, here’s how you can get started.

How to start with Frontend development

The web frontend of Owncast is written in React with TypeScript built using Next.js.

You can browse the React components in the project using our Storybook page to get an idea of how the frontend is structured.

  1. Fork the Owncast repository on Github located at https://github.com/owncast/owncast.
  2. Check out your fork locally with git clone https://github.com/yourusername/owncast.
  3. Create a new branch for your new changes with git checkout -b my-new-feature.

Run the web project

  1. Change to the web directory and install dependencies with npm install.
  2. Start the development server with npm run dev.
  3. Open http://localhost:3000 in your browser.

You must have an instance of Owncast running locally to connect to. You can run one with go run main.go from the root of the repository. Read more details about running development Owncast under the backend section.

Learn about how to write React Components with Owncast

We have a short document outlining the specifics of the hows and whys of our specific component approach.

Use Storybook to update and create components

Storybook is a tool that allows you to create and test components in isolation. It’s a great way to develop new components and test them out without running a copy of the Owncast server.

  1. Run npm run storybook to start the Storybook server.
  2. Open http://localhost:6006 in your browser.
  3. Navigate the Storybook interface to browse and test components.

How to start with Backend development

The backend of Owncast is written in Go. It operates as a web and API server, inbound RTMP ingestion server, outbound HLS distribution server, and chat server.

  1. Ensure you have the Go programming language tools installed for your system.
  2. Clone the Owncast repository with git clone https://github.com/owncast/owncast.
  3. A c compiler and tooling must be available on your system. Generally this means installing gcc and its development libraries.
  4. Run go run main.go from the root of the repository.

Go Linting

We use golangci-lint to lint our Go code. While optional, it is a useful tool to assist you in writing better Go code. You can install it from the golangci-lint website.

Run a development stream

Many features are only enabled when a stream is live. You can run a local stream using any video file you have around by running:

./test/ocTestStream.sh somevideofile.mp4

If you haven’t yet, find an issue to work on

Visit our Good First Issues list to find something that might be a good fit for you to start on. Otherwise, feel free to drop into our community chat and say hi and we can get to know you and see where you’d like to take part.