First Admin Account Setup
This guide will help you create your first admin account to get started with the University Inventory Management System.
Development Access (Instant Setup)
For Development/Testing Only:
If you’re in development mode, you can use the automatic admin override:
Development Admin Credentials:
Email:
dev@admin.localPassword: Not required (automatic login)
Access Level: Full Admin
Status: Active when
DEV_ADMIN_OVERRIDE=true
To Enable:
# Add to your .env file
DEV_ADMIN_OVERRIDE=true
NODE_ENV=development
This gives you immediate access to all features without any setup!
Production Setup (Database Required)
Step 1: Access Your Database
Connect to your PostgreSQL database using one of these methods:
Using psql command line:
psql $DATABASE_URL
Using database GUI tools:
pgAdmin, DBeaver, or TablePlus
Connect using your DATABASE_URL credentials
Step 2: Create the Admin Account
Copy and paste this SQL command, replacing the email with your desired admin email:
INSERT INTO users (
id,
email,
password_hash,
first_name,
last_name,
role,
is_active,
must_change_password
) VALUES (
'admin_' || extract(epoch from now())::text,
'admin@your-university.edu', -- Change this to your email
'$2b$12$LQv3c1yqBwEHxv5hSyHKdOCOFUTp9.7bAD0EzHkzUl9r7XZ8Kcqoe',
'System',
'Administrator',
'admin',
true,
true
);
Default Login Credentials:
Email:
admin@your-university.edu(or whatever you set)Password:
AdminPass123!
Step 3: First Login
Navigate to your application URL
Go to the login page
Choose “Sign in with email” (not university SSO)
Enter your credentials
You’ll be prompted to change the password immediately
Security Notes
Change the password immediately after first login
Use a strong password with uppercase, lowercase, numbers, and special characters
Consider enabling university SSO for additional security
Create backup admin accounts once logged in
What’s Next?
After logging in as admin, you can:
Create User Accounts: Add other staff members with appropriate roles
Set Up Categories: Create inventory categories for your items
Configure SSO: Set up university single sign-on if available
Import Data: Add your existing inventory items
Schedule Backups: Set up automatic database backups
Troubleshooting
“Table doesn’t exist” error:
# Run database migrations
npm run db:push
“Invalid credentials” error:
Double-check the email address
Ensure you’re using the local login, not SSO
Verify the account was created:
SELECT * FROM users WHERE role = 'admin';
“Must change password” error:
This is normal for the first login
Follow the password change prompts
Use a strong password meeting the requirements
Password Requirements
Your new password must include:
At least 8 characters
One uppercase letter (A-Z)
One lowercase letter (a-z)
One number (0-9)
One special character (!@#$%^&*()_+-=[]{}|;:,.<>?)
Need Help?
Check the full authentication documentation in docs/admin/authentication-setup.rst for comprehensive setup instructions and troubleshooting.