Running Koios as a Service
For production deployments, run Koios as a systemd service. This ensures Koios starts automatically on boot and restarts on failure. Docker Engine must be installed before continuing — see Installing Docker Engine if you haven't done this yet.
Create the Service File
Create the systemd service file:
Paste the following content. Toggle options to customize the service, then copy the result:
For production it is recommended to pin a specific version tag (e.g. v1.0.0) so that upgrades are intentional — see Updating Koios.
Enable and Start the Service
The Restart=always directive ensures the service restarts automatically if the container exits unexpectedly or the host reboots.
Check Status
View Logs
Press Ctrl+C to stop following the log output.
Firewall
The --network host flag means the container binds directly to host ports 443 (HTTPS) and 80 (HTTP). If the host has a firewall enabled (e.g. ufw), allow those ports:
If you have customised the ports via HTTPS_PORT or HTTP_PORT environment variables, open those ports instead. See Environment Variables for details.
Alternative: Explicit Port Mapping
If you prefer not to use host networking, replace --network host with explicit port mappings in the service file. Change the ExecStart line to include -p 443:443 -p 80:80 instead of --network host.
First Access
Once the service is running, open a browser and navigate to:
Your browser may show a certificate warning for the self-signed SSL certificate — this is expected. Accept the warning to proceed.
Log in with the default credentials:
- Username:
admin - Password:
koios
About Docker Volumes
Koios stores all of its data in seven named Docker volumes — the configuration database, time-series database, uploaded files, license, certificates, logs, and secrets. These volumes live on the host and persist independently of the container, so your data survives container restarts, updates, and re-deployments.
Docker automatically creates any missing volumes when the container first starts, so no manual setup is required. If you prefer to create them explicitly upfront, you can run:
See Backing Up Docker Volumes for a description of what each volume contains.
What's Next
- Licensing Koios — activate your Koios license
- Environment Variables — customize network ports, TLS, performance, logging, and more
- Updating Koios — upgrade to a new version safely
