···13131414## Linux
15151616-We distribute two Linux packages for Streamplace:
1717-1818-- `streamplace`, which is the main Streamplace binary.
1919-- `streamplace-default-http`, which includes some additional systemd
2020- configuration to make Streamplace your default HTTP server on ports 80
2121- and 443.
2222-2323-If you're looking to set up a Streamplace node on a server that isn't hosting
2424-any other services, we'd recommend e.g.
2525-`apt install streamplace streamplace-default-http`. If your server is hosting
2626-other HTTP servers and you'll handle the proxying yourself, you can simply
2727-`apt install streamplace`.
2828-2916### Debian/Ubuntu
30173118```shell
···3522 | sudo tee /etc/apt/sources.list.d/streamplace.list
3623sudo apt update
3724sudo apt install streamplace
2525+```
2626+2727+This will install the `streamplace` systemd service. To configure it, you will
2828+want to edit the environment variables at `/etc/streamplace/streamplace.env`. An
2929+example production env file might look something like this:
3030+3131+```ini
3232+# Handle default HTTP and HTTPS traffic for the server
3333+SP_HTTP_ADDR=:80
3434+SP_HTTPS_ADDR=:443
3535+SP_SECURE=true
3636+3737+# Necessary to advertise a public Streamplace broadcaster
3838+SP_BROADCASTER_HOST=example.com
3939+# If you have a multi-node cluster, they'll each need different public DNS names:
4040+SP_SERVER_HOST=prod-nyc0.example.com
4141+4242+# Useful if your TLS cert and key aren't in the default
4343+SP_TLS_CERT=/tls/tls.crt
4444+SP_TLS_KEY=/tls/tls.key
3845```
39464047## Download a binary
+19-2
util/systemd/after-install.sh
···18181919# Create default environment file if it doesn't exist
2020if [ ! -f /etc/streamplace/streamplace.env ]; then
2121- echo "# Configure your Streamplace instance by creating lines such as:" > /etc/streamplace/streamplace.env
2222- echo "# SP_PUBLIC_HOST=example.com" >> /etc/streamplace/streamplace.env
2121+ cat <<EOF > /etc/streamplace/streamplace.env
2222+# Configure your Streamplace instance by creating lines such as:
2323+#
2424+# SP_BROADCASTER_HOST=example.com
2525+#
2626+# If you have a multi-node cluster, they'll each need different public DNS names:
2727+#
2828+# SP_SERVER_HOST=prod-nyc0.example.com
2929+#
3030+# If you want your Streamplace node handle default HTTP and HTTPS traffic for the server, uncomment these:
3131+#
3232+# SP_HTTP_ADDR=:80
3333+# SP_HTTPS_ADDR=:443
3434+# SP_SECURE=true
3535+# Useful if your TLS cert and key aren't in the default:
3636+#
3737+# SP_TLS_CERT=/tls/tls.crt
3838+# SP_TLS_KEY=/tls/tls.key
3939+EOF
2340fi