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-keygen
b. Copy the public key to the media-server
ssh-copy-id username@media-server-ip-or-hostname
c. 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-server
port 443. - Access your router admin page to do it.
Google it if you have no idea what this is.
#5. Register a free DuckDNS for free hostname
- Visit https://www.duckdns.org/ and register a free account there.
- Note down the
token
for the created account. Use it as thegv_duckdns_token
variable inansible-playbook/inventories/default/group_vars/all.yml
- Add a new domain name there and note down it. Use it as the
gv_server_domain_name
variable inansible-playbook/inventories/default/group_vars/all.yml
#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
uid
andgid
- Use user/group mapping when creating the data set in your storage pools
- Use user/group mapping when creating the share. (e.g :
Mapall User
andMapall Group
in TrueNAS). - Update
local_media_uid
andlocal_media_gid
ininventories/default/group_vars/all.yml
accordingly.
- Disable VPN if not needed by seeting
gv_add_vpn_container
to false
- Enable/Disable using
transmission_enable
variable in the role. Enabled by default
- Enable/Disable using
qbittorrent_enable
variable 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.sh
Once 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.sh
cd ansible-playbook
./stop-all.sh
find . -mtime +16 -exec rm -rf {} \;