Configuring your server

This component allows you to view and edit your server’s configuration settings. You server’s configuration is basically your “appsettings.json” file, which is being used in all parts of the system to retrieve configuration settings, such as for instance when email slots are sending emails, etc. Below is a screenshot of the component.

Configuring Magic

Notice, you should be careful as you edit your server’s configuration settings, since this might result in that your server becomes erronously configured, resulting in that your system stops working - In addition to that if you edit your server’s configuration erronously, you might open up your server such that malicious adversaries gains access to your system.

Configuration sections

What configuration sections your particular server has obviously depends upon which apps, and/or modules you’ve installed, and which settings these modules depends upon - However, below is a list of the common “system configuration settings” Magic relies upon out of the box, and what these configuration settings implies.


The magic:frontend:urls section allows you to explicitly specify CORS, implying frontend URLs that are allowed to retrieve data from the backend. Its default setting implies all URLs are allowed to retrieve data from your backend, but sometimes you need to explicitly specify one or more URLs here. You can do this by adding a comma separated list of URLs in this setting.


This magic:smtp section allows you to specify which SMTP server Magic should use for sending emails. Some modules such as the registration module needs to be able to send emails to function optimally. This section allows you to specify which SMTP server settings to use when sending emails. Most parts of this section is self explanatory, but the from section is the default from name and address to use, which is only used if an email is sent without explicitly declaring who it originated from.


These are your database connection strings. Magic supports 3 relational database types, these are as follows.

You can use all of the above database types in your Magic server. However, to access your database you need to provide Magic with one or more connection strings. Each of these section contains a key/value pair where the key becomes the name of your connection string, and the value its actual connection string value. This section also has a default setting, which is the default database type to use if not specified by caller. This needs to be one of “mysql”, “pgsql”, or “mssql” - Implying MySQL, PostgreSQL or SQL Server.


This section allows you to override the default authentication and authorisation values for Magic. Its sub-sections implies the following.


The level parts of this section implies which logging level you want to use. Magic supports 5 legal values for this setting, and these are as follows.

This works similarly to log4net, and implies “minimum logging level”, where any log invocations from and above your minimum level are logged, while the rest of your log invocations will be ignored. The default value of “debug” implies that everything will be logged. Notice, you can also override which service to use for actually logging here.


This section allows you to override the service to use for your cache. The default implementation implies using a memory based cache, but you can also use NoSQL cache services, and/or roll your own.


The root-folder setting in this section allows you to change where Magic will store your dynamic files. This allows you to for instance have some folder on disc where all your dynamic files are stored, as an alternative to the default value, which is inside your Magic server’s “files” folder. The other parts of this configuration settings implies the following.

To understand the 3 settings above, realise that Magic supports “virtual file and folder systems”, through for instance storing files and folders in Scylla or Cassandra, allowing you to virtually resolve files from alternative storages besides your physical file system.


The url setting here allows you to override which URL clients needs to use to negotiate a socket channel with your server. You can also completely turn OFF web sockets entirely here, by changing the value to null or remove the section entirely.


This setting allows you to change which base URL Magic should use as its Bazar.