8

I have installed luigi by pip command and I would like to change the port for the web UI. I tried to find the config file but I couldn't. Do I need to create one?

Iamasupernoob
  • 83
  • 1
  • 4

2 Answers2

10

You can start luigid with the --port option.

luigid --port 80

Configuration file locations are:

  • /etc/luigi/luigi.cfg
  • luigi.cfg (or its legacy name client.cfg) in your current working directory
  • LUIGI_CONFIG_PATH environment variable

in increasing order of preference. You do need to create one. e.g.,

[core]
default-scheduler-host=www.example.com
default-scheduler-port=8088
MattMcKnight
  • 8,185
  • 28
  • 35
  • On Windows, the first configuration filepath is not global, but relative to the drive letter. For instance, if your current directory is `W:\abc\xyz`, then the 1st config file location is `W:\etc\luigi\luigi.cfg`. – cowlinator Mar 17 '21 at 01:42
2

In spite of the documentation saying otherwise, the port configuration from the config file is not used, at least in some versions or some circumstances

Until this is resolved, you should always use the --port option of luigid:

luigid --port 12345

Also see https://github.com/spotify/luigi/issues/2235

For other configuration options a config file should be used. See https://luigi.readthedocs.io/en/stable/configuration.html

For a configuration global to the host you can create a file:

/etc/luigi/luigi.cfg

Make sure it is readable by the user that runs luigid and luig.

Alternatively a local configuration file that will be recognized is

luigi.cfg

which you would have to create in the current working directory.

If you want a custom config file location you could set the environment variable LUIGI_CONFIG_PATH to the full path of your config file.

mit
  • 11,083
  • 11
  • 50
  • 74