Help to get Funkhwale installed


#1

Hello

I heard great things about Funkhwale so I would like to test it. If you are a developer or have plenty of experience it’s supposed to be quite easy to install funkwhale following this guide: https://docs.funkwhale.audio/installation/docker.html

However many of us aren’t that good despite using linux computer for a while and being real geeks so it would be nice to have some additional support :slight_smile:

I got a dedicated server with no domain name associated to it, which means that I access all the apps installed on it using http://ipaddress:port

Docket is already installed. I tried to install it following the guide but I can’t go further “docker-compose pull”

I assume that I need to edit the files .env & docker-compose.yml but I’m obviously doing something wrong… Either that or I miss some dependencies:

https://pastebin.com/raw/YyqjYdwx

I would appreciate some help as I tried countless times but can’t go past there…


#2

Hi there!

I think you have a really old version of docker-compose leading in this error. Can you try updating your docker-compose version by running

`

curl -L https://github.com/docker/compose/releases/download/1.23.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

(Just in case you ask, this come from docker-compose installation instructions at https://github.com/docker/compose/releases)

And retry?

For the IP:port stuff, this should work using your ip:port instead of domain name at https://code.eliotberriot.com/funkwhale/funkwhale/blob/develop/deploy/env.prod.sample#L41. You should now that federation won’t work without a real domain name though :wink:

Let me know how it goes!


#3

Thanks! I updated docker and now I could complete the first part of the installation but I don’t have and can’t still nginx as I already have docker running on that port with plex, sonarr, airsonic and similar stuff (I already tried but nginx doesn’t finish the installation because of port 80 is already in use by docker)

I’m using Traefik (from plexguide.com) which I don’t know if it’s a substitue of nginx/apache2 or just a complementary thing.

Do you mind to verify that my .env file was done correctly?

FUNKWHALE_VERSION=0.17
FUNKWHALE_API_IP=127.0.0.1
FUNKWHALE_API_PORT=5000
FUNKWHALE_HOSTNAME=mywebsite.com
FUNKWHALE_PROTOCOL=https
REVERSE_PROXY_TYPE=nginx
MEDIA_ROOT=/srv/funkwhale/data/media
STATIC_ROOT=/srv/funkwhale/data/static
DJANGO_ALLOWED_HOSTS=funkwhale.mywebsite.com
DJANGO_SETTINGS_MODULE=config.settings.production
DJANGO_SECRET_KEY=FICTICIOUSKEYFICTICIOUSKEYFICTICIOUSKEYFICTICIOUSKEYFICTICIOUSKEY
RAVEN_ENABLED=false
RAVEN_DSN=https://44332e9fdd3d42879c7d35bf8562c6a4:[email protected]/5
MUSIC_DIRECTORY_PATH=/srv/funkwhale/data/music
MUSIC_DIRECTORY_SERVE_PATH=/srv/funkwhale/data/music
FUNKWHALE_FRONTEND_PATH=/srv/funkwhale/front/dist
NGINX_MAX_BODY_SIZE=30M

Considering that I have Traefik should I have edited something differently above?
If above file is correct then what should I do next considering that I can’t install nginx with apt install nginx


#4

You env file looks good. I know that someone successfully used Funkwhale with a traefik proxy, here is the discussion: https://code.eliotberriot.com/funkwhale/funkwhale/issues/485

I think proxying request from traefik to the nginx container should be enough, so I’d probably give it a try :slight_smile:


#5

I was able to install all the dockers related to it but I couldn’t make it running.

I wonder if it’s because I couldn’t install Nginx (Apache is already running on port 80) or because I already have Traefik installed via docker

Just a quick question. Is it ok to have the following?

FUNKWHALE_HOSTNAME=mywebsite.com
DJANGO_ALLOWED_HOSTS=funkwhale.mywebsite.com

Shouldn’t both be the exact same URL?


#6

Can you please elaborate when you say “could not make it running”? Do you have some error somewhere, does the web browser hangs, display a blank page, something else?

You should have the same value in FUNKWHALE_HOSTNAME and DJANGO_ALLOWED_HOSTS (which is confusing and a bit redundant, I agree, this will probably be removed soon)


#7

Sorry I was on holidays so I didn’t reply to your last comment:

Following this guide: https://docs.funkwhale.audio/installation/docker.html I manage to get all the containers running (at least that’s what portainer says) but I can’t access to any Funkwhale UI. I guess that the reason for that it’s because I can’t install Nginx (when I try it fails and the reason seems to be that the port 80 being used by dockerd).

So I tried an alternative solution (docker with traefik) but something similar happens… Portainer says that the containers are running but Traefik was already installed on my machine so I assume generates conflicts and doesn’t work…

I’m sure that some people already installed Funkwhale on computers where they already had docker running and using the port 80, but I’m totally clueless

I really want to use funkwhale (airsonic use too much resources and the ugly isn’t great) but I’m stuck…


#8

It looks like your port 80 is already occupied by another container/process. Ideally, you should be able to plug Funkwhale behind that process, but it’s a bit hard to debug without knowing what is occupying the port :confused:


#9

“netstat -tulpn | grep :80” show that it’s dockers

To be more precise I think it could be Traefik container


#10

Then you’ll have to update your traefik server to proxy traffic to Funkwhale when needed. Unfortunately, I cannot really help you with that, because your setup looks really custom. Why is that container running on port 80 ? Have you deployed other services on the same machine?


#11

Yes my setup is custom form the plexguide.com installer.

“netstat -tulpn | grep :80” doesn’t mention which contained in particular is using the port 80:
tcp6 0 0 :::8096 :::* LISTEN 31863/docker-proxy

In portainer I can only see this in regards to port 80:

But even after stoping PGBlitz and Traefik containers the command mentioned above still reports that Nginx is being used by port 80…


#12

@eliotberriot i just deployed the container once again following the official instructions of your site, but now it made one small change in the .env file.
I changed this:
FUNKWHALE_API_IP=127.0.0.1
to this:
FUNKWHALE_API_IP=0.0.0.0

And for the same time ever a funkwhale webpage is loading myserverip:5000

Nothing is loading at my domain:5000 but i suppose that’s because it don’t have Nginx installed (and unfortunately I don’t know how to link funkwhale to my already existing Traefik container)


#13

By doing FUNKWHALE_API_IP=0.0.0.0, youa re exposing the API server directly to the outside world, which is not a good idea from a security standpoint. Since you already have a traefik acting as a reverse proxy on this server, you should revert 0.0.0.0 to 127.0.0.1 and update your traefik container config and make it serve Funkwhale as well. This is the best solution because it will integrate with your setup.

To achieve that, you’ll need to edit Funkwhale’s docker compose:

services:
  # other services
  nginx:
    # nginx configuration
    labels: 
      - traefik.enable=true
      - traefik.backend=${FUNKWHALE_HOSTNAME}
      - traefik.frontend.rule=Host:${FUNKWHALE_HOSTNAME}
      - traefik.docker.network=proxy
      - traefik.port=80

This may be enough for traefik to pick up Funkwhale’s container and serve them. Feel free to share the content of your traefik.toml so we can have a look :slight_smile:


#14

I managed to install nginx and now Funkwhale is working. However I’m not sure if the official docker installaton documentation is correct.

Is funkwhale_proxy.conf supposed to be in /etc/nginx and not inside /etc/nginx/conf.d?


#15

Yeah, it may be better in conf.d, but not all versions of nginx have this directory created by default. You can put it there if you want, you’ll have to update the included path in the vhost file :slight_smile: