this post was submitted on 02 Feb 2025
15 points (94.1% liked)

Lemmy Support

4743 readers
25 users here now

Support / questions about Lemmy.

Matrix Space: #lemmy-space

founded 5 years ago
MODERATORS
 

Solution

The Lemmy server appears to have a database limit of 255 characters ^[2]^; however, individual instances appear to put their own limits on username length though the frontend ^[3]^ and/or the API ^[4.1][4.2]^.

Original Post

If you know, please also provide relevant documentation.

UPDATE (2025-02-02T06:06Z): I did some brute-force testing, and, at least for sh.itjust.works, it seems that the maximum username length is 50, and the maximum password length is 60 ^[1]^.


References

  1. "Sign Up". sh.itjust.works. Lemmy. Accessed: 2025-02-02T08:49Z. https://sh.itjust.works/signup.
    • When creating an account on sh.itjust.works, the sign-up form will throw this error if the provided password is greater than 60 characters in length.
  2. @[email protected] To: ["[SOLVED] What is the maximum username length for a Lemmy account?". "Kalcifer" @[email protected]. "Lemmy Support" [email protected]. sh.itjust.works. Lemmy. Published: 2025-02-03T00:54:51Z. https://sh.itjust.works/post/32085936.]. Published: 2025-02-02T05:57:26Z. Accessed: 2025-02-03T00:44Z. https://sh.itjust.works/post/32085936/16442382.

    It might be 255 characters? […]

    • They pointed to code on GitHub for the Lemmy server which outlines the length of the username data in the SQL database.
  3. "[SOLVED] What is the maximum username length for a Lemmy account?". "Kalcifer" @[email protected]. "Lemmy Support" [email protected]. sh.itjust.works. Lemmy. Published: 2025-02-03T00:54:51Z. Accessed: 2025-02-03T00:46Z. https://sh.itjust.works/post/32085936.
    • §"Original Post". ¶2.

      […] I did some brute-force testing, and, at least for sh.itjust.works, it seems that the maximum username length is 50 […]

      • The maximum username length for sh.itjust.works was found to be 50 characters by brute-force testing the length limit.
  4. "Andrew" @andrew_[email protected] To ["[SOLVED] What is the maximum username length for a Lemmy account?". "Kalcifer" @[email protected]. "Lemmy Support" [email protected]. sh.itjust.works. Lemmy. Published: 2025-02-03T00:54:51Z. https://sh.itjust.works/post/32085936.] Published: 2025-02-02T19:57:49Z. Accessed: 2025-02-03T00:59Z. https://sh.itjust.works/post/32085936/16453656.
    1. curl -L http://lemmy.world/api/v3/site | jq -r .site_view.local_site.actor_name_max_length (26)

      • The maximum username length for Lemmy.world was found to be 26 characters via an API request.
    2. curl -L http://sh.itjust.works/api/v3/site | jq -r .site_view.local_site.actor_name_max_length (50)

      • The maximum username length for sh.itjust.works was found to be 50 characters via an API request.
you are viewing a single comment's thread
view the rest of the comments
[–] Kalcifer 1 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

You’ve accepted […] one link to a years-old migration as [an] answer,

[…] as that migration shows […]

I'm not sure what you are referring by "migration". Could you clarify?

[–] [email protected] 1 points 3 weeks ago (1 children)

TootSweet's link was to a migration. A migration is used to upgrade a database's schema - changing the limit on username length from whatever it was, to 255. As it happens, it's still 255 now, but an upgrade from 3 years ago isn't a good source for that, because as they themselves said, there could very well have been been upgrades since, that further changed the limit.

[–] Kalcifer 1 points 3 weeks ago

Noted! Thank you for clarifying 😊 Perhaps this link that you provided in another comment ^[1]^ would be more accurate to what the server does now?

References

  1. Post: Title: "[SOLVED] What is the maximum username length for a Lemmy account?". Author: "Kalcifer" @[email protected]. "Lemmy Support" [email protected]. sh.itjust.works. Lemmy. Published: 2025-02-02T05:21:56Z. URI: https://sh.itjust.works/post/32085936/16502878.