RagCP is an open source control panel for rAthena. It is easy to install, mantain, it's written in Python and it uses Django Framework so that it is easy to add new features and integrate things.
Discord |
---|
Before installing RagCP there are certain tools and applications you will need which differs between the varying operating systems available.
- It is recommended to install on linux systems.
- Make sure the host you'll use has access to your Ragnarok database.
- Python Runtime | Python 3.6 or newer
- Your login table MUST NOT HAVE ADDITIONAL COLUMNS.
- Your server MUST run with MD5 password encryption enabled by default (So if a server uses RagCP, you already know your password has some level of security).
WARNING: We do not give support for third party addons and/or mods that modify, add or remove columns of rAthena database tables, always install RagCP on a clean database structure and backup your data if something apocalyptic happens. We modify any existing login table and generate a backup.
For additional information refer to database migration files located at ./users/migrations/
from number 1 to 4.
After setting up your environment, run the following commands:
Note that depending of your setup you'll have to run python
or python3
commands, also pip
or pip3
.
Are you an advanced user that feels lazy about setting up the environment? We provided a Dockerfile
.
Log in to the server you'll use to run the CP and create the following environment variables.
-
DATABASE_PORT
-
DATABASE_HOST
-
DATABASE_USER
-
DATABASE_PASSWORD
-
DATABASE_NAME
Create an environment variable called HOST
which its value is the hostname where the CP is going to be located. Don't include https://
. More details on Environment Variables section.
pip install -r requirements.txt
rAthena uses MyISAM as table engine, run the following command to upgrade tables used by RagCP to InnoDB
python manage.py convert-engine
Modifying login
table to work with Django auth
python manage.py migrate users
Migrate all other database tables:
python manage.py migrate
This command ignores the whitelist and runs uwsgi on port 8000 to serve the web app, feel free to change the port and for more information refer to Django documentation
python manage.py runserver 0.0.0.0:8000
There are other configurations that you can change in order to customize RagCP to your taste.
Open file ./ragcp/settings.py
and search the string # User settings
, below that line are the variables you can change.
-
FEED_ENABLED
: Enable or disable dynamic index that reads an RSS Feed to populate news automatically. (default: True) -
STATIC_CONTENT
: Do not show post and RSS content, shows an static welcome page instead. (default: False) -
CHANGELOG_ENABLED
: Show changelog tab -
RAGCP_CHANGELOG
: Show RagCP commit messages to allow users stay up to date of what they can do with the CP. Requires CHANGELOG_ENABLED: True and GITHUB_TOKEN -
RATHENA_CHANGELOG
: Show rAthena commit messages to allow users stay up to date of what have changed on the server. Requires CHANGELOG_ENABLED: True and GITHUB_TOKEN
List of other environment variables you need to configure in order to use optional features.
-
RSS_FEED
: The URL of the RSS Feed that will generate the index page, if this setting is not configured it will default to RagCP feed. If you disable RSS Feed onsettings.py
, an static page will be shown instead. -
HOST
: The domain name your users will use to open the web page, for examplefreyja-ro.xyz
,octocat.xyz
,my-ro.net
. -
DJANGO_SETTINGS_MODULE
: Leave blank for default, refer to Django documentation to use this feature -
GITHUB_TOKEN
: Github Token used to read RagCP changelog -
RAGCP_REPO_NAME
: Defines the name of the repository where RagCP will read commit messages to display a changelog. -
RATHENA_REPO_NAME
: Defines the name of the repository where RagCP will read commit messages to display a changelog.
Note: If you are going to run RagCP by building a Docker image, set all environment variables on the Dockerfile
instead.
You can change the content that is displayed on the homepage, to do so you have to modify its HTML content.
Content of the index page is located at:
./ragcp/templates/index.html
Static index content is located at
./ragcp/templates/welcome_content.html
In future versions, you'll be able to customize it from the CP (Django Admin).
We created a Zappier account for RagCP and configured a couple of Zaps
that read new content from several sources such as our GitHub pull requests, rAthena pull requests, Facebook page, etc. in order to automate and centralice all our information into one place.
This could happen on certain environments, if this is your case, run the following command, then restart the server.
python manage.py collectstatic
The command collects the static files located on STATIC_ROOT
path configured in settings.py
Comment: There is an environment variable used by Heroku that is configured as follows:
DISABLE_COLLECTSTATIC=1
We haven't tested that setting outside the Heroku environment, but you can take a try. Let us know your results.