Installation & Services
Install headless Throne as a systemd service, a systemd user unit, a Docker container, a macOS LaunchDaemon or a Windows service.
Install Throne as described in Installation, then let a service manager run it:
| Setup | Runs as | Data directory |
|---|---|---|
| Linux package (systemd unit) | root | /var/lib/throne |
| systemd user unit, any Linux | you | ~/.config/Throne |
| Docker | root in the container | the volume /var/lib/throne |
| macOS LaunchDaemon | root | /Library/Application Support/Throne |
| Windows service | LocalSystem | C:\ProgramData\Throne |
Then connect thronectl.
Debian, Ubuntu, Raspberry Pi OS, Fedora, openSUSE
The .deb and .rpm packages from the releases page and the package repositories install Throne to /opt/Throne, the systemd unit throne.service, its environment file /etc/throne/throne.env and thronectl. Linux says which package fits which system; on a Raspberry Pi, use the 64-bit Raspberry Pi OS.
sudo apt install ./Throne-<version>-debian-amd64.deb # or: sudo dnf install ./Throne-<version>-fedora-amd64.rpm
sudo /opt/Throne/Throne --check # optional: can this computer run it?
sudo systemctl enable --now throne
journalctl -u throne -f
-
The package never enables the unit. An upgrade restarts it when it runs; removing the package stops and disables it.
-
/var/lib/throne(profiles, settings and the API key) stays when you remove the package, even withapt purge. -
To set a variable, uncomment it in
/etc/throne/throne.envand runsudo systemctl restart throne. Upgrades keep your edits. Never put an API key there;THRONE_API_KEY_FILEnames a key file instead. -
To change the command line, add a drop-in with
sudo systemctl edit throne:[Service] ExecStart= ExecStart=/opt/Throne/Throne --headless --data-dir=%S/throne --debug -
A second unit,
throne-web.service, runs the web UI. It is not enabled either.
Other Linux installs
The install script and the portable ZIP install no unit, and the AUR package may not ship one. Install the packaged unit:
curl -fsSLo throne.service https://raw.githubusercontent.com/throneproj/Throne/dev/dist/linux/throne.service
sudo install -m 644 throne.service /etc/systemd/system/throne.service
sudo systemctl daemon-reload && sudo systemctl enable --now throne
It runs /opt/Throne/Throne, where the install script puts Throne. For another folder, such as /usr/lib/throne of the AUR package, change the path with a drop-in (sudo systemctl edit throne):
[Service]
ExecStart=
ExecStart=/usr/lib/throne/Throne --headless --data-dir=%S/throne
For the variable examples, save dist/linux/throne.env as /etc/throne/throne.env.
Privileges on Linux
Tun mode and the kill switch need privileges. Extra Core profiles need a normal user, because Throne never runs an Extra Core as root. Choose how the unit runs:
| How the unit runs | Tun mode | Kill switch | Extra Core profiles |
|---|---|---|---|
| As root (the unit as shipped) | Yes | Yes | No |
As throne with capabilities (caps.conf) |
Yes | No (unsupported) |
Yes |
As throne with a setuid-root ThroneCore |
Yes | Yes | Yes |
As throne with nothing else |
No | No | Yes |
Capabilities. Download caps.conf, then:
sudo useradd --system --no-create-home --home-dir /var/lib/throne --shell /usr/sbin/nologin throne
sudo install -Dm644 caps.conf /etc/systemd/system/throne.service.d/caps.conf
sudo systemctl daemon-reload && sudo systemctl restart throne
ThroneCore must then have no setuid bit and no file capabilities, because running such a file drops the capabilities that the unit grants.
Setuid core. Use a drop-in with only User=throne and Group=throne under [Service], and make the core run as root:
sudo chown root:root /opt/Throne/ThroneCore && sudo chmod u+s /opt/Throne/ThroneCore
A package upgrade replaces ThroneCore without the setuid bit. On Debian and Ubuntu, sudo dpkg-statoverride --update --add root root 4755 /opt/Throne/ThroneCore keeps it. Do not add NoNewPrivileges=, or a hardening option that implies it, to the unit: it stops the setuid core.
thronectl status shows what this Throne can do in capabilities.tun and capabilities.kill_switch.
systemd user unit
Without root, Throne runs as a user unit in your own session. Download throne-user.service, then:
install -Dm644 throne-user.service ~/.config/systemd/user/throne.service
systemctl --user daemon-reload && systemctl --user enable --now throne
loginctl enable-linger "$USER" # start at boot, without a login
- It uses the desktop app's data directory,
~/.config/Throne, with the same profiles and settings. Quit the desktop app first, and runsystemctl --user stop thronebefore you open it again. - Tun mode and the kill switch need a setuid-root core. The desktop app sets it up when it first asks for privileges, and
Throne --checkprints the commands. - Run as your user,
Throne --health,--print-connectionand--checkfind this Throne without options.
Docker
The image ghcr.io/throneproj/throne (a release tag, or latest) runs on linux/amd64 and linux/arm64 and has thronectl in /usr/local/bin. Start from the compose.yaml in the Throne repository:
curl -fsSLO https://raw.githubusercontent.com/throneproj/Throne/dev/docker/compose.yaml
docker compose up -d
docker compose exec throne thronectl --key-file /var/lib/throne/config/api.key status
Its main parts:
services:
throne:
image: ghcr.io/throneproj/throne:latest # or a release tag
restart: unless-stopped
stop_grace_period: 45s
cap_add: [NET_ADMIN] # Tun and the kill switch
devices: ["/dev/net/tun:/dev/net/tun"] # Tun and the kill switch
volumes: ["throne-data:/var/lib/throne"]
ports: ["2080:2080"] # the mixed (HTTP and SOCKS) inbound
volumes:
throne-data:
- Proxy port. The mixed inbound listens on
127.0.0.1, which a published port cannot reach: runthronectl settings set inbound_address=0.0.0.0and start the profile again. Published ports bypass host firewalls such asufw; on a host that the internet reaches, publish only the LAN address ("192.168.1.2:2080:2080"). - Host network (
network_mode: host, noports:): Tun mode and the kill switch act on the whole host, and only one Throne there can run Tun mode. - Stopping. Keep
stop_grace_period: 45s, or Docker may kill Throne before it has stopped its core.restart: unless-stoppedstarts Throne again even afterthronectl shutdown; usedocker compose stop. - Health. The health check runs
Throne --health. Docker only marks an unhealthy container; it does not restart it. - Limits. No Extra Core profiles, because the container runs as root. In rootless Docker and other user-namespaced containers, the kill switch fails with
unsupported. - Options. Variables go under
environment:, flags incommand:(appended after--headless). Change the data directory only withTHRONE_DATA_DIR, which the health check uses. - thronectl. Set
THRONE_KEY_FILE: /var/lib/throne/config/api.keyunderenvironment:to drop--key-file. Import a file withdocker compose exec -T throne thronectl import - < links.txt. - API from the network. Set
THRONE_API_LISTEN: "*:9095"andTHRONE_API_ALLOW, publish port 9095, and addTHRONE_API_ADMIN_LAN: "1"for imports and settings, because requests through a published port come from outside the container. Behind Docker's NAT all clients share one address, so one client with an old key locks out the others for a minute. - Logs:
docker compose logs -f throne. Web UI: see Docker.
macOS
A LaunchDaemon runs Throne as root at boot, with Tun mode and the kill switch but without Extra Core profiles. Move Throne.app to /Applications, download moe.Throne.headless.plist, then:
sudo mkdir -p /Library/Logs/Throne
sudo install -m 644 -o root -g wheel moe.Throne.headless.plist /Library/LaunchDaemons/
sudo xattr -dr com.apple.quarantine /Applications/Throne.app # unsigned builds only
sudo launchctl bootstrap system /Library/LaunchDaemons/moe.Throne.headless.plist
- Stop and unload it with
sudo launchctl bootout system/moe.Throne.headless. - The log is
/Library/Logs/Throne/throne.log. For the state, runsudo /Applications/Throne.app/Contents/MacOS/Throne --health. - Never start headless Throne with
open: it returns at once, and launchd loses the process. - launchd starts Throne again 10 seconds after every exit with an error, also after errors that a new start does not fix (codes 3, 64 and 78). When Throne keeps starting and exiting, read the log.
Windows service
Throne.exe --headless --service runs as a Windows service under LocalSystem, so Tun mode and the kill switch work.
- Install Throne for all users with the installer, into
Program Files. A service must not run a program that a normal user can replace, so do not use a per-user installation or a ZIP in your user folder. - Download
install-service.batanduninstall-service.bat. - From an elevated Command Prompt, run
install-service.bat, orinstall-service.bat "D:\Apps\Throne\Throne.exe"for Throne in another folder.
The service Throne starts after boot (delayed start). Its recovery actions restart Throne after 3, 10 and then 60 seconds, also after an exit with an error code, such as a restart request (code 75) or a watchdog exit.
sc.exe stop Throneandthronectl shutdownstop it for good. Stop the service before you update Throne.- After an error,
sc.exe query Throneshows Throne's exit code asSERVICE_EXIT_CODE(WIN32_EXIT_CODEis then1066). The log isC:\ProgramData\Throne\config\logs\throne.log. uninstall-service.batremoves the service and keeps the data.
The data folder
The service keeps C:\ProgramData\Throne for SYSTEM and Administrators only. If the folder belongs to another user, lets other users write to it (as a folder you create by hand under C:\ProgramData does), or is or contains a link or junction, the service exits with code 78 and names the problem in the log. Delete the folder and start the service again.
Commands from a prompt
Run Throne.exe --health, --print-connection, --check and thronectl from an elevated prompt, and give the Throne.exe commands --data-dir C:\ProgramData\Throne: an administrator is not LocalSystem and has another default data directory. Only Administrators and SYSTEM can open the service's pipe and read its key file.
Throne.exe is a GUI program, so the Command Prompt does not wait for it. To wait and read its exit code:
start "" /wait "C:\Program Files\Throne\Throne.exe" --health --data-dir C:\ProgramData\Throne
echo %ERRORLEVEL%
--print-connection prints POSIX export lines. In PowerShell, set the values yourself:
$env:THRONE_ADDR = '127.0.0.1:9095'
$env:THRONE_KEY_FILE = 'C:\ProgramData\Throne\config\api.key'
thronectl status