Overview
This guide will walk you through setting up Mercury Core for local development, from installing prerequisites to creating your first account. By the end, you’ll have a fully functional Mercury Core instance running on your machine.This quickstart is for development purposes. For production hosting, see the Installation guide.
Prerequisites
Before you begin, ensure you have the following installed:Bun
Latest version of Bun runtime and package managerDownload Bun
Docker
Latest version of Docker (or Podman as an alternative)Download Docker
Modern Browser
Any major browser from early 2024 onwards
Terminal
Command-line access on your system
Installation Steps
Install Dependencies
Install all required dependencies using Bun:This will install all packages defined in
Site/package.json including:- SvelteKit and Svelte 5
- TypeScript and type definitions
- SurrealDB client
- UnoCSS for styling
- And more developer tools
Configure Environment Variables
Copy the example environment file and configure it:Edit
Site/.env with your preferred text editor. The default values work for local development:Site/.env
Start Database and Economy Services
Launch the required backend services using Docker Compose:This starts:
- SurrealDB database on port
8000 - Economy service (Go-based) on port
2009
Running without Docker
Running without Docker
If you can’t use Docker, you can run services manually:SurrealDB:Economy Service:Run these in separate terminal windows or as background processes.
Start Development Server
Navigate to the Site directory and start the Vite development server:You’ll see output similar to:The development server features:
Navigate to the URL shown in your terminal (usually
http://localhost:5173). Do not use HTTPS for local development.- Hot module replacement (HMR) - changes appear instantly
- Type checking and IntelliSense
- Fast refresh on file save
Create Your First Account
Once the server is running:
- Open your browser and navigate to
http://localhost:5173/register - Fill out the registration form with your desired username and password
- Complete the account creation process
Explore Mercury Core
You’re all set! You can now:
- Browse the home page and explore features
- Customize your character in
/character - Create games in
/develop - Browse the catalog in
/catalog - Configure settings in
/settings
Press Ctrl+I in the browser to open the inspector, which lets you select any element and view it in your editor.
Understanding the Data Directory
Mercury Core stores all persistent data in thedata/ directory (hidden from source control):
Making Changes
While the development server is running:- Edit any file in
Site/src/- changes will reflect immediately in the browser - Modify configuration in
mercury.core.tsto customize branding, features, and behavior - Check types by running
bun run checkin the Site directory
Building for Production
To preview how your site will work in production:Site/build/ and starts a preview server.
Next Steps
Customize Your Revival
Learn how to configure branding, themes, and features in
mercury.core.tsProduction Hosting
Deploy Mercury Core to a production server with Caddy and Docker
Client Integration
Connect Roblox revival clients to your Mercury Core instance
Architecture
Understand Mercury Core’s system architecture and services
Troubleshooting
Port already in use
Port already in use
If port 5173 is already in use, Vite will automatically try the next available port. Check your terminal output for the actual URL.
Database connection failed
Database connection failed
Ensure Docker containers are running:You should see
database and economy containers. If not, run:Changes not reflecting
Changes not reflecting
Try:
- Hard refresh your browser (Ctrl+Shift+R or Cmd+Shift+R)
- Restart the dev server (Ctrl+C then
bun dev) - Clear browser cache
- If on WSL2, enable polling in vite.config.ts (see tip above)
Bun command not found
Bun command not found
Ensure Bun is installed and in your PATH:Then restart your terminal.
Need help? Check out the Installation guide for more detailed setup instructions or the Configuration guide to customize your instance.