Funkwhale change upload directory

Hey !

Goal

I’m trying to change the default upload directory of funkwhale.
Default directory is : /var/www/funkwhale
I want it to be /mnt/ddiyuno/funkwhale

Solution 1

Actions

I changed the env.prod with :

MEDIA_ROOT=/mnt/ddiyuno/funkwhale/media
MUSIC_DIRECTORY_PATH=/mnt/ddiyuno/funkwhale/import

I changed nginx.conf with :

location /media/ {
        alias /mnt/ddiyuno/funkwhale/media/;
}

location /_protected/media/ {
        # this is an internal location that is used to serve
        # audio files once correct permission / authentication
        # has been checked on API side
        internal;
        alias /mnt/ddiyuno/funkwhale/media/;
}

location /_protected/music/ {
        internal;
        alias   /mnt/ddiyuno/funkwhale/import/;
}

I chown -R funlwhale /mnt/ddiyuno/funkwhale

I reboot

Problem

No effects, when I upload files, they still go in the default folder :s

Solution 2

Create a symlink ln -s /mnt/ddiyuno/funkwhale2/ /var/www/funkwhale

Problem

Seems like symlink aren’t supported because I have a error message of funkwhale-server service :

File “/var/www/funkwhale/code/virtualenv/lib/python3.5/site-packages/celery/utils/imports.py”, line 61, in cwd_in_path
cwd = os.getcwd()
FileNotFoundError: [Errno 2] No such file or directory

Final solution working

You have to create a symlink with the import and media folder but not for the source folder. I had to reinstall funkwhale.
Don’t forget to chown the target directory.

Thanks for this solution but can you explain a bit more what did you change finally.
did you change nginx configuration or not with symlink solution?

I didn’t change anything. The nginx config is the same since the file still look as they are in /var/www/funkwhale. I just created a symlink.

I don’t understand why the solution 1 (using nginx) didn’t work

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.