Rpi3, mono docker install, self hosting your own domain name


#1

Folks,

I am looking for help. So I have numerous raspberry Pi’s sitting behind an ASUS DSL-AC68U router running Asuswrt Merlin (2018 f/w) along with a Synology DS416play. i am looking to setup a funkwhale instance on a rpi3 running Raspbian Stretch (Debian 9) using the mono docker image put together by the excellent (https://github.com/thetarkus/docker-funkwhale).

To date I have used funkwhale in my lan env. which means all references to the hostname have been to a local IP address (lets say 192.168.1.196). It is time to break out and get this on the net.

I have purchased a domain name (australian based - who cares) and now want to setup my funkwhale instance using the domain name or a subdomain (preferably).

So I would like to understand what needs to happen next.

I dont have a static IP so need to use DDNS.
Numerous DDNS services out there. Which one is best or is the question asked correctly?
Do I use the Router , Synology or rpi3 to host the DDNS? At a guess I’d say use the Asus router as it sits on the edge of my network!

I have setup external access to my Synology using their DDNS ie xxx.synology.me. can I use this to incorporate my own domain name (drtc.com.au).

The domain was purchased from ventraip.com.au so I will need to modify its DNS settings to point to domain to my public IP address.

In order to gain external access I will need to setup the funkwhale nginx reverse proxy (that info is readily available via - https://dev.funkwhale.audio/funkwhale/funkwhale/tree/develop/docs/installation) on the rpi3.

My dark knowledge spots surround everything else.

Be aware I have funkwhale v 0.18.1 up and running on my rpi3 on IP 192.168.1.196:5000.

help !!!


#2

Ok, the first thing to do is to have your DDNS setup working (your domain name pointing to your rpi machine, reachable from the outside world).

Once you have that, you’ll be able to generate SSL certs via Let’s encrypt, setup your reverse proxy and join the federation.

Unfortunately, I don’t have many experience with DDNS, especially with a custom domain. In theory, you’d probably have some kind of script running on your RPI every now and then, and automatically update your DNS record if your IP address changed. The implementation details would likely depend of your domain name provider.

You may want to have a look at https://www.reddit.com/r/selfhosted/comments/4lkeoc/dynamic_dns_with_my_own_domain_name/ for some ideas. Especially, https://dns.he.net/ looks interesting to act as a DDNS provider, but I did not dig into the details.

Good luck, and let us know how things are going :slight_smile:


#3

Thanks Eliot…will get to it over the weekend.


#4

Eliot,

Decide to purchase a domain name …really cheap… from namecheap…$2 . - www.drtc.xyz
signed up for a digitalocean droplet for $5 per month.

Setup up DNS, OS, Nginx, SSL, etc… all working.

Installed docker and followed your instructions and managed to get drtc.xyz:5000 up and running and imported a few large files and play music. - version 0.18.1

I can reach https://drtc.xyz port 80 but get this error when trying https://drtc.xyz:5000

No errors from - docker logs -f --tail=50 funkwhale
No errors from - tail -f /var/log/nginx/error.log

here is my .env

FUNKWHALE_HOSTNAME=drtc.xyz
FUNKWHALE_PROTOCOL=https
IDJANGO_SECRET_KEY=69ed49c53fe3df29ea97e1f2d1378fxxxxx
FUNKWHALE_SPA_HTML_ROOT=http://localhost/front/

What config files can I provide to help troubleshoot this issue?

This my funkwhale.conf;

upstream fw {
    # depending on your setup, you may want to update this
    server www.drtc.xyz:5000;
}
map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}

server {
    listen 80;
    listen [::]:80;
    server_name drtc.xyz;
    #return 301 https://drtc.xyz
    location / { return 301 https://$host$request_uri; }
}
server {
    listen      443 ssl;
    listen [::]:443 ssl;
    server_name drtc.xyz;

    # TLS
    ssl_protocols TLSv1.2;
    ssl_ciphers HIGH:!MEDIUM:!LOW:!aNULL:!NULL:!SHA;
    ssl_prefer_server_ciphers on;
    ssl_session_cache shared:SSL:10m;
    ssl_certificate     /etc/letsencrypt/live/drtc.xyz/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/drtc.xyz/privkey.pem;

    # HSTS
    add_header Strict-Transport-Security "max-age=31536000";

    # compression settings
    gzip on;
    gzip_comp_level    5;
    gzip_min_length    256;
    gzip_proxied       any;
    gzip_vary          on;

    gzip_types
        application/javascript
        application/vnd.geo+json
        application/vnd.ms-fontobject
        application/x-font-ttf
        application/x-web-app-manifest+json
        font/opentype
        image/bmp
        image/svg+xml
        image/x-icon
        text/cache-manifest
        text/css
        text/plain
        text/vcard
        text/vnd.rim.location.xloc
        text/vtt
        text/x-component
        text/x-cross-domain-policy;

    location / {
        include /etc/nginx/funkwhale_proxy.conf;
        #client_max_body_size ${NGINX_MAX_BODY_SIZE};
        client_max_body_size 100M;
        proxy_pass   http://fw/;
    }
}

Screenshot%20(80)|690x388


#5

Don’t know why…but this https address works… https://drtc.xyz/library/...but why? Some nginx config issues I guess but what.

I’m in the land of https…with a hosted funkwhale server and it ain’t even the weekend. Sweet.


#6

If https://drtc.xyz/ works ok, I’m not sure what’s wrong then? :smiley: