media-server: The remote server you are about to configurehost-server: The host machine you are working onNAS: Network attached storage server
#1. Set up ssh key based login to the media-server
a. Generate a ssh keypair if you don't already have it in your host-server. (Check using ls ~/.ssh)
ssh-keygenb. Copy the public key to the media-server
ssh-copy-id username@media-server-ip-or-hostnamec. Test with logging in
ssh username@media-server-ip-or-hostname#2. Install Ansible in your host machine
sudo apt update && sudo apt install ansible#3. Install Ansible community plugins in your host machine
ansible-galaxy collection install community.docker#4. Port forward your internet facing router
- External port 443 should be forwarded to your
media-serverport 443. - Access your router admin page to do it.
Google it if you have no idea what this is.
#5
#6. Configure ansible playbook
update the ansible-playbook/inventories/default/hosts.ini file with your media-server ip address or hostname
Edit the file ansible-playbook/inventories/default/group_vars/all.yml and update variables if needed. Read following
section and App Specific configuration to get a better understanding variables and their usage.
If using a NFS share mount role, make sure on the NAS server side,
- Create dedicated user and a group on the NAS server and note down
uidandgid - Use user/group mapping when creating the data set in your storage pools
- Use user/group mapping when creating the share. (e.g :
Mapall UserandMapall Groupin TrueNAS). - Update
local_media_uidandlocal_media_gidininventories/default/group_vars/all.ymlaccordingly.
- Disable VPN if not needed by seeting
gv_add_vpn_containerto false
- Enable/Disable using
transmission_enablevariable in the role. Enabled by default
- Enable/Disable using
qbittorrent_enablevariable in the role. Disabled by default - Default username is
admin, password isadminadmin, change it via the webui.
#7. Start installation
Once the configuration is updated and then only use following command to start the installation
cd ansible-playbook
./install.shOnce the installation script completed successfully. Visit https://www.hostname-you-configured to visit the dashboard.
#8 Register the SSL cert against the let's encrypt production servers
- For the initial setup we registered the domain SSL against the staging servers of Let's Encrypt service. This will result in a browser complaint stating that your connection is not secure. This step in place to avoid let's encrypt service from banning you for multiple unsuccessful requests if we got anything wrong in the setup.
If everything looks good after the first install, (Check logs of swag container server on the media-server : docker logs -f swag)
set gv_use_lets_encrypt_staging_server to false and rerun the ./install.sh script.
Once the installation is complete, you can use following commands from your host machine to start/stop all apps.
cd ansible-playbook
./start-all.shcd ansible-playbook
./stop-all.shfind . -mtime +16 -exec rm -rf {} \;