2.0 KiB
2.0 KiB
Setup Guide
Initial Setup
When you first deploy Sanasto Wiki, you need to create an initial administrator account.
Automatic Setup (Recommended)
-
Start the Rails server:
bundle exec rails server -
Navigate to
/setupin your browser -
Fill in the setup form:
- Name: Your full name
- Email: Your email address (becomes the system default contact)
- Preferred Language: Your primary working language
- Password: At least 12 characters
- Confirm Password: Re-enter your password
-
Click "Complete Setup"
-
You'll be automatically logged in and redirected to the admin dashboard
What Happens During Setup
- Creates your admin account with full permissions
- Sets you as the default system contact (User.first.email)
- Creates a
.installedmarker file to prevent re-running setup - Automatically logs you in
- Protects your account from deletion (first user cannot be deleted)
After Setup
Once setup is complete:
- The
/setuproute becomes inaccessible - You can access the admin dashboard at
/admin - You can invite other users through the admin interface
- The first admin user (you) is protected from deletion
Resetting Setup
If you need to re-run setup (e.g., in development):
# Remove the installed marker
rm .installed
# Clear the database (development only!)
bundle exec rails db:reset
# Now you can access /setup again
Production Deployment
For production deployment:
- Deploy the application
- Run migrations:
bundle exec rails db:migrate - Navigate to your domain's
/setuproute - Complete the setup form
- Start inviting contributors
The .installed file should NOT be committed to version control (it's in .gitignore).
Security Notes
- The setup route is only accessible when
.installedfile doesn't exist - Password must be at least 12 characters
- The first admin user cannot be deleted through the UI
- Setup automatically creates an admin-level account
- After setup, use the invitation system to add more users