Below is a step‐by‐step guide to install Owncast on Ubuntu 24.04. You can choose either the manual installation method (using the official installer script) or the Snap package method. Both methods are effective; pick the one that best suits your needs.
Prerequisites
-
Update Your System:
Open a terminal and run:sudo apt update && sudo apt upgrade -y
-
Install Required Tools:
Ensure you have curl installed:sudo apt install curl -y
-
Optional – Firewall Setup:
If you use UFW, you’ll need to allow ports:sudo ufw allow 8080/tcp # For the web interface sudo ufw allow 1935/tcp # For RTMP streaming
Method 1: Manual Installation Using the Official Installer
-
Download and Run the Installer Script:
This script downloads the latest Owncast release (including FFmpeg if needed) and sets up a newowncast
directory.curl -s https://owncast.online/install.sh | bash
This command will:
- Create an
owncast
folder. - Download the latest Owncast release from GitHub.
- Create an
-
Start Owncast:
Change into the newly created directory and run Owncast:cd owncast ./owncast
You should see log messages indicating that:
- The RTMP server is listening on port 1935.
- The web server (and admin interface) is running on port 8080.
-
Access the Admin Interface:
Open your web browser and navigate to:http://[your-server-ip]:8080/admin
Use the default credentials:
- Username:
admin
- Password:
abc123
(Be sure to change the default password immediately.)
- Username:
-
(Optional) Configure Owncast as a Systemd Service:
To ensure Owncast starts on reboot:- Move the Owncast Directory:
sudo mv ~/owncast /usr/share/owncast
-
Create a Service File:
Open/etc/systemd/system/owncast.service
in your text editor:sudo nano /etc/systemd/system/owncast.service
Paste in the following configuration:
[Unit] Description=Owncast Streaming Server After=network.target [Service] Type=simple WorkingDirectory=/usr/share/owncast ExecStart=/usr/share/owncast/owncast Restart=on-failure RestartSec=5 [Install] WantedBy=multi-user.target
- Reload and Enable the Service:
sudo systemctl daemon-reload sudo systemctl enable owncast sudo systemctl start owncast
- Verify Status:
sudo systemctl status owncast
- Move the Owncast Directory:
Method 2: Installing Owncast via Snap
-
Ensure Snap Is Enabled:
On Ubuntu 24.04, snapd is pre-installed. If not, install it:sudo apt update sudo apt install snapd -y
-
Install Owncast Snap:
Run the following command to install Owncast from the Snap Store:sudo snap install owncast --beta
This command installs the beta version of Owncast packaged with all its dependencies.
-
Running Owncast:
Once installed, you can start Owncast by simply typing:owncast
Your server will then be available on port 8080 (for the web interface) and port 1935 (for RTMP streaming).
Next Steps: Configuring and Connecting Your Stream
-
Log into the Admin Interface:
Visithttp://[your-server-ip]:8080/admin
and log in using:- Username:
admin
- Password:
abc123
Change your password immediately after logging in.
- Username:
-
Configure Stream Settings:
- Set a custom stream key.
- Adjust video resolution, bitrate, and other metadata.
- Customize the appearance and integrated chat settings.
-
Connect Your Streaming Software (e.g., OBS):
In OBS, configure your stream:- Stream URL:
rtmp://[your-server-ip]/live
- Stream Key: The one you configured in Owncast.
- Stream URL:
-
Start Streaming:
Click “Start Streaming” in OBS. Your stream should now be live and viewable via your Owncast server.
By following these steps, you’ll have a fully functional Owncast installation on Ubuntu 24.04, ready for live streaming and interactive audience engagement.
For additional details or advanced configuration, refer to the official Owncast documentation.
Writing System Service for Owncast
Here’s a systemd
service file for running Owncast on your server:
[Unit]
Description=Owncast Live Streaming Service
After=network.target
[Service]
User=owncast
Group=owncast
WorkingDirectory=/opt/owncast/owncast
ExecStart=/opt/owncast/owncast/owncast
Restart=always
RestartSec=5
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=owncast
LimitNOFILE=1048576
[Install]
WantedBy=multi-user.target
Instructions to Enable and Start the Service
- Save the file as:
/etc/systemd/system/owncast.service
- Reload
systemd
to recognize the new service:sudo systemctl daemon-reload
- Enable Owncast to start on boot:
sudo systemctl enable owncast
- Start the Owncast service:
sudo systemctl start owncast
- Check the status:
sudo systemctl status owncast
This setup ensures Owncast runs automatically and restarts if it crashes.
0 Comments