SwarmUI is designed to be sharable - that is, you can give other people access to your AI Generation capabilities!
There's two "groups of people" you might want to share to:
- 1: Friends and Family. These are people you trust, who you want to be able to play with your fun ai toys too.
- 2: The Public. These are anyone else - maybe it's an open server, maybe it's for a Discord community, maybe it's friends that you just don't trust as much.
Currently, SwarmUI is only validated to be safely usable by Friends and Family. Giving access to The Public is not recommended unless you do your own security validations first. See also the Public Call For Security Researchers announced here.
- You can white/black list model folders, to limit what users see. You can do give different limits to different roles, and different roles to different users.
- Every user has a different image output folder, different presets list, different user settings list, etc.
- There are preconfigured base roles that set things up appropriately for the most common use cases. You can also make your own roles if you want.
- You (the owner or any admin) can freely add or delete users at any time, or modify their settings, or even 'break into' their accounts and access their data.
- Default user accounts have a lot fewer tabs, and notably can't play with custom comfy workflows. This is because it is difficult to perform security validation on the comfy backend.
- Use the 'poweruser' role for trusted friends who need access to the raw comfy workflows.
- Your default account is named
local, so named on the idea of it being the user directly accessing the instance on the same local machine
- Two-Factor Authentication
- Easy account-quick-swapper for admins
- automatic/forced "you must change your password" popup
- Simple tab stable access for non-power-users
- Preset serverwide sharing
- User-local model organization/notes for non-admin users
- User-local wildcards
- Many convenience features for remote users, eg a way to download history as a batch zip
- Convenient user auth session management and bot token interface
- First, go to
Server->Users- Select the User named
local(this is the default user any time you login locally) - Click
Change User Passwordand set it to a password you will remember, and save - Under
Roles, clickUser - Adjust any permissions or settings here for regular users.
- Note for example the Model White/Black List settings - you might want to for example blacklist some model folders that you don't want to share
- Be careful with granting permissions - many of the ones disabled by default are disabled for a reason. For example, comfy permissions can lead to security risks.
- Save the role when you're done.
- Repeat to edit any other roles you want to configure.
- Select the User named
- Then, go to the
Server->Server Configurationtab- Find the
User Authorizationgrouping - Enable
AuthorizationRequired - Optionally disable
AllowLocalhostBypassif you're happy logging in to your own instance with an account - Set your
InstanceTitleto a short simple name for your instance (if your name isBob, maybe your instance isBob's Swarm) - Set your
LoginNoticeto any message to display on the login page (maybeBob's Swarm, for Bob's friends only! Contact @bob on Discord if you forget your login) - Scroll through the server settings list and consider if there's anything else you want to set up while you're at it
- Save the settings
- Find the
- If you disabled
AllowLocalhostBypass, you can now login to thelocalaccount- If you're stuck (can't log in), close SwarmUI, edit the file
Data/Settings.fdsin a text editor, and turnAuthorizationRequiredback tofalse, then relaunch Swarm
- If you're stuck (can't log in), close SwarmUI, edit the file
- Now, figure out your network address
- See Advanced Usage: Accessing SwarmUI From Other Devices
- If you're sharing with family in the same home, the LAN address will do
- Hosting on the open web info is on the doc as well, but be aware that this is not currently recommended.
- Whatever your external accessible URL is, note it down - you'll need to give that address to the others you're sharing with
- See Advanced Usage: Accessing SwarmUI From Other Devices
- Go to
Server->Usersagain- Click
Add User- Set a username as simple plaintext for a user that you want. Keep it simple - no spaces/symbols/etc., and all lowercase
- Set an initial password for the user. Consider using a random text generator to generate a placeholder password. Make sure to keep a copy of the password for the moment.
- Select the Role you want.
- If it's a new account for yourself, use
Owner - If it's someone you want to have server controls, use
Admin - If it's someone you trust to play with eg the Comfy tab and more, use
PowerUser - If it's somebody you don't trust as much or just doesn't need too much access, use
User
- If it's a new account for yourself, use
- Hit
Add - Optionally, go to
Userand logout, then login as the account you created, and check things over to make sure it all makes sense.- If it's a new user, maybe configure user settings or presets or etc. in a way you think might be helpful to them.
- Message the user - tell them the username and password you gave them, and give them the link to the server
- Remind them to change their password immediately after logging in
- If they've never used Swarm before, give them some tips for how to get started! Show them your favorite models and prompting techniques.
- Or, have your friend watch while you operate the UI and do some generations, so they can see how you do it and ask questions.
- Click
- You can enable user registration via the options under Server Configuration.
AllowRegistrationto turn it on, and other checkboxes to configure what registration methods are allowed.- Simple username/password is available.
- Also, Google OAuth is available. Follow https://developers.google.com/identity/protocols/oauth2 for information about how to set this up.
- You can also configure
NewUserDefaultRole(defaults touser) - You should set the
RegisterNoticetext too
- If enabled, when a user goes to login, there's a link to the
/Registerpage they can click to register an account.
- Do you want to test how another user sees your Swarm install? It's easy!
- On the
Servertab thenUserssubtab, click the relevant user, and there's anImpersonate Userbutton - This will reload the page with you fully viewing and operating as that user instead of yourself.
- In the
Usermain tab, there is a button toStop Impersonating- If the User tab is inaccessible, don't worry: just open a fresh copy of the SwarmUI tab, and it will be on your own account again.
- This is tracked by URL, so for example
http://localhost:7801/Text2Image?impersonate=bobmakes you impersonate the userbob - This all of course only works if your real account has the
Manage Userspermission
- On the
- This has a bonus benefit: if you install a personal SwarmUI instance, you can enable the user system to set up separate personal work environments, and then use the Impersonate option to swap between them quickly.
You can hook up someone else's shared SwarmUI instance as a backend in your own Swarm!
(TODO: Explain how to. Need easy way to gen and apply account auth stuff.)