emrah-stretch
is an installer to create the containerized systems on Debian
Stretch host. It built on top of LXC (Linux containers).
- About
- Usage
- Example
- Available templates
- Requirements
Download the installer, run it with a template name as an argument and drink a coffee. That's it.
wget https://raw.githubusercontent.com/emrahcom/emrah-stretch/master/installer/es
wget https://raw.githubusercontent.com/emrahcom/emrah-stretch/master/installer/<TEMPLATE_NAME>.conf
bash es <TEMPLATE_NAME>
To install a streaming media system, login a Debian Stretch host as root
and
wget https://raw.githubusercontent.com/emrahcom/emrah-stretch/master/installer/es
wget https://raw.githubusercontent.com/emrahcom/emrah-stretch/master/installer/es-livestream.conf
bash es es-livestream
Install only a containerized Debian Stretch.
wget https://raw.githubusercontent.com/emrahcom/emrah-stretch/master/installer/es
wget https://raw.githubusercontent.com/emrahcom/emrah-stretch/master/installer/es-base.conf
bash es es-base
Install a ready-to-use live streaming media system.
-
Nginx server with nginx-ts-module and nginx-rtmp-module as a stream origin. It gets the (MPEG-TS or RTMP) stream and convert it to HLS and DASH.
-
Nginx server with standart modules as a stream edge. It publish the HLS and DASH stream.
-
Web based HLS video player.
-
Web based DASH video player.
wget https://raw.githubusercontent.com/emrahcom/emrah-stretch/master/installer/es
wget https://raw.githubusercontent.com/emrahcom/emrah-stretch/master/installer/es-livestream.conf
bash es es-livestream
-
http://<IP_ADDRESS>:8000/livestream/publish/<CHANNEL_NAME>
to push an MPEG-TS stream. -
rtmp://<IP_ADDRESS>/livestream/<CHANNEL_NAME>
to push an RTMP stream. -
http://<IP_ADDRESS>/livestream/hls/<CHANNEL_NAME>/index.m3u8
to pull the HLS stream. -
http://<IP_ADDRESS>/livestream/dash/<CHANNEL_NAME>/index.mpd
to pull the DASH stream. -
http://<IP_ADDRESS>/livestream/hlsplayer/<CHANNEL_NAME>
for the HLS video player page. -
http://<IP_ADDRESS>/livestream/dashplayer/<CHANNEL_NAME>
for the DASH video player page. -
http://<IP_ADDRESS>:8000/livestream/status
for the RTMP status page. -
http://<IP_ADDRESS>:8000/livestream/cloner
for the stream cloner page. Thanks to nejdetckenobi
Install a ready-to-use self-hosted Git service. Only AMD64 architecture is supported for this template.
- Gogs
- Git
- Nginx
- MariaDB
wget https://raw.githubusercontent.com/emrahcom/emrah-stretch/master/installer/es
wget https://raw.githubusercontent.com/emrahcom/emrah-stretch/master/installer/es-gogs.conf
bash es es-gogs
-
Access
https://<IP_ADDRESS>/
to finish the installation process. Easy! -
Password: There is no password for the database. So, leave it blank! Don't worry, only the local user can connect to the database server.
-
Domain: Write your host FQDN or IP address. Examples:
git.mydomain.com
123.2.3.4 -
SSH Port: Leave the default value which is the SSH port of the container.
-
HTTP Port: Leave the default value which is the internal port of Gogs service.
-
Application URL: Write your URL. HTTP and HTTPS are OK. Examples:
https://git.mydomain.com/
https://123.2.3.4/ -
The first registered user will be the administrator.
To use Let's Encrypt certificate, connect to es-gogs container as root and
FQDN="your.host.fqdn"
certbot certonly --webroot -w /var/www/html -d $FQDN
chmod 750 /etc/letsencrypt/{archive,live}
chown root:ssl-cert /etc/letsencrypt/{archive,live}
mv /etc/ssl/certs/{ssl-es.pem,ssl-es.pem.bck}
mv /etc/ssl/private/{ssl-es.key,ssl-es.key.bck}
ln -s /etc/letsencrypt/live/$FQDN/fullchain.pem \
/etc/ssl/certs/ssl-es.pem
ln -s /etc/letsencrypt/live/$FQDN/privkey.pem \
/etc/ssl/private/ssl-es.key
systemctl restart nginx.service
Install a ready-to-use self-hosted Nextcloud service.
- Nextcloud
- Apache
- MariaDB
wget https://raw.githubusercontent.com/emrahcom/emrah-stretch/master/installer/es
wget https://raw.githubusercontent.com/emrahcom/emrah-stretch/master/installer/es-nextcloud.conf
bash es es-nextcloud
https://<IP_ADDRESS>/
to access Nextcloud web panel.
To use Let's Encrypt certificate, connect to es-nextcloud container as root and
FQDN="your.host.fqdn"
certbot certonly --webroot -w /var/www/nextcloud -d $FQDN
chmod 750 /etc/letsencrypt/{archive,live}
chown root:ssl-cert /etc/letsencrypt/{archive,live}
mv /etc/ssl/certs/{ssl-es.pem,ssl-es.pem.bck}
mv /etc/ssl/private/{ssl-es.key,ssl-es.key.bck}
ln -s /etc/letsencrypt/live/$FQDN/fullchain.pem \
/etc/ssl/certs/ssl-es.pem
ln -s /etc/letsencrypt/live/$FQDN/privkey.pem \
/etc/ssl/private/ssl-es.key
systemctl restart apache2.service
This template is obsolete.
Install a ready-to-use public Ring node.
wget https://raw.githubusercontent.com/emrahcom/emrah-stretch/master/installer/es
wget https://raw.githubusercontent.com/emrahcom/emrah-stretch/master/installer/es-ring-node.conf
bash es es-ring-node
emrah-stretch
requires a Debian Stretch host with a minimal install and
Internet access during the installation. It's not a good idea to use your
desktop machine or an already in-use production server as a host machine.
Please, use one of the followings as a host:
-
a cloud host from a hosting/cloud service (Digital Ocean's droplet, Amazon EC2 instance etc)
-
a virtual machine (VMware, VirtualBox etc)
-
a Debian Stretch container
-
a physical machine with a fresh installed Debian Stretch