Custom URL with MusicBrainz Docker

I have MusicBrainz Docker up and running perfectly.
I edited the .env file and added the following line:
MUSICBRAINZ_WEB_SERVER_HOST=172.16.0.10

This allows me to access locally at http://172.16.0.10:5000 with absolutely no issues at all.

My questions is, what adjustments would be needed to access it with a custom url (i.e. musicbrainz.myurl.com) behind nginx reverse proxy? I have MANY other services running behind nginx with no issues at all but I cannot get MusicBrainz to display css correctly

I tried editing the .env file with MUSICBRAINZ_WEB_SERVER_HOST=musicbrainz.myurl.com but this does not work. It seems to reference https://musicbrainz.myurl.com:5000

I cannot figure out how to have MusicBrainz remove the reference to port 5000 in the URL

Are there any additional edits that I need to make to the .env file to strip Port 5000 from the url?

Does anyone have any suggestions?

Hi,

Port number could not be hidden without dealing with configuration in DBDefs.pm directly. I just opened a patch to address that, it will just drop inconvenient :80 and :443 from base URL:

1 Like

@yvanzo, that seemed to do the trick! I manually added your changes to the DBDefs.pm file.

I then edited the .env file with the following changes:
MUSICBRAINZ_WEB_SERVER_HOST=musicbrainz.myurl.com
MUSICBRAINZ_WEB_SERVER_PORT=80

Now, I can access everything perfectly at http://172.16.0.10 or https://musicbrainz.myurl.com

Thank You!

3 Likes

You can simply set HOST and omit PORT completely, as 80 is the default value.
It worked for me.

[quote=“jesus2099, post:4, topic:514402”]
You can simply set HOST and omit PORT completely, as 80 is the default value.
It worked for me.[/quote]

@jesus2099: The default port number is 5000. Might it be you made local changes to the file build/musicbrainz/DBDefs.pm?

Sorry Yvanzo, maybe yes, but I don’t remember.
And my very old PC is now broken.