Skip to content

SunriseCommunity/Solar-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Solar System - The Sunrise server orchestrator

Artwork made by kita (kitairoha). We don't own the rights to this image.

License GitHub stars

Monorepo with all services to run instance of Sunrise server

Description πŸ“–

Solar System is a monorepo containing all the essential components required to run a complete Sunrise server stack. Each major piece is managed as a submodule within this repository, allowing you to orchestrate, develop, and deploy everything together with ease.

Preview πŸ–ΌοΈ

preview

Components 🧩

  • πŸŒ… Sunrise (Server Core)
    The main server backend, handling core game logic and API for osu! servers.

  • πŸŒ‡ Sunset (Frontend)
    The frontend web interface of Sunrise. Allows to browse profiles, leaderboards, multiplayer lobbies, and manage users/beatmaps using admin panel.

  • πŸ”­ Observatory (Beatmap Manager)
    Powerful "on demand" beatmap manager which uses osu! API and popular beatmap mirrors to prioritize speed and efficiency. Used by Sunrise to fetch beatmaps and calculate performance points.

  • 🌻 Sunshine (Discord Bot)
    A Discord bot that integrates directly with your Sunrise server, delivering community features and server utilities directly into your Discord server.

Installation πŸ“©

Prerequisites

Before you begin, ensure you have the following installed:

Installation Steps

  1. Clone the repository with submodules:

    git clone --recursive https://github.com/SunriseCommunity/Solar-System.git
    cd Solar-System

    Or if you've already cloned without submodules:

    git submodule update --init --recursive --remote
  2. Set up configuration files:

    Create copies of the example configuration files:

    cp .env.example .env
    cp Sunrise.Config.Production.json.example Sunrise.Config.Production.json

    Fill in the required parameters in both files.

Important

Make sure to edit WEB_DOMAIN= in .env to your actual domain that you plan to host on.

Tip

You can customize the configuration files to match your requirements. For example, in Sunrise.Config.Production.json, you can change the bot username:

"Bot": {
  "Username": "Sunshine Bot",
  ...
}
  1. Generate API keys:

    Generate the token secret for Sunrise API requests:

    chmod +x lib/scripts/generate-api-sunrise-key.sh
    ./lib/scripts/generate-api-sunrise-key.sh

    This will generate a token secret for the Sunrise API requests.

    Generate the Observatory API key (allows Sunrise to request Observatory without internal rate limits):

    chmod +x lib/scripts/generate-observatory-api-key.sh
    ./lib/scripts/generate-observatory-api-key.sh
  2. Start the server:

    chmod +x ./start.sh
    ./start.sh

    This should start the server without any problems.

  3. Verify the server is running:

    You can check that all containers are running with:

    docker ps

    You should see containers for Sunrise server, Sunset website, Observatory, Sunshine Discord bot, and supporting services (PostgreSQL, Redis, Grafana, etc.) all running.

Note

For more in-depth documentation with detailed setup instructions, visit https://docs.sunrize.uk/.

Tip

Join our Discord server if you have any questions or just want to chill with us!

Hosting to the Internet 🌐

To make your server accessible on the internet:

  1. Configure DNS records:

    Make sure you have DNS records pointing the following subdomains to your server's IP address:

    • * (wildcard)
    • api
    • osu
    • a
    • c
    • assets
    • cho
    • c4
    • b
    • grafana

    These subdomains are required for the server to function properly.

  2. Start Caddy reverse proxy:

    For simplicity, we use Caddy as a reverse proxy. By default, the Caddyfile is configured to host the website, server, and Grafana. You can uncomment additional configurations in the Caddyfile if needed.

    Start Caddy by running:

    sudo caddy start --envfile .env

    Your server should now be up and accessible!

Important

After starting Caddy, make sure to visit grafana.* subdomain and change the default password for the admin account!

Contributing πŸ’–

If you want to contribute to the project, feel free to fork the repository and submit a pull request. We are open to any suggestions and improvements.