The Arikan command
Running Arikan with no arguments opens a menu in the terminal: status, updates, logs, access, REALITY sites, nodes, backups. The same actions are available as commands. Run them as root.
Server
Section titled “Server”| Command | What it does |
|---|---|
mikan status |
containers, CPU and memory, panel state, available update |
mikan doctor [--json] |
check the panel’s or node’s server, a hint on every line, see below. --json prints the report as JSON, secrets cut out |
mikan support <code> [--dry-run] |
send support the check, the status and the last log lines (secrets cut out) with the code from your ticket, see below |
mikan logs [panel|node] |
live logs, Ctrl+C stops |
mikan restart |
restart the containers |
mikan api-lockdown [status|off] |
on a node’s server: the state of the firewall rule “Node API from the panel’s IP only”, or lift it at once, see Hardening a node |
mikan support-access on|off |
allow or forbid support access on this server; off holds whatever the panel says |
mikan update [--check] |
update now, a backup first, rollback on failure. --check only checks |
mikan install [flags] |
install; on an installed server it opens the menu |
mikan uninstall [-y] |
stop and remove the command, data stays in /opt/mikan |
mikan uninstall --purge [-y] |
remove everything: containers, images, volumes (the database too), /opt/mikan with data, secrets and backups, the firewall rules and the command; nothing is kept |
mikan doctor works on a panel’s server and on a node’s server. It checks Docker and the containers, that the ports are listening, ufw rules for the node API port, the panel port and the protocol ports, time sync (timedatectl and the HTTP Date header from github.com, 30 s tolerance), DNS, outbound HTTPS to github.com and ghcr.io (needed for updates), disk (✗ under 500 MiB, ! under 2 GiB) and memory. On a node it also re-sends the hello to the panel and prints the result. Each line is marked ✓, ! or ✗ and has a fix line; if anything is ✗, the command exits with a non-zero code. mikan status suggests mikan doctor when something is wrong. This is the tool for when the panel cannot reach the node at all. The same set of checks for the panel’s server is in the panel itself: the “Check server” button in Settings → System.
The panel runs mikan doctor and mikan restart on its own server, and on a node’s server over the node API, without SSH: it writes a request file into its data directory and a systemd unit (mikan-doctor-request.path, mikan-restart-request.path, installed by the installer and by mikan update) runs the command and returns the report. A server installed before 0.5.2.0 needs one mikan update for that. The logs of the panel and of the nodes are shown in the panel as well, with tokens, keys, passwords and subscription links cut out. All of it is on the Diagnostics page.
mikan support <code> is for the case when the panel is down or the node is out of the panel’s reach. Take the code from your support ticket, run the command as root: it collects the same report as mikan doctor --json, mikan status and the last 300 lines of the containers’ logs, cuts the secrets out and sends one JSON document to the support desk (MIKAN_SUPPORT_URL points it elsewhere). The settings files (config.json, secrets/, and .env on older servers), keys and certificates are not read and not sent. --dry-run prints what would be sent and sends nothing.
Settings files
Section titled “Settings files”| Path | What is there | Permissions |
|---|---|---|
/opt/mikan/config.json |
the plain settings: the image, the version, the mode, MIKAN_ACME_LISTEN, MIKAN_AUTO_UPDATE and others. A JSON object of strings |
root only |
/opt/mikan/secrets/ |
the secrets, each a file of its own: postgres_password and database_url (the database’s password and address on a panel’s server), node_join (the join key on a node’s server) |
the folder 0700, each file 0400 and readable only by the container that needs it |
Docker Compose mounts the files of secrets/ into the containers as secrets (/run/secrets/<name>). The panel and the node read the password, the database address and the node key from there. A backup holds both config.json and secrets/, and old archives with .env restore as before.
The next mikan update moves an existing .env by itself: it creates the new files first and removes .env once mikan already runs on them. A copy stays in the update’s backup. A rollback to an older mikan version puts .env back. You do not need to do anything by hand.
To change a plain setting by hand, edit config.json and run mikan restart. For example, to let nginx or Caddy on port 80 pass certificate checks to mikan, add a line to config.json:
{ "MIKAN_ACME_LISTEN": "127.0.0.1:18080"}(together with the file’s other lines, separated by commas). The values go into compose.yaml as they are, so they cannot hold $, quotes, spaces or #. Secrets are changed only through the panel and mikan’s commands: mikan join KEY on a node changes node_join. The mikan cert proxy <domain> command sets MIKAN_ACME_LISTEN and restarts the node itself.
Access
Section titled “Access”| Command | What it does |
|---|---|
arikan url |
the panel link and login |
arikan reset-password |
a new administrator password, all sessions and API keys are revoked |
arikan reset-path |
a new secret link, the old one stops working |
arikan disable-2fa |
turn off 2FA if the phone is lost |
Backups
Section titled “Backups”| Command | What it does |
|---|---|
arikan backup |
a backup into /opt/mikan/backups |
arikan restore FILE [-y] [--no-db-snapshot] |
restore from a backup, see Backups |
Nodes and connections
Section titled “Nodes and connections”| Command | What it does |
|---|---|
arikan node list |
the panel’s nodes |
arikan node add --name NAME --host IP [--domain D] [--api-port P] |
add a node and get a key |
arikan node key NODE |
a new node key, the old one stops working |
arikan node set NODE [--name] [--host] [--domain] [--enabled=true|false] |
change a node |
arikan join [KEY] [--panel-ip IP] |
on a node: accept a new key from the panel |
arikan inbound list |
connections |
arikan inbound add PRESET [--port PORT] [--node N] |
add a connection; without a preset it shows the list |
arikan inbound set NAME --port PORT [--node N] |
change the port, keys and masking stay |
The panel’s own node has number 1, and its address and domain are changed in the panel settings.
Certificates
Section titled “Certificates”| Command | What it does |
|---|---|
arikan cert set --cert fullchain.pem --key privkey.pem [--node N] |
your own certificate for the panel or a node |
arikan cert show [--node N] |
what is installed now |
arikan cert clear [--node N] |
go back to the automatic certificate (for a node: self-signed) |
arikan cert proxy <domain> |
nginx or Caddy holds port 80: pass the certificate authority’s checks through it to the panel or node (the rule is backed up, the config tested and reloaded) |
REALITY masking sites
Section titled “REALITY masking sites”| Command | What it does |
|---|---|
arikan targets scan [--node N] [--json] |
find suitable sites near the server |
arikan targets check --dest HOST:PORT [--sni NAME] |
check a site |
arikan targets apply --dest HOST:PORT [--sni NAME] (--all | --inbound NAME) [--force] |
set the site for all connections or for one |
For an IP address in --dest, --sni is required. The site is checked before it is applied, and --force skips the check.
Payment adapters
Section titled “Payment adapters”| Command | What it does |
|---|---|
arikan addon list |
what is running and what is in the catalog |
arikan addon install ID |
install or update an adapter |
arikan addon remove ID |
stop and remove, settings and payments in the panel stay |
