Visit the Discord server for more support.
These instructions will get you a copy of the project up and running on your local machine for development purposes.
- Clone this repository.
git clone https://github.com/wizguin/yukon-server
- Install node dependencies.
npm install
-
Copy "config_example.json" to a new file called "config.json".
-
Generate a new crypto secret.
npm run secret-gen
-
Import yukon.sql into your MySQL database.
-
Update MySQL database credentials.
"database": {
"host": "localhost",
"user": "user",
"password": "password",
"database": "yukon",
"dialect": "mysql",
"debug": false
},
- Running the dev server.
npm run dev
- Building the server for production.
npm run build
- Running the server in production mode. This will start all worlds listed in config.json.
npm run start
- Stopping production servers.
npm run stop
- Restarting production servers.
npm run restart
- Listing production servers.
npm run list
- Display live logs for production servers
npm run logs
- PM2 monitor for production servers.
npm run monit
- Generate a new crypto secret.
npm run secret-gen
The easiest way to create accounts locally would be to simply enter them manually. Make sure to use a bcrypt hashed password, a tool such as this can be used to generate one.
$2a$10$nAxC5GXU0i/dacalTX.iZuRrtpmwmZ9ZzL.U3Zroh0jeSXiswFsne
The following is required when running the project in production.
- The project must first be built using the build command.
npm run build
- HTTPS can be configured as follows. Make sure your web server is also configured to use HTTPS.
"socketio": {
"https": true,
"ssl": {
"cert": "/path/to/cert.crt",
"ca": "/path/to/ca.ca-bundle",
"key": "/path/to/key.key"
}
},
- The CORS origin must be set. This will likely just be your domain name, e.g "example.com".
"cors": {
"origin": "example.com"
},
- Run the server in production mode.
npm run start
This project is a work in progress, please report any issues you find here.