FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login
    1. Home
    2. Tags
    3. kickstart
    Log in to post
    • All categories
    • F

      Solved How to quickly delete all users in a tenant for frequent test environment resets?

      Frequently Asked Questions (FAQ)
      • bulk-delete tenant migration docker kickstart • • FASupportBot
      2
      0
      Votes
      2
      Posts
      137
      Views

      F

      For frequent, large-scale user resets in test environments, deleting and recreating the tenant is the recommended approach over bulk user deletion. While there's no "near-instant" bulk deletion method, tenant recreation is significantly faster than iterative bulk deletes at scale.

      Key Points About Bulk Delete Delete Users by Query is driven by the search index (specifically Elasticsearch). The queryString parameter has limited support when using the database as the search engine (only simple single-term searches on basic fields like firstName, lastName, fullName, email, and username). CloudFront has a 30-second timeout for origin responses, which explains the 504 errors you're seeing The delete operation likely continues on the FusionAuth side even after CloudFront terminates the connection, making retries risky Recommended Approach: Tenant Delete/Recreate

      For test environments with large user populations, follow this workflow:

      Cannot delete the Default tenant — the default tenant contains the FusionAuth application and cannot be deleted. Create separate tenants for testing purposes. Delete the test tenant when ready to reset using the admin UI or the Delete Tenant API. This will permanently delete all users, applications, and groups belonging to that tenant. Use docker compose down -v to fully clean the environment Use docker compose up -d to restart Use Kickstart to automatically recreate tenants, applications, and API keys

      Kickstart will only run on an empty instance, so the down -v step is necessary. Configure a Kickstart file with your test environment configuration (tenants, applications, API keys) for reproducible deployments.

      Note that tenant deletion is an asynchronous operation (as of FusionAuth 1.22), meaning it runs in the background. For very large tenants (2M users), this will still take time but is considerably faster than bulk deleting millions of users through the API.

      Note on Import Timeouts

      If you're also seeing CloudFront timeouts during large batch imports (e.g., 100k users), the same 30-second CloudFront limit applies. Consider reducing batch sizes when users have multiple registrations, as each registration inserts additional rows into related tables (registrations, application role mappings, etc.), significantly increasing processing time. For best import performance, minimize network hops and consider setting validateDbConstraints to false.

      Related Documentation Delete Tenant API - API for permanently deleting a tenant and all its users Bulk Delete Users API - API for deleting users by query, with limitations noted for search engine configuration Kickstart - Declarative tool for quickly replicating environments Clean Up Test Environments - Migration guide with recommendations for test tenant cleanup How to Delete Users After Testing a Migration - Documentation on fastest methods for removing test users Asynchronous Tenant Deletion - Background on how tenant deletion works asynchronously Import Users API - Bulk import API documentation Performance Tips for Migrations - Best practices for importing large numbers of users
    • P

      Unsolved How should I be using the kickstart.success webhook?

      Q&A
      • kickstart webhook startup ci cd docker-compose • • Pyroseza
      2
      0
      Votes
      2
      Posts
      4.5k
      Views

      danD

      @pyroseza

      So it sounds like you're trying to figure out a way to know when FusionAuth has completed startup.

      The webhook is one way to do that. As you said, you can set up a kickstart event webhook within a kickstart file.

      Another way is to poll for a known value, such as a non-default tenant that you know your setup has added. That may be a simpler solution for you.

      Either way, you'll have to write some code to kick off the testing once you receive a signal that FusionAuth is ready.

      I personally would have preferred if there was an API endpoint I could query is to whether or not the kickstart has completed successfully, but instead we were given a webhook and I'm not quite sure how I should be using it.

      You'll need to write a webhook receiver that will kick off your tests (or whatever the next step of your testing setup is). I'm not quite sure how do that in one github action, but it should be pretty easy to split up a github action into two actions, a setup one (where you set everything up, including FusionAuth) and a test action (which you kick off in response to the FusionAuth webhook firing).

      I think you'd want the workflow_call event: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_call

    • danD

      Can I run kickstart manually?

      Q&A
      • kickstart • • dan
      2
      0
      Votes
      2
      Posts
      2.3k
      Views

      danD

      No, Kickstart must be run on a pristine system. Please feel free to file an issue suggesting that functionality, though: https://github.com/fusionauth/fusionauth-issues/issues.

    • H

      Unsolved Using Kickstart - only the first API Key is created

      Q&A
      • kickstart api keys • • hd_steve
      3
      0
      Votes
      3
      Posts
      6.5k
      Views

      danD

      @hd_steve did you get this resolved?

    • danD

      How can you use kickstart with docker

      Q&A
      • docker kickstart • • dan
      2
      0
      Votes
      2
      Posts
      4.7k
      Views

      danD

      Check out the official documentation on using Docker + Kickstart.

    • danD

      Kickstart and lambdas and newlines

      Q&A
      • kickstart lambda • • dan
      2
      0
      Votes
      2
      Posts
      3.0k
      Views

      danD

      Can you use an include for the function body? For example: (where myLambda.ftl is your Lambda function in a folder named lambdas)

      "lambda":{ "body": "@{lambdas/myLambda.ftl}", }

      That should preserve your line returns if you include it that way. Hope that helps!

    • danD

      envt vars in kickstart files

      Q&A
      • kickstart environment var • • dan
      2
      0
      Votes
      2
      Posts
      2.1k
      Views

      danD

      Yes, any variable defined in kickstart can be used in any of the includes.

    • danD

      Solved Does the instance need to be completely empty for kickstart to run?

      Q&A
      • kickstart setup • • dan
      2
      0
      Votes
      2
      Posts
      6.5k
      Views

      danD

      Yup.

      Kickstart is intended to build the system up from scratch.

      We check for API keys, users, and a few other things to ensure we can start with a clean slate.

      If you already have an API key configured, you can also just script a set of API calls on your end as well. This is more/less what kickstart does.

      From the Kickstart docs:

      Kickstart will only run if no API keys, users or tenants exist, so you can safely leave this environment variable configured even after the system has been configured.

    • danD

      Solved When using kickstart are there any email templates included?

      Q&A
      • kickstart email templates • • dan
      2
      0
      Votes
      2
      Posts
      2.8k
      Views

      danD

      Kickstart does not load any templates by default. You will need to create any template you’d like in your initial configuration.

      Outside of kickstart we do build some default templates. In Kickstart, no templates.

      Here's the email templates we ship with if you want to add them to your Kickstart: https://fusionauth.io/docs/v1/tech/email-templates/email-templates#templates-replacement-variables

    • danD

      Solved Can you store off fusionauth config in a file?

      Q&A
      • development kickstart environments • • dan
      2
      0
      Votes
      2
      Posts
      5.5k
      Views

      danD

      You could look at kickstart: https://fusionauth.io/docs/v1/tech/installation-guide/kickstart

      Kickstart only works if the other devs' fusionauth instances are going to be starting from scratch.

      Otherwise you might want to vote for https://github.com/FusionAuth/fusionauth-issues/issues/560

    • danD

      What is Kickstart?

      Q&A
      • kickstart faq • • dan
      1
      0
      Votes
      1
      Posts
      8.4k
      Views

      No one has replied