Skip to content

Sunshine: Move config to standard format #25

Open

Description

@ReenigneArcher

Is there an existing issue for this item?

  • I have searched the existing issues

Repositories

SunshineStream/Sunshine

Languages/Skills/Technologies

C++

Description

The Sunshine config should be migrated to a standard format like JSON or YAML (or even SQLite) and then the complexities of parsing the custom format can be dropped.

We should consider a migration feature for those on the old format, but eventually should drop support for the old format altogether.

If the SQLite option is chosen, we could actually store much more information in the db such as:

  • state info
  • paired devices
  • certs
  • apps

Estimated Effort

effort:Large

Priority

priority:High

Target Milestone

6+ months

Dependencies

No response

Activity

  1. changed the title [-]Move Sunshine config to standard format[/-] [+]Sunshine: Move config to standard format[/+] on Apr 20, 2025
  2. Kishi85 commented on Oct 18, 2026

    @Kishi85

    SQLite for configuration files like this is overkill and would make things much too complicated. All of the additional features would rarely to never be used for this kind of key-value configuration file. It's much easier to go with one of the text formats JSON/YAML already mentioned above or TOML and use them in a well-defined file/directory structure below sunshine's configuration directory root (for an example see my comment on #87 (comment)).

    Especially for development it's much easier to just have to edit a text file instead of having to deal with SQL. It's also easier to restore said textfile instead of having to fix the SQLite database state in case of problems. Same assumption is likely true for unit testing.

  3. Kishi85 commented on Oct 18, 2026

    @Kishi85

    Especially for development it's much easier to just have to edit a text file instead of having to deal with SQL. It's also easier to restore said textfile instead of having to fix the SQLite database state in case of problems. Same assumption is likely true for unit testing.

    This is also true for issue debugging where the reporter can just (be asked to) attach a (possible redacted) text configuration file easily compared to an SQL based approach.

  4. ReenigneArcher commented on Oct 18, 2026

    @ReenigneArcher
    MemberAuthor

    There's more than config files that need to be moved. There's a lot of features behind asked for that make no sense putting in json or toml files.

    • per app config
    • per client config
    • game metadata, like plex/jellyfin
    • revamped prep commands

    And probably more I can't think of right now.

    It also makes it's easier when things change because we can do a proper migration, instead of telling users delete the config directory and start over because something was missed.

    https://sqlitebrowser.org/ makes it very easy to work with the db files.

  5. ReenigneArcher commented on Oct 18, 2026

    @ReenigneArcher
    MemberAuthor

    Especially for development it's much easier to just have to edit a text file instead of having to deal with SQL. It's also easier to restore said textfile instead of having to fix the SQLite database state in case of problems. Same assumption is likely true for unit testing.

    This is also true for issue debugging where the reporter can just (be asked to) attach a (possible redacted) text configuration file easily compared to an SQL based approach.

    I haven't asked for this in a long time, we log the non standard config settings at Sunshine startup.

  6. Kishi85 commented on Oct 18, 2026

    @Kishi85

    There's more than config files that need to be moved. There's a lot of features behind asked for that make no sense putting in json or toml files.

    • per app config
    • per client config
    • game metadata, like plex/jellyfin
    • revamped prep commands

    And probably more I can't think of right now.

    That's all features you can do with properly laid out and well-defined configuration files/directories. I personally see no specific need to involve the complexity of SQL for those features unless you have a need to use anything unique here that only SQL provides. It's just a different storage layout for those features depending on how you implement it and you can do that with the directory layout I've described in #87 (comment) and a unified file structure using json/yaml/toml. So I'm not really understanding why it wouldn't make sense to use a text-based format here.

    It also makes it's easier when things change because we can do a proper migration, instead of telling users delete the config directory and start over because something was missed.

    https://sqlitebrowser.org/ makes it very easy to work with the db files.

    You'd still need an external tool to work on the DB. Text files are just much simpler and easier to access.

    Just my 2c on this topic. I'm fine with it either way but IMHO SQL is just adding unnecessary complexity here and needs to be implemented with a proper table structure to make sense at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    • Status
      Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions