Thread
#prefect-server
    p

    Prasanth Kothuri

    9 months ago
    I enabled slack notification on prefect flows, I receive notification when the state changes which is perfectly fine, however the link there points to localhost:8080 how do I properly link so that when some clicks they can go to that task run ? thanks
    <http://localhost:8080/default/task-run/bcb01c03-6507-40c3-8c31-c2a0a37a9868>
    Anna Geller

    Anna Geller

    9 months ago
    how did you start your Server? you can set the Server host in your config.toml and use the --expose flag when starting Server to ensure it will be exposed to all services
    p

    Prasanth Kothuri

    9 months ago
    I started the server with expose flag and I can access the UI at
    <http://my_host:8080>
    it is only the links in the slack notifications that are pointing to
    localhost:8080
    which variable/parameter I need to set ?
    Anna Geller

    Anna Geller

    9 months ago
    in that case maybe you can adjust it directly in your state handler?
    Amanda Wee

    Amanda Wee

    9 months ago
    I think I had a similiar problem and solved it by setting the environment variable
    PREFECT__SERVER__UI__HOST
    If you look at the code, the
    base_url
    in the
    Client
    get_cloud_url
    method takes
    prefect.config.server.ui.endpoint
    when not using Prefect Cloud, and the slack formatter calls that method, so the environment variable I mentioned sounds correct.