GitHub user dosubot[bot] added a comment to the discussion: Public permalink
<!-- Answer --> Yes, it is safe to run superset init—this is a standard command used to initialize or upgrade Superset, and it does not drop or reset your database. It updates permissions and synchronizes roles according to your current configuration. In production, best practice is to back up your metadata database and, if possible, test changes in staging first, but superset init itself is part of the official setup and upgrade workflows and is routinely used in production environments [(source)](https://github.com/apache/superset/discussions/37261). The difference between AUTH_ROLE_PUBLIC and PUBLIC_ROLE_LIKE is: - AUTH_ROLE_PUBLIC sets the name of the public (anonymous) role—usually "Public". This is the role assigned to users who are not logged in. - PUBLIC_ROLE_LIKE tells Superset to copy permissions from a built-in role (like "Public" or "Gamma") to the public role during initialization (when you run superset init). This is what actually gives anonymous users the ability to view dashboards, charts, etc. If you don’t set PUBLIC_ROLE_LIKE, the public role will be empty after superset init, and anonymous users will always be redirected to login—even if you manually assign permissions, because those are overwritten during initialization [(source)](https://github.com/apache/superset/blob/master/superset/config.py#L349-L372). So, for public dashboard access, you need both: AUTH_ROLE_PUBLIC = "Public" to define the role, and PUBLIC_ROLE_LIKE = "Public" (or "Gamma") to grant it the necessary permissions. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/32aa6ad8-8f89-46b4-99f4-ebfc77f33807?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/32aa6ad8-8f89-46b4-99f4-ebfc77f33807?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/32aa6ad8-8f89-46b4-99f4-ebfc77f33807?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/32aa6ad8-8f89-46b4-99f4-ebfc77f33807?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/32aa6ad8-8f89-46b4-99f4-ebfc77f33807?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/32aa6ad8-8f89-46b4-99f4-ebfc77f33807?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/32aa6ad8-8f89-46b4-99f4-ebfc77f33807?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=Yes%2C%20it%20is%20safe%20to%20run%20superset%20init%E2%80%94this%20is%20a%20standard%20command%20used%20to%20initialize%20or%20upgrade%20Superset%2C%20and%20it%20does%20not%20drop%20or%20reset%20your%20database.%20It%20updates%20permissions%20and%20synchronizes%20roles%20according%20to%20your%20current%20configuration.%20In%20production%2C%20best%20practice%20is%20to%20back%20up%20your%20metadata%20database%20and%2C%20if%20possible%2C%20test%20changes%20in%20staging%20first%2C%20but%20superset%20init%20itself%20is%20part%20of%20the%20official%20setup%20and%20upgrade%20workflows%20and%20is%20routinely%20used%20in%20production%20environments%20%5B%28source%29%5D%28https%3A//github.com/apache/superset/discussions/37261%29.%0A%0AThe%20difference%20betwee n%20AUTH_ROLE_PUBLIC%20and%20PUBLIC_ROLE_LIKE%20is%3A%0A%0A-%20AUTH_ROLE_PUBLIC%20sets%20the%20name%20of%20the%20public%20%28anonymous%29%20role%E2%80%94usually%20%22Public%22.%20This%20is%20the%20role%20assigned%20to%20users%20who%20are%20not%20logged%20in.%0A-%20PUBLIC_ROLE_LIKE%20tells%20Superset%20to%20copy%20permissions%20from%20a%20built-in%20role%20%28like%20%22Public%22%20or%20%22Gamma%22%29%20to%20the%20public%20role%20during%20initialization%20%28when%20you%20run%20superset%20init%29.%20This%20is%20what%20actually%20gives%20anonymous%20users%20the%20ability%20to%20view%20dashboards%2C%20charts%2C%20etc.%20If%20you%20don%E2%80%99t%20set%20PUBLIC_ROLE_LIKE%2C%20the%20public%20role%20will%20be%20empty%20after%20superset%20init%2C%20and%20anonymous%20users%20will%20always%20be%20redirected%20to%20login%E2%80%94even%20if%20you%20manually%20assign%20permissions%2C%20because%20those%20are%20overwritten%20during%20initialization%20%5B%28source%29%5D%28https%3A//github.com/apache/s uperset/blob/master/superset/config.py%23L349-L372%29.%0A%0ASo%2C%20for%20public%20dashboard%20access%2C%20you%20need%20both%3A%20AUTH_ROLE_PUBLIC%20%3D%20%22Public%22%20to%20define%20the%20role%2C%20and%20PUBLIC_ROLE_LIKE%20%3D%20%22Public%22%20%28or%20%22Gamma%22%29%20to%20grant%20it%20the%20necessary%20permissions.) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/37641) GitHub link: https://github.com/apache/superset/discussions/37641#discussioncomment-15686001 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
