Custom config.yaml file when starting pywb?

Hey all, I am looking to launch a pywb instance with a custom configuration yaml file that is located in a different place that the current directory. I haven’t found a way to do this in the documentation. Does this feature exist as a command line parameter, or is only possible to use d to point at a directory?

Is it recommended to set the PYWB_CONFIG_FILE environment variable?

i deploy pywb with docker compose using PYWB_CONFIG_FILE

version: "3"
      image: webrecorder/pywb
      - PYWB_CONFIG_FILE=/conf/config.yaml
      - ./archive:/webarchive
      - ./conf:/conf
      - ./conf/uwsgi.ini:/uwsgi/uwsgi.ini
      - "9999:8080"

in ./conf/uwsgi.ini i’ve removed the env conf

1 Like

Thank you that’s the way to do it indeed.
For future visitors of this topic:
You might want to use the -d parameter for setting the base directory instead of just the config file if you’re using the proxy feature. Starting pywb in proxy mode will generate a directory that holds the certificate file in the base directory, which is just the current path unless you specify another path via this option.

1 Like