-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add systemd installation method #25
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
--- | ||
title: Post-installation | ||
--- | ||
|
||
# Post-installation | ||
|
||
## Reverse-proxies | ||
|
||
You can run Owncast behind your favorite reverse-proxy. | ||
|
||
### Caddy | ||
|
||
[Caddy](https://caddyserver.com/) is an open source web server with automatic HTTPS. It can be used as a reverse-proxy. | ||
This is a basic [Caddyfile](https://caddyserver.com/docs/caddyfile-tutorial) example. | ||
|
||
{{< highlight caddyfile >}} | ||
stream.myserver.org { | ||
header -Server | ||
push | ||
encode zstd gzip | ||
reverse_proxy * 127.0.0.1:8081 # your local Owncast instance | ||
} | ||
{{</ highlight >}} | ||
|
||
## systemd | ||
|
||
1. Install Owncast as described in the [quickstart](/docs/quickstart) section | ||
1. Create `owncast` system user | ||
{{< highlight bash >}} | ||
sudo adduser \ | ||
--system \ | ||
--gecos "Owncast" \ | ||
--group \ | ||
--disabled-password \ | ||
--no-create-home \ | ||
--disabled-login \ | ||
owncast | ||
{{</ highlight >}} | ||
1. Create the systemd unit file at `/etc/systemd/system/owncast.service` | ||
{{< highlight systemd >}} | ||
[Unit] | ||
Description=Owncast | ||
# If you are using Owncast behind a reverse proxy, | ||
# you can specify the related service here to ensure that it is up and running | ||
# before launching the owncast service. | ||
# After=caddy.service | ||
# After=nginx.service | ||
# After=httpd.service | ||
|
||
[Service] | ||
Type=simple | ||
Restart=always | ||
RestartSec=2 | ||
User=owncast | ||
Group=owncast | ||
WorkingDirectory=/path/to/owncast/directory | ||
ExecStart=/path/to/owncast/directory/owncast | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
{{</ highlight >}} | ||
1. Ensure that the `owncast` user has the appropriate rights to `/path/to/owncast/directory`. | ||
{{< highlight bash >}} | ||
sudo chown -R owncast:owncast /path/to/owncast/directory | ||
{{</ highlight >}} | ||
1. Enable and start the `owncast` service | ||
{{< highlight bash >}} | ||
sudo systemctl daemon-reload | ||
sudo systemctl enable owncast | ||
sudo systemctl start owncast | ||
{{</ highlight >}} | ||
1. See if `owncast` is runing | ||
{{< highlight bash >}} | ||
sudo systemctl status owncast | ||
{{</ highlight >}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we want to talk about systemd in the Quickstart. systemd is not required to download and run Owncast and should be treated as optional additional information. I almost think we should have a separate document with things you can learn about after you have Owncast running, like systemd, reverse proxies (for SSL), etc. But given that none of that has anything to do with actually downloading and running Owncast I don't want to make it sound like there's more steps and tools you have to learn. What are your thoughts @jeyemwey @gingervitis ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm certain that we should not put this into our Quickstart guide. Like Gabe said, another page with example configurations for other applications (nginx, apache2, caddy, systemd right here) would be great. Not sure how we could call this, but this PR will be a good start.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand and agree with that. Indeed, "quick start" is no longer as "quick" and easy to handle with this... What do you think about a "Post-install" section ?