This document aims to get you get up and running for Owncast development. If you’d like further details in contributing to the Owncast project, including opportunities to contribute in non-technical ways, read the Contributor Guide .


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

Web Frontend

The frontend consists of the interface you use when you interact with Owncast, such as the player, chat and all of the components on the page. It also includes the Owncast admin where Owncast is configured.

It is written in JavaScript, and uses React. See below on how to setup your development environment. There are details in how we build frontend React components here: How we develop frontend components

Backend

The Owncast backend is the service that powers all the features and functionality of the service. This includes the video pipeline, web server, chat service, inbound RTMP server, ActivityPub/Fediverse integration, and more. You may be interested in reading about how our APIs are built.

Setup your Owncast development environment

If you’re looking to take part in writing Owncast code, you’ll need to set up your development environment. It is a straightforward web application and compared to many projects is quite easy to get running locally and contributing to.

  1. First, fork the Owncast repository on GitHub, located at https://github.com/owncast/owncast.
  2. Clone the Owncast repository with git clone <https://github.com/yourusername/owncast>

Run the backend server in development

In order to work on Owncast you’ll need an instance of Owncast running in your development environment.

  1. Ensure you have the Go programming language tools installed for your system.
  2. A copy of ffmpeg installed on your machine that is available either globally, or in the same directory as the Owncast code you cloned is required.
  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 the frontend in development

If you’re looking to work on the web frontend, once you have the code downloaded, and Owncast running in you development environment, you can start the frontend.

  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.

Use Storybook to update and create React components

Storybook is a tool that allows you to create and test components in isolation. It's a great way to develop new frontend components and test them out without running a copy of the Owncast server. You can see a hosted example of it running here to browse existing components.

  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.

Run a development stream

Powered by Fruition