If you have open registration you should reduce the account creation rate.
If you have open registration you should reduce the account creation rate.
Sure, depends on what you want to do, that’s just the command I used to purge unverified accounts. My instance doesn’t really have any users so not a big deal.
Yeah, unless you are deleting hundreds of users you can’t really tell, but I deleted 6k+ bots and can confirm user count automatically updates.
Don’t delete from the local_user table. You only need to delete from the person table, the rest of the tables will be updated automatically and user count will update automatically.
Edit: The below command will delete all unverified users. NOTE: If you do not have email verification turned on then all users are unverified, therefore all users will be deleted. It also appears with v18 when you enable email verification all existing users remain unverified.
This is a destructive command, use at your own risk and don’t go fucking with the database if you don’t have backups.
DELETE FROM person WHERE local = 'true' AND id IN (SELECT person_id FROM local_user WHERE email_verified = 'false');
In the parenthesis you can add your AND to only select unverified accounts of a certain age.
Yes, person table is top level. Delete from person table and it cascades down and deletes from other tables. User count also automatically updates. Just be careful because person table also contains federated users. There is a “local” column to determine if they are local users or not.
I had about 6k bot accounts, but they were all unverified, so I just deleted all local unverified accounts from the person table.
Just don’t go messing with the database without backups. My host supports snapshots so I did a quick snapshot before messing with anything.
I still think instances should be largely region based, which is why I started one for Colorado. As far as sharing it I’m not really sure either other than spamming it everywhere (which I also don’t want to do). Instance discovery kind of sucks, you can’t even search on the main join Lemmy page.
Looks like my instance got hit with a bot. I had email verification enabled but had missed turning on captcha (captcha enable should be up with enabling email verification settings). The bot used fake emails so none of the accounts are verified, but still goes towards account numbers. Is there really any good way to clean this up? Need a way to purge unverified accounts or something.
Assuming you don’t want to expose these services directly to the internet (I don’t recommend it) then you want to set up a VPN to connect back to your home network. Wireguard or OpenVPN are the most commonly used. As far as guides that will depend where/how you want to run it.
For large instances pictures is probably the bigger consumer of space, but for small instances the database size is the bigger issue because of federation. Also, mass storage for media is cheap, fast storage for databases is not. With my host I can get 1TB of object storage for $5 a month. Attached NVMe storage is $1 per month per 10 GB.
For my small instance the database is almost 4x as large as pictrs, and growing fast.