Configure your Crafty Instance
This document provides instructions for configuring Crafty, before launching it or for existing installations.
Whether you're setting up Crafty for the first time or want to optimise your existing configuration, this document covers essential topics such as port configuration, admin user credentials, optimisation, and more.
By following these instructions, you can ensure that Crafty runs smoothly and securely.
Whether you're a developer, a system administrator, or a gamer just out to game with your mates, this document has something to offer to help you get the most out of the Crafty.
|Sets logging level to 'DEBUG'.
(Only use when neccessary! i.e. seeking support, the logs can get massive!)
|Runs Crafty in
daemon mode (no prompt)
|Ignore session.lock file.
Crafty protects itself from running multiple instances with a lock file, As multiple craftys running at the same time would break files and you would have a real bad time. Sometimes this can cause complications for example if you're running in an environment where crafty will not always shutdown gracefully (in a container). Be sure to only use this in an environment where you can be sure with utmost certainty only one crafty will be ran.
Crafty's Config File (config.json)
This file is Crafty's system configuration file, it provides numerous settings which will help you configure and get the best performance out of Crafty.
You can find it in
config/config.json mount point in docker or in the dashboard as a 'superuser'.
Crafty System Configurable Options w/ Descriptions
|Whether or not to allow gravatar defined NSFW PFPs for your local users.
|How long cookies are valid (days)
|How we should keep crafty logs for (days, 0 is never delete)
|Whether to use default.json when starting Crafty for the first time.
|How often we should poll directories for their size (minutes)
(The more this happens the performance intensive Crafty will be)
|Which languages you would like disabled for users.
|Can a user delete themselves.
|How long we should hold onto stats in the database for. (days)
|Port for our http redirect server
|Port for Crafty's main secure webserver.
|Keywords that will be highlighted in the terminal and in the logs page.
|Default Crafty instance language.
(This is for login page and any public pages with translations enabled)
|How many audit log entries we will keep in the DB.
|How many lines of logs we will keep on the logs page.
|Mount points that will appear under 'storage monitoring' on the dashboard.
|Should we reset the key secrets on the next boot?
|Show the link to contributors on the navigation of Crafty.
|Should we show traceback errors on the page
(This helps us with debugging when you come in with issues. 👷♂️)
|How often we poll your server for stats. (seconds)
|Max upload size (in GB)
|How many lines we should save in your server's terminal buffer.
Changing the server storage location
When you create or import a server, Crafty automatically stores the server data in an internal managed directory.
If you prefer to customize the storage location, you can easily do so in the 'Panel Config' tab.
Simply set the desired path where you want your Crafty servers to be located. It's important to ensure that Crafty has the necessary read/write permissions for this directory.
For detailed instructions on configuring the server storage location for Linux, please refer to this document. It provides an example of how the directory should be created.
If you are on Docker you won't be able to change this path, use the mount points instead. (Mount locations)
Configuring before you launch
If you need to change that port or would like to create the config file before Crafty starts you may do so by creating the config.json detailed above before you launch crafty.
Just be sure you get the json syntax correct formatting right or crafty won't be happy with you.
If you do not need to change your server port before starting Crafty have no fear... Crafty will create this config file for you. Just start the web app up.
Changing Crafty's port
Here you can find an example of how to update what ports crafty runs on prior to launch.
If you are on linux and creating this file for the first time please, please, please, make sure you are doing this as the Crafty user (
sudo su - crafty).
What is 'default.json' 🤔
You can find it in
config/default.json.example mount point in docker.
This is a special file ✨ that is injested and deleted when crafty launches for the first time, you can use it to define the admin user credentials. Useful for when you want to do unattended deployments of Crafty, Like with Ansible! #andible-roles-may-or-may-not-be-coming-soon 😉
All you gotta do is create your own or rename existing, removing the
.example and edit the values. (Just be sure to make sure the permissions are correct!)