LogoLogo
GitHubWebsite
Latest
  • Documentation
  • Client API
  • Application API
Latest
  • Welcome to Argon 👋
  • Argon / Krypton
    • Get started
  • Setting up your first node
Powered by GitBook

© Argon Foundation

On this page
  • Prerequisites
  • System Dependencies
  • Daemon Installation
  • Setting Up as a System Service
  • Adding the Node to Your Argon Panel
  • Adding Allocations
  • Troubleshooting
  • Network Considerations
  • What have we done?

Was this helpful?

Export as PDF

Setting up your first node

Prerequisites

Before you begin, make sure your system meets these requirements:

  • A Linux server (Ubuntu 20.04 or later recommended)

  • Docker installed and running

  • Root or sudo access

  • Ports 8080 (daemon API) and whatever server ports you need open in your firewall

System Dependencies

Krypton requires the following dependencies:

  • Bun 1.2.12 or higher

  • curl

  • git

  • Docker

Installing Dependencies

  1. Install Bun:

    curl -fsSL https://bun.sh/install | bash
  2. Install Docker (if not already installed):

    curl -fsSL https://get.docker.com | bash
    systemctl enable --now docker

Daemon Installation

1. Clone the Repository

First, navigate to the /etc directory and clone the Krypton repository:

cd /etc
git clone https://github.com/argon-foss/krypton
cd krypton

2. Install Dependencies

Install the required JavaScript/TypeScript dependencies:

bun install

3. Configure the Daemon

Run the configuration tool to set up your daemon:

bun run configure

This will prompt you for:

  • API key (used to authenticate with the daemon)

  • Bind address (usually 0.0.0.0 to accept connections from anywhere)

  • Bind port (default is 8080)

  • Volumes directory (where server data will be stored)

  • Panel URL (URL to your Argon panel)

  • CORS origin (for cross-origin requests)

Your configuration will be saved to config.yml in the current directory.

4. Start the Daemon

Start the Krypton daemon:

bun run start

You should see output indicating that the daemon has started successfully.

Setting Up as a System Service

For production environments, you'll want to run Krypton as a system service.

Create a Systemd Service

Create a systemd service file:

nano /etc/systemd/system/krypton.service

Add the following content:

[Unit]
Description=Krypton Daemon
After=network.target docker.service
Requires=docker.service

[Service]
User=root
Group=root
WorkingDirectory=/etc/krypton
ExecStart=/root/.bun/bin/bun run start
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
SyslogIdentifier=krypton

[Install]
WantedBy=multi-user.target

Enable and start the service:

systemctl enable krypton
systemctl start krypton

Check the service status:

systemctl status krypton

Adding the Node to Your Argon Panel

  1. Log in to your Argon panel as an administrator

  2. Navigate to the Nodes section

  3. Click "Create New Node"

  4. Fill in the required information:

    • Name: A friendly name for your node

    • FQDN: The fully qualified domain name or IP address of your server

    • Port: The port you configured for the daemon (default: 8080)

  5. Click "Create Node"

Once added, your node should show as "Online" in the panel. If it doesn't, check:

  • That the daemon is running (systemctl status krypton)

  • That your firewall allows connections to the daemon port

  • That the API key in your panel matches the one in your daemon's config.yml

Adding Allocations

Allocations are the IP:Port combinations that can be assigned to servers.

  1. In your Argon panel, navigate to the node you just created

  2. Go to the "Allocations" tab

  3. Click "Create New Allocation"

  4. Enter:

    • Bind Address: Usually the server's primary IP

    • Port: A port to allocate (e.g., 25565 for Minecraft)

  5. Click "Create"

You can also create a port range if you need multiple ports:

  1. Click "Create Port Range"

  2. Enter the bind address and port range (e.g., 25000-25100)

  3. Click "Create"

Troubleshooting

Daemon Won't Start

If the daemon fails to start, check the logs:

journalctl -u krypton -n 100

Common issues include:

  • Docker not running

  • Port already in use

  • Permission issues with the volumes directory

Node Shows as Offline in Panel

If your node shows as offline:

  • Verify the daemon is running

  • Check that the FQDN and port are correct

  • Ensure your firewall allows connections

  • Verify the API key matches between panel and daemon

Container Creation Fails

If server creation fails:

  • Check the daemon logs

  • Ensure Docker has enough disk space

  • Verify the unit/image exists and is accessible

Network Considerations

Docker Networking

Krypton uses Docker's bridge networking. Each container gets a virtual interface in the 172.17.0.0/16 range by default.

Port Exposure

Game server ports are mapped from the host to the container. Make sure these ports are open in your firewall.

Notes for Windows and macOS

If you're testing Krypton on Windows or macOS with Docker Desktop, network connectivity may be limited due to the virtualization layer. For production use, Linux is strongly recommended.

What have we done?

You now have a working node with the Krypton daemon installed! You can now create servers through your Argon panel, which will be deployed and managed on this node.

PreviousGet started

Last updated 1 day ago

Was this helpful?