diff --git a/.env.example b/.env.example index 5bae406..cc552f2 100644 --- a/.env.example +++ b/.env.example @@ -8,10 +8,3 @@ AUTH_SECRET="your_auth_secret_here" # Database DATABASE_URL="postgresql://user:password@127.0.0.1:65420/nodebyte-site" - -# Crowdin (for translations) -CROWDIN_PROJECT_ID="" -CROWDIN_PERSONAL_TOKEN="" - -# GitHub (for changelog releases) -GITHUB_TOKEN="" diff --git a/app/admin/settings/page.tsx b/app/admin/settings/page.tsx index e47603d..65b986f 100644 --- a/app/admin/settings/page.tsx +++ b/app/admin/settings/page.tsx @@ -69,8 +69,9 @@ interface SystemSettings { // Pterodactyl pterodactylUrl: string pterodactylApiKey: string + pterodactylClientApiKey: string pterodactylApi: string - + // Virtfusion virtfusionUrl: string virtfusionApiKey: string @@ -117,6 +118,7 @@ export default function SettingsPage() { const [resetting, setResetting] = useState(null) const [testingConnection, setTestingConnection] = useState(null) const [showApiKey, setShowApiKey] = useState(false) + const [showApiKeyclient, setShowApiKeyclient] = useState(false) const [showResend, setShowResend] = useState(false) const [showCrowdin, setShowCrowdin] = useState(false) const [showGithub, setShowGithub] = useState(false) @@ -153,6 +155,7 @@ export default function SettingsPage() { const [settings, setSettings] = useState({ pterodactylUrl: "", pterodactylApiKey: "", + pterodactylClientApiKey: "", pterodactylApi: "", virtfusionUrl: "", virtfusionApiKey: "", @@ -189,6 +192,7 @@ export default function SettingsPage() { // Track which fields are masked (already set) const masked = new Set() if (data.settings.pterodactylApiKey === MASKED_VALUE) masked.add("pterodactylApiKey") + if (data.settings.pterodactylClientApiKey === MASKED_VALUE) masked.add("pterodactylClientApiKey") if (data.settings.virtfusionApiKey === MASKED_VALUE) masked.add("virtfusionApiKey") if (data.settings.crowdinPersonalToken === MASKED_VALUE) masked.add("crowdinPersonalToken") if (data.settings.githubToken === MASKED_VALUE) masked.add("githubToken") @@ -255,6 +259,7 @@ export default function SettingsPage() { body: JSON.stringify({ pterodactylUrl: settings.pterodactylUrl, pterodactylApiKey: settings.pterodactylApiKey, + pterodactylClientApiKey: settings.pterodactylClientApiKey, virtfusionUrl: settings.virtfusionUrl, virtfusionApiKey: settings.virtfusionApiKey, }), @@ -776,21 +781,73 @@ export default function SettingsPage() {

-
- - setSettings({ - ...settings, - pterodactylApi: e.target.value - })} - /> -

- {t("settings.pterodactyl.apiUrlNote")} -

-
+
+
+ + setSettings({ + ...settings, + pterodactylApi: e.target.value + })} + /> +

+ {t("settings.pterodactyl.apiUrlNote")} +

+
+
+ +
+
+ setSettings({ + ...settings, + pterodactylClientApiKey: e.target.value + })} + disabled={maskedFields.has("pterodactylClientApiKey")} + /> +
+ +
+
+ {maskedFields.has("pterodactylClientApiKey") && ( + + )} +
+

+ {t("settings.pterodactyl.apiKeyNoteclient")} +

+
+
{pterodactylStatus.version && (
{t("settings.pterodactyl.version")}: {pterodactylStatus.version} diff --git a/app/api/admin/settings/route.ts b/app/api/admin/settings/route.ts index d368246..06e8c1d 100644 --- a/app/api/admin/settings/route.ts +++ b/app/api/admin/settings/route.ts @@ -134,6 +134,7 @@ export async function GET() { settings: { pterodactylUrl: allSettings.pterodactyl_url || "", pterodactylApiKey: isSuperAdmin(userRoles) && allSettings.pterodactyl_api_key ? allSettings.pterodactyl_api_key : (allSettings.pterodactyl_api_key ? "••••••••••••••••••••" : ""), + pterodactylClientApiKey: isSuperAdmin(userRoles) && allSettings.pterodactyl_client_api_key ? allSettings.pterodactyl_client_api_key : (allSettings.pterodactyl_client_api_key ? "••••••••••••••••••••" : ""), pterodactylApi: allSettings.pterodactyl_api || "", virtfusionUrl: allSettings.virtfusion_url || "", virtfusionApiKey: isSuperAdmin(userRoles) && allSettings.virtfusion_api_key ? allSettings.virtfusion_api_key : (allSettings.virtfusion_api_key ? "••••••••••••••••••••" : ""), @@ -241,6 +242,11 @@ export async function POST(request: Request) { changedFields.push("Pterodactyl API Key") } + if (body.pterodactylClientApiKey && body.pterodactylClientApiKey !== MASKED_VALUE) { + await setConfig("pterodactyl_client_api_key", body.pterodactylClientApiKey) + changedFields.push("Pterodactyl Client API Key") + } + if (body.virtfusionUrl) { await setConfig("virtfusion_url", body.virtfusionUrl) changedFields.push("Virtfusion URL") diff --git a/packages/core/lib/config.ts b/packages/core/lib/config.ts index b9b5d1e..d3bd106 100644 --- a/packages/core/lib/config.ts +++ b/packages/core/lib/config.ts @@ -5,6 +5,7 @@ * Configuration Keys - Panel Settings: * - pterodactyl_url: Pterodactyl panel URL * - pterodactyl_api_key: Pterodactyl admin API key + * - pterodactyl_client_api_key: Pterodactyl client API key * - pterodactyl_api: Pterodactyl API endpoint path (default: /api/application) * - virtfusion_url: Virtfusion panel URL * - virtfusion_api_key: Virtfusion API key @@ -51,6 +52,7 @@ import { prisma } from "./prisma" export interface PterodactylSettings { url: string | null apiKey: string | null + clientapiKey: string | null api: string | null } @@ -175,6 +177,7 @@ export async function getPanelSettings(): Promise { const config = await getConfigs( "pterodactyl_url", "pterodactyl_api_key", + "pterodactyl_client_api_key", "pterodactyl_api", "virtfusion_url", "virtfusion_api_key", @@ -185,6 +188,7 @@ export async function getPanelSettings(): Promise { pterodactyl: { url: config.pterodactyl_url, apiKey: config.pterodactyl_api_key, + clientapiKey: config.pterodactyl_client_api_key, api: config.pterodactyl_api, }, virtfusion: { diff --git a/packages/core/lib/system-settings.ts b/packages/core/lib/system-settings.ts index 339ed47..295de97 100644 --- a/packages/core/lib/system-settings.ts +++ b/packages/core/lib/system-settings.ts @@ -8,6 +8,7 @@ export interface SystemState { export interface PterodactylSettings { url: string | null apiKey: string | null + clientapiKey: string | null api: string | null } diff --git a/packages/kb/content/hytale/_meta.json b/packages/kb/content/hytale/_meta.json new file mode 100644 index 0000000..08c286a --- /dev/null +++ b/packages/kb/content/hytale/_meta.json @@ -0,0 +1,6 @@ +{ + "title": "Hytale Servers", + "description": "Guides and tutorials for setting up and managing Hytale servers. Please be aware Hytale is still in development, so expect performance issues and bugs.", + "icon": "Gamepad2", + "order": 3 +} diff --git a/packages/kb/content/hytale/image-1.png b/packages/kb/content/hytale/image-1.png new file mode 100644 index 0000000..a90e6d7 Binary files /dev/null and b/packages/kb/content/hytale/image-1.png differ diff --git a/packages/kb/content/hytale/image-2.png b/packages/kb/content/hytale/image-2.png new file mode 100644 index 0000000..499147c Binary files /dev/null and b/packages/kb/content/hytale/image-2.png differ diff --git a/packages/kb/content/hytale/image-3.png b/packages/kb/content/hytale/image-3.png new file mode 100644 index 0000000..1b600e5 Binary files /dev/null and b/packages/kb/content/hytale/image-3.png differ diff --git a/packages/kb/content/hytale/image-4.png b/packages/kb/content/hytale/image-4.png new file mode 100644 index 0000000..c588ee1 Binary files /dev/null and b/packages/kb/content/hytale/image-4.png differ diff --git a/packages/kb/content/hytale/image.png b/packages/kb/content/hytale/image.png new file mode 100644 index 0000000..601cb7c Binary files /dev/null and b/packages/kb/content/hytale/image.png differ diff --git a/packages/kb/content/hytale/setting-up-hytale.md b/packages/kb/content/hytale/setting-up-hytale.md new file mode 100644 index 0000000..16b6ca6 --- /dev/null +++ b/packages/kb/content/hytale/setting-up-hytale.md @@ -0,0 +1,52 @@ +--- +title: Setting up your hytale server +description: Learn how to setup your hytale server +tags: [game, hytale] +author: NodeByte Team +lastUpdated: 2025-01-15 +order: 1 +--- + +Please note the below is temporary and will be changed in the near future. + +# Installing + +Once you have purchased Hytale you will need to quickly make your way to the panel and sign in. + +Once you are signed in open your hytale server. + +Once loaded you will be greeted by this page: +![](image.png) + +It may seem it's not doing anything, but there is a delay of 1 minute for the panel to provide you with a authorization code for the downloader to continue. + +Once you see this: +![](image-1.png) + +If you do not see this and it's been a minute, please wait 5 minutes then reinstall the server under "Settings" on your server. + +Click on the first link to authorize the server. + +You will be taken to this page below - Click on "Approve" then sign in (if required). +![alt text](image-2.png) + + +Once approved you will be greeted by this page - You may close this tab +![alt text](image-3.png) + +Back on the panel the server will begin to install. +![alt text](image-4.png) + +# Logging in on the panel + +Once the installaion is complete please run `auth login device` + +You will then be taken back to this page. Click on approve. +![alt text](image-2.png) + +Once you see this page you can close the tab. +![alt text](image-3.png) + +Back on the panel run `auth persistence Encrypted` this will save your details to the files encryted. Failing to do this means you will have to sign in everytime the server is rebooted. + +That's it! Enjoy playing on a Hytale server! \ No newline at end of file