road-poneglyph 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 axatbhardwaj
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,263 @@
1
+ Metadata-Version: 2.4
2
+ Name: road-poneglyph
3
+ Version: 0.2.0
4
+ Summary: A Linux dedicated game server launcher for Palworld and ARK: Survival Evolved — manages steamcmd, systemd, and polkit on Debian/Ubuntu.
5
+ Author-email: axatbhardwaj <axatbhardwaj@gmail.com>
6
+ License-Expression: MIT
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Operating System :: POSIX :: Linux
9
+ Requires-Python: >=3.8
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: typer<0.21,>=0.9
13
+ Requires-Dist: rich<14,>=13.0
14
+ Dynamic: license-file
15
+
16
+ # road-poneglyph
17
+
18
+ A multi-game dedicated server launcher for Linux. `road-poneglyph` installs, configures, and manages Palworld and ARK: Survival Evolved servers on Debian and Ubuntu using `systemd` and Polkit (Palworld) or `arkmanager` wrapped by a NOPASSWD sudoers fragment (ARK). Day-to-day start/stop/restart of Palworld needs no `sudo` at all; ARK management uses `sudo -u steam arkmanager ...` without a password prompt thanks to the installed `/etc/sudoers.d/road-poneglyph-ark` fragment.
19
+
20
+ ## Features
21
+
22
+ - **Two games, one CLI**: `road-poneglyph palworld <verb>` installs a native systemd service for PalServer; `road-poneglyph ark <verb>` installs ark-server-tools (`arkmanager`) and wraps every verb.
23
+ - **Automated installation**: downloads SteamCMD, pulls the right app (Palworld app id 2394010 or ARK: Survival Evolved app id 376030), and writes a systemd unit.
24
+ - **Package manager repair**: attempts to fix common `apt`/`dpkg` breakage before running steamcmd.
25
+ - **Merged Polkit rule**: a single `/etc/polkit-1/rules.d/40-road-poneglyph.rules` authorises the invoking user to start/stop/restart every known game service unit without `sudo`.
26
+ - **ARK sudoers fragment**: `/etc/sudoers.d/road-poneglyph-ark` lets the invoking user run `sudo -u steam /usr/local/bin/arkmanager *` with no password prompt.
27
+ - **Opt-in autostart for ARK**: `arkserver.service` is NOT installed by default. Pass `--enable-autostart` to `road-poneglyph ark install` to write and enable the systemd unit; without the flag, manage the server exclusively through `road-poneglyph ark start/stop/...` (which call `arkmanager` directly — no systemd unit needed).
28
+ - **Interactive settings editor**: `edit-settings` parses the per-game config file (`PalWorldSettings.ini` for Palworld, `/etc/arkmanager/instances/main.cfg` for ARK) and lets you change values interactively.
29
+
30
+ ## Prerequisites
31
+
32
+ - A Debian 12+/13 or Ubuntu 22.04+/24.04 server (Linux only).
33
+ - `sudo` privileges for the user running `road-poneglyph`.
34
+ - Python 3.8 or newer.
35
+ - For ARK only: apt components `contrib non-free` (Debian) or `multiverse` (Ubuntu). `road-poneglyph ark install` enables `contrib non-free` on Debian automatically; Ubuntu server images ship `multiverse` by default.
36
+
37
+ ## Installation
38
+
39
+ ```bash
40
+ pip install road-poneglyph
41
+ ```
42
+
43
+ The PyPI distribution is named `road-poneglyph`; the installed CLI binary is `road-poneglyph`. A pipx install also works if you prefer an isolated user-level environment:
44
+
45
+ ```bash
46
+ pipx install road-poneglyph
47
+ ```
48
+
49
+ ## Migration from palworld-server-launcher v0.1.19
50
+
51
+ `road-poneglyph` v0.2.0 replaces the older `palworld-server-launcher` v0.1.19 package. Read this section before upgrading — the distribution rename means a `pip install --upgrade` on the old name will NOT pull v0.2.0.
52
+
53
+ - **PyPI distribution renamed.** v0.1.19 shipped as `palworld-server-launcher`; v0.2.0 ships as `road-poneglyph`. `pip install --upgrade palworld-server-launcher` will not find v0.2.0 — the name changed.
54
+ - **Recommended path: fresh install.** Install the new distribution rather than trying to upgrade in place:
55
+
56
+ ```bash
57
+ pip install road-poneglyph
58
+ pip uninstall palworld-server-launcher # safe — separate distribution
59
+ ```
60
+
61
+ - **CLI entry point changed.** The old binary was `palworld-server-launcher`; the new binary is `road-poneglyph`. Update shell aliases, cron entries, or shell scripts that invoke the legacy name.
62
+ - **Your existing Palworld server keeps working.** v0.1.19 installed `/etc/systemd/system/palserver.service` and game files under `~/Steam/steamapps/common/PalServer`. v0.2.0 operates on the same systemd unit and the same directory — `road-poneglyph palworld start`, `stop`, `restart`, `status` all target the service your v0.1.19 install created. No reinstall is required just to adopt the new CLI name.
63
+ - **Manual Polkit cleanup (POL-04).** v0.1.19 wrote `/etc/polkit-1/rules.d/40-palserver.rules`. v0.2.0 writes `/etc/polkit-1/rules.d/40-road-poneglyph.rules` instead — the merged rule covers every known game service unit. Polkit merges rule files additively, so the two files coexist harmlessly. Once you have confirmed that `road-poneglyph palworld start` / `stop` / `restart` work without a password under v0.2.0, remove the old rule:
64
+
65
+ ```bash
66
+ sudo rm /etc/polkit-1/rules.d/40-palserver.rules
67
+ ```
68
+
69
+ ## Quick Start
70
+
71
+ ### Palworld
72
+
73
+ ```bash
74
+ # Install at port 8211 with a 16-player cap and start immediately
75
+ road-poneglyph palworld install --port 8211 --players 16 --start
76
+ ```
77
+
78
+ ### ARK: Survival Evolved
79
+
80
+ ```bash
81
+ # Install with the admin password you want to use (or omit --admin-password for a
82
+ # hidden prompt) and start the server
83
+ road-poneglyph ark install --map TheIsland --admin-password 'your-strong-password' --start
84
+ ```
85
+
86
+ If you prefer not to pick a password yourself, use `--generate-password` and `road-poneglyph` will generate a 128-bit url-safe admin password and print it once.
87
+
88
+ ## Palworld Usage (`road-poneglyph palworld <verb>`)
89
+
90
+ Every Palworld verb targets the native `palserver.service` systemd unit. Start/stop/restart run without `sudo` thanks to `/etc/polkit-1/rules.d/40-road-poneglyph.rules`.
91
+
92
+ ```bash
93
+ # Install (downloads SteamCMD, pulls PalServer, writes palserver.service)
94
+ road-poneglyph palworld install --port 8211 --players 32 --start
95
+ ```
96
+ Creates the systemd unit at port 8211 with a 32-player cap and starts the server right away.
97
+
98
+ ```bash
99
+ road-poneglyph palworld start
100
+ ```
101
+ Starts `palserver.service` via `systemctl start` (no sudo required).
102
+
103
+ ```bash
104
+ road-poneglyph palworld stop
105
+ ```
106
+ Stops the server gracefully.
107
+
108
+ ```bash
109
+ road-poneglyph palworld restart
110
+ ```
111
+ Restarts the service — useful after editing `PalWorldSettings.ini`.
112
+
113
+ ```bash
114
+ road-poneglyph palworld status
115
+ ```
116
+ Shows current service status (`systemctl status palserver`).
117
+
118
+ ```bash
119
+ road-poneglyph palworld enable
120
+ ```
121
+ Enables `palserver.service` at boot.
122
+
123
+ ```bash
124
+ road-poneglyph palworld disable
125
+ ```
126
+ Disables `palserver.service` at boot.
127
+
128
+ ```bash
129
+ road-poneglyph palworld update
130
+ ```
131
+ Re-runs SteamCMD against the Palworld app id and leaves the service untouched. Restart the service afterwards to pick up changes.
132
+
133
+ ```bash
134
+ road-poneglyph palworld edit-settings
135
+ ```
136
+ Opens an interactive editor against `PalWorldSettings.ini`, preserving unknown keys.
137
+
138
+ ## ARK Usage (`road-poneglyph ark <verb>`)
139
+
140
+ The ARK integration is an `arkmanager` (`ark-server-tools`) wrapper. `road-poneglyph ark install` creates a dedicated `steam` system user, drops `/etc/sudoers.d/road-poneglyph-ark` to allow the invoking user to call `sudo -u steam /usr/local/bin/arkmanager *` without a password, and writes `/etc/arkmanager/instances/main.cfg`. An `arkserver.service` unit is written **only when `--enable-autostart` is passed at install time**; otherwise no systemd unit exists for ARK and day-to-day management goes through `arkmanager` directly via `road-poneglyph ark <verb>`.
141
+
142
+ Valid maps (12 supported): TheIsland, TheCenter, ScorchedEarth_P, Aberration_P, Extinction, Ragnarok, Valguero_P, CrystalIsles, LostIsland, Fjordur, Genesis, Genesis2.
143
+
144
+ ```bash
145
+ # Minimal install
146
+ road-poneglyph ark install --admin-password 'strong-password'
147
+
148
+ # Full-featured install: autostart on boot, custom session name, start now
149
+ road-poneglyph ark install \
150
+ --map Ragnarok \
151
+ --port 7778 --query-port 27015 --rcon-port 27020 \
152
+ --players 20 \
153
+ --session-name 'MyArkServer' \
154
+ --admin-password 'strong-password' \
155
+ --beta preaquatica \
156
+ --enable-autostart --start
157
+ ```
158
+ Runs a full `arkmanager` install: enables the required apt components on Debian, creates the `steam` user, fetches ark-server-tools, writes `main.cfg`, and optionally enables boot autostart.
159
+
160
+ ```bash
161
+ road-poneglyph ark start
162
+ ```
163
+ Runs `sudo -u steam /usr/local/bin/arkmanager start` — boots the ARK server via `arkmanager`.
164
+
165
+ ```bash
166
+ road-poneglyph ark stop
167
+ ```
168
+ Graceful shutdown via `arkmanager stop` (saves world).
169
+
170
+ ```bash
171
+ road-poneglyph ark restart
172
+ ```
173
+ Runs `arkmanager restart`.
174
+
175
+ ```bash
176
+ road-poneglyph ark status
177
+ ```
178
+ `arkmanager status` — shows running state and connected players.
179
+
180
+ ```bash
181
+ road-poneglyph ark saveworld
182
+ ```
183
+ Forces a world save via `arkmanager saveworld` (uses RCON under the hood).
184
+
185
+ ```bash
186
+ road-poneglyph ark backup
187
+ ```
188
+ Creates a save backup via `arkmanager backup`.
189
+
190
+ ```bash
191
+ road-poneglyph ark update
192
+ ```
193
+ Updates the ARK server. Runs `arkmanager update --validate --beta=preaquatica` twice on purpose — steamcmd has a known first-run self-update quirk where the first invocation only updates steamcmd itself; the second invocation does the actual game update.
194
+
195
+ ```bash
196
+ road-poneglyph ark enable
197
+ ```
198
+ Enables `arkserver.service` at boot. Only effective if `arkserver.service` exists — pass `--enable-autostart` to `road-poneglyph ark install` if you did not already.
199
+
200
+ ```bash
201
+ road-poneglyph ark disable
202
+ ```
203
+ Disables `arkserver.service` from starting at boot.
204
+
205
+ ```bash
206
+ road-poneglyph ark edit-settings
207
+ ```
208
+ Opens an interactive editor against `/etc/arkmanager/instances/main.cfg` (arkmanager's instance config). It does NOT edit `GameUserSettings.ini` — arkmanager owns that file; editing it by hand is unsupported.
209
+
210
+ ## Firewall / Port Reference
211
+
212
+ `road-poneglyph` does NOT manage your firewall. Open the ports below yourself (example `ufw` rules included).
213
+
214
+ | Game | Protocol | Port | Purpose |
215
+ |----------|----------|-------|------------------------------------------|
216
+ | Palworld | UDP | 8211 | Game + query (single port) |
217
+ | ARK | UDP | 7777 | Game port (implicit in arkmanager) |
218
+ | ARK | UDP | 7778 | `ark_Port` raw socket |
219
+ | ARK | UDP | 27015 | `ark_QueryPort` Steam query |
220
+ | ARK | TCP | 27020 | `ark_RCONPort` RCON admin |
221
+
222
+ Example ufw rules:
223
+
224
+ ```bash
225
+ # Palworld
226
+ sudo ufw allow 8211/udp
227
+
228
+ # ARK
229
+ sudo ufw allow 7777/udp
230
+ sudo ufw allow 7778/udp
231
+ sudo ufw allow 27015/udp
232
+ sudo ufw allow 27020/tcp
233
+ ```
234
+
235
+ ## Permissions & Security Model
236
+
237
+ **Palworld.** The merged Polkit rule at `/etc/polkit-1/rules.d/40-road-poneglyph.rules` grants the installing user permission to invoke `org.freedesktop.systemd1.manage-units` on `palserver.service` (and every other registered game service unit) without `sudo`. You can verify the grant with:
238
+
239
+ ```bash
240
+ pkcheck --action-id=org.freedesktop.systemd1.manage-units \
241
+ --process $$ --allow-user-interaction
242
+ ```
243
+
244
+ No part of the Palworld flow edits `/etc/sudoers` or asks for a password after installation.
245
+
246
+ **ARK.** The `arkmanager` tool runs as a dedicated `steam` system user, so every ARK verb is really `sudo -u steam /usr/local/bin/arkmanager ...`. `road-poneglyph ark install` writes `/etc/sudoers.d/road-poneglyph-ark`, which grants the installing user exactly `NOPASSWD: /usr/local/bin/arkmanager *` — no broader sudo rights, no wildcard path, no `ALL=(ALL)` clause. This is the minimum permission surface that still lets you run `road-poneglyph ark start`, `stop`, `saveworld`, `backup`, etc. without being prompted for a password.
247
+
248
+ ## Version
249
+
250
+ ```bash
251
+ road-poneglyph --version
252
+ ```
253
+
254
+ ## Supported OS
255
+
256
+ - Debian 12 (bookworm) and Debian 13 (trixie).
257
+ - Ubuntu 22.04 LTS and Ubuntu 24.04 LTS.
258
+ - Linux only. macOS and Windows are not supported.
259
+ - ARK prerequisite: `contrib non-free` apt components on Debian (enabled automatically by `road-poneglyph ark install`), or `multiverse` on Ubuntu (already present on stock Ubuntu server images).
260
+
261
+ ## License
262
+
263
+ MIT — see `LICENSE`.
@@ -0,0 +1,248 @@
1
+ # road-poneglyph
2
+
3
+ A multi-game dedicated server launcher for Linux. `road-poneglyph` installs, configures, and manages Palworld and ARK: Survival Evolved servers on Debian and Ubuntu using `systemd` and Polkit (Palworld) or `arkmanager` wrapped by a NOPASSWD sudoers fragment (ARK). Day-to-day start/stop/restart of Palworld needs no `sudo` at all; ARK management uses `sudo -u steam arkmanager ...` without a password prompt thanks to the installed `/etc/sudoers.d/road-poneglyph-ark` fragment.
4
+
5
+ ## Features
6
+
7
+ - **Two games, one CLI**: `road-poneglyph palworld <verb>` installs a native systemd service for PalServer; `road-poneglyph ark <verb>` installs ark-server-tools (`arkmanager`) and wraps every verb.
8
+ - **Automated installation**: downloads SteamCMD, pulls the right app (Palworld app id 2394010 or ARK: Survival Evolved app id 376030), and writes a systemd unit.
9
+ - **Package manager repair**: attempts to fix common `apt`/`dpkg` breakage before running steamcmd.
10
+ - **Merged Polkit rule**: a single `/etc/polkit-1/rules.d/40-road-poneglyph.rules` authorises the invoking user to start/stop/restart every known game service unit without `sudo`.
11
+ - **ARK sudoers fragment**: `/etc/sudoers.d/road-poneglyph-ark` lets the invoking user run `sudo -u steam /usr/local/bin/arkmanager *` with no password prompt.
12
+ - **Opt-in autostart for ARK**: `arkserver.service` is NOT installed by default. Pass `--enable-autostart` to `road-poneglyph ark install` to write and enable the systemd unit; without the flag, manage the server exclusively through `road-poneglyph ark start/stop/...` (which call `arkmanager` directly — no systemd unit needed).
13
+ - **Interactive settings editor**: `edit-settings` parses the per-game config file (`PalWorldSettings.ini` for Palworld, `/etc/arkmanager/instances/main.cfg` for ARK) and lets you change values interactively.
14
+
15
+ ## Prerequisites
16
+
17
+ - A Debian 12+/13 or Ubuntu 22.04+/24.04 server (Linux only).
18
+ - `sudo` privileges for the user running `road-poneglyph`.
19
+ - Python 3.8 or newer.
20
+ - For ARK only: apt components `contrib non-free` (Debian) or `multiverse` (Ubuntu). `road-poneglyph ark install` enables `contrib non-free` on Debian automatically; Ubuntu server images ship `multiverse` by default.
21
+
22
+ ## Installation
23
+
24
+ ```bash
25
+ pip install road-poneglyph
26
+ ```
27
+
28
+ The PyPI distribution is named `road-poneglyph`; the installed CLI binary is `road-poneglyph`. A pipx install also works if you prefer an isolated user-level environment:
29
+
30
+ ```bash
31
+ pipx install road-poneglyph
32
+ ```
33
+
34
+ ## Migration from palworld-server-launcher v0.1.19
35
+
36
+ `road-poneglyph` v0.2.0 replaces the older `palworld-server-launcher` v0.1.19 package. Read this section before upgrading — the distribution rename means a `pip install --upgrade` on the old name will NOT pull v0.2.0.
37
+
38
+ - **PyPI distribution renamed.** v0.1.19 shipped as `palworld-server-launcher`; v0.2.0 ships as `road-poneglyph`. `pip install --upgrade palworld-server-launcher` will not find v0.2.0 — the name changed.
39
+ - **Recommended path: fresh install.** Install the new distribution rather than trying to upgrade in place:
40
+
41
+ ```bash
42
+ pip install road-poneglyph
43
+ pip uninstall palworld-server-launcher # safe — separate distribution
44
+ ```
45
+
46
+ - **CLI entry point changed.** The old binary was `palworld-server-launcher`; the new binary is `road-poneglyph`. Update shell aliases, cron entries, or shell scripts that invoke the legacy name.
47
+ - **Your existing Palworld server keeps working.** v0.1.19 installed `/etc/systemd/system/palserver.service` and game files under `~/Steam/steamapps/common/PalServer`. v0.2.0 operates on the same systemd unit and the same directory — `road-poneglyph palworld start`, `stop`, `restart`, `status` all target the service your v0.1.19 install created. No reinstall is required just to adopt the new CLI name.
48
+ - **Manual Polkit cleanup (POL-04).** v0.1.19 wrote `/etc/polkit-1/rules.d/40-palserver.rules`. v0.2.0 writes `/etc/polkit-1/rules.d/40-road-poneglyph.rules` instead — the merged rule covers every known game service unit. Polkit merges rule files additively, so the two files coexist harmlessly. Once you have confirmed that `road-poneglyph palworld start` / `stop` / `restart` work without a password under v0.2.0, remove the old rule:
49
+
50
+ ```bash
51
+ sudo rm /etc/polkit-1/rules.d/40-palserver.rules
52
+ ```
53
+
54
+ ## Quick Start
55
+
56
+ ### Palworld
57
+
58
+ ```bash
59
+ # Install at port 8211 with a 16-player cap and start immediately
60
+ road-poneglyph palworld install --port 8211 --players 16 --start
61
+ ```
62
+
63
+ ### ARK: Survival Evolved
64
+
65
+ ```bash
66
+ # Install with the admin password you want to use (or omit --admin-password for a
67
+ # hidden prompt) and start the server
68
+ road-poneglyph ark install --map TheIsland --admin-password 'your-strong-password' --start
69
+ ```
70
+
71
+ If you prefer not to pick a password yourself, use `--generate-password` and `road-poneglyph` will generate a 128-bit url-safe admin password and print it once.
72
+
73
+ ## Palworld Usage (`road-poneglyph palworld <verb>`)
74
+
75
+ Every Palworld verb targets the native `palserver.service` systemd unit. Start/stop/restart run without `sudo` thanks to `/etc/polkit-1/rules.d/40-road-poneglyph.rules`.
76
+
77
+ ```bash
78
+ # Install (downloads SteamCMD, pulls PalServer, writes palserver.service)
79
+ road-poneglyph palworld install --port 8211 --players 32 --start
80
+ ```
81
+ Creates the systemd unit at port 8211 with a 32-player cap and starts the server right away.
82
+
83
+ ```bash
84
+ road-poneglyph palworld start
85
+ ```
86
+ Starts `palserver.service` via `systemctl start` (no sudo required).
87
+
88
+ ```bash
89
+ road-poneglyph palworld stop
90
+ ```
91
+ Stops the server gracefully.
92
+
93
+ ```bash
94
+ road-poneglyph palworld restart
95
+ ```
96
+ Restarts the service — useful after editing `PalWorldSettings.ini`.
97
+
98
+ ```bash
99
+ road-poneglyph palworld status
100
+ ```
101
+ Shows current service status (`systemctl status palserver`).
102
+
103
+ ```bash
104
+ road-poneglyph palworld enable
105
+ ```
106
+ Enables `palserver.service` at boot.
107
+
108
+ ```bash
109
+ road-poneglyph palworld disable
110
+ ```
111
+ Disables `palserver.service` at boot.
112
+
113
+ ```bash
114
+ road-poneglyph palworld update
115
+ ```
116
+ Re-runs SteamCMD against the Palworld app id and leaves the service untouched. Restart the service afterwards to pick up changes.
117
+
118
+ ```bash
119
+ road-poneglyph palworld edit-settings
120
+ ```
121
+ Opens an interactive editor against `PalWorldSettings.ini`, preserving unknown keys.
122
+
123
+ ## ARK Usage (`road-poneglyph ark <verb>`)
124
+
125
+ The ARK integration is an `arkmanager` (`ark-server-tools`) wrapper. `road-poneglyph ark install` creates a dedicated `steam` system user, drops `/etc/sudoers.d/road-poneglyph-ark` to allow the invoking user to call `sudo -u steam /usr/local/bin/arkmanager *` without a password, and writes `/etc/arkmanager/instances/main.cfg`. An `arkserver.service` unit is written **only when `--enable-autostart` is passed at install time**; otherwise no systemd unit exists for ARK and day-to-day management goes through `arkmanager` directly via `road-poneglyph ark <verb>`.
126
+
127
+ Valid maps (12 supported): TheIsland, TheCenter, ScorchedEarth_P, Aberration_P, Extinction, Ragnarok, Valguero_P, CrystalIsles, LostIsland, Fjordur, Genesis, Genesis2.
128
+
129
+ ```bash
130
+ # Minimal install
131
+ road-poneglyph ark install --admin-password 'strong-password'
132
+
133
+ # Full-featured install: autostart on boot, custom session name, start now
134
+ road-poneglyph ark install \
135
+ --map Ragnarok \
136
+ --port 7778 --query-port 27015 --rcon-port 27020 \
137
+ --players 20 \
138
+ --session-name 'MyArkServer' \
139
+ --admin-password 'strong-password' \
140
+ --beta preaquatica \
141
+ --enable-autostart --start
142
+ ```
143
+ Runs a full `arkmanager` install: enables the required apt components on Debian, creates the `steam` user, fetches ark-server-tools, writes `main.cfg`, and optionally enables boot autostart.
144
+
145
+ ```bash
146
+ road-poneglyph ark start
147
+ ```
148
+ Runs `sudo -u steam /usr/local/bin/arkmanager start` — boots the ARK server via `arkmanager`.
149
+
150
+ ```bash
151
+ road-poneglyph ark stop
152
+ ```
153
+ Graceful shutdown via `arkmanager stop` (saves world).
154
+
155
+ ```bash
156
+ road-poneglyph ark restart
157
+ ```
158
+ Runs `arkmanager restart`.
159
+
160
+ ```bash
161
+ road-poneglyph ark status
162
+ ```
163
+ `arkmanager status` — shows running state and connected players.
164
+
165
+ ```bash
166
+ road-poneglyph ark saveworld
167
+ ```
168
+ Forces a world save via `arkmanager saveworld` (uses RCON under the hood).
169
+
170
+ ```bash
171
+ road-poneglyph ark backup
172
+ ```
173
+ Creates a save backup via `arkmanager backup`.
174
+
175
+ ```bash
176
+ road-poneglyph ark update
177
+ ```
178
+ Updates the ARK server. Runs `arkmanager update --validate --beta=preaquatica` twice on purpose — steamcmd has a known first-run self-update quirk where the first invocation only updates steamcmd itself; the second invocation does the actual game update.
179
+
180
+ ```bash
181
+ road-poneglyph ark enable
182
+ ```
183
+ Enables `arkserver.service` at boot. Only effective if `arkserver.service` exists — pass `--enable-autostart` to `road-poneglyph ark install` if you did not already.
184
+
185
+ ```bash
186
+ road-poneglyph ark disable
187
+ ```
188
+ Disables `arkserver.service` from starting at boot.
189
+
190
+ ```bash
191
+ road-poneglyph ark edit-settings
192
+ ```
193
+ Opens an interactive editor against `/etc/arkmanager/instances/main.cfg` (arkmanager's instance config). It does NOT edit `GameUserSettings.ini` — arkmanager owns that file; editing it by hand is unsupported.
194
+
195
+ ## Firewall / Port Reference
196
+
197
+ `road-poneglyph` does NOT manage your firewall. Open the ports below yourself (example `ufw` rules included).
198
+
199
+ | Game | Protocol | Port | Purpose |
200
+ |----------|----------|-------|------------------------------------------|
201
+ | Palworld | UDP | 8211 | Game + query (single port) |
202
+ | ARK | UDP | 7777 | Game port (implicit in arkmanager) |
203
+ | ARK | UDP | 7778 | `ark_Port` raw socket |
204
+ | ARK | UDP | 27015 | `ark_QueryPort` Steam query |
205
+ | ARK | TCP | 27020 | `ark_RCONPort` RCON admin |
206
+
207
+ Example ufw rules:
208
+
209
+ ```bash
210
+ # Palworld
211
+ sudo ufw allow 8211/udp
212
+
213
+ # ARK
214
+ sudo ufw allow 7777/udp
215
+ sudo ufw allow 7778/udp
216
+ sudo ufw allow 27015/udp
217
+ sudo ufw allow 27020/tcp
218
+ ```
219
+
220
+ ## Permissions & Security Model
221
+
222
+ **Palworld.** The merged Polkit rule at `/etc/polkit-1/rules.d/40-road-poneglyph.rules` grants the installing user permission to invoke `org.freedesktop.systemd1.manage-units` on `palserver.service` (and every other registered game service unit) without `sudo`. You can verify the grant with:
223
+
224
+ ```bash
225
+ pkcheck --action-id=org.freedesktop.systemd1.manage-units \
226
+ --process $$ --allow-user-interaction
227
+ ```
228
+
229
+ No part of the Palworld flow edits `/etc/sudoers` or asks for a password after installation.
230
+
231
+ **ARK.** The `arkmanager` tool runs as a dedicated `steam` system user, so every ARK verb is really `sudo -u steam /usr/local/bin/arkmanager ...`. `road-poneglyph ark install` writes `/etc/sudoers.d/road-poneglyph-ark`, which grants the installing user exactly `NOPASSWD: /usr/local/bin/arkmanager *` — no broader sudo rights, no wildcard path, no `ALL=(ALL)` clause. This is the minimum permission surface that still lets you run `road-poneglyph ark start`, `stop`, `saveworld`, `backup`, etc. without being prompted for a password.
232
+
233
+ ## Version
234
+
235
+ ```bash
236
+ road-poneglyph --version
237
+ ```
238
+
239
+ ## Supported OS
240
+
241
+ - Debian 12 (bookworm) and Debian 13 (trixie).
242
+ - Ubuntu 22.04 LTS and Ubuntu 24.04 LTS.
243
+ - Linux only. macOS and Windows are not supported.
244
+ - ARK prerequisite: `contrib non-free` apt components on Debian (enabled automatically by `road-poneglyph ark install`), or `multiverse` on Ubuntu (already present on stock Ubuntu server images).
245
+
246
+ ## License
247
+
248
+ MIT — see `LICENSE`.
@@ -0,0 +1,31 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "road-poneglyph"
7
+ version = "0.2.0"
8
+ authors = [
9
+ { name = "axatbhardwaj", email = "axatbhardwaj@gmail.com" },
10
+ ]
11
+ description = "A Linux dedicated game server launcher for Palworld and ARK: Survival Evolved — manages steamcmd, systemd, and polkit on Debian/Ubuntu."
12
+ readme = "README.md"
13
+ license = "MIT"
14
+ requires-python = ">=3.8"
15
+ classifiers = [
16
+ "Programming Language :: Python :: 3",
17
+ "Operating System :: POSIX :: Linux",
18
+ ]
19
+ dependencies = [
20
+ "typer>=0.9,<0.21",
21
+ "rich>=13.0,<14",
22
+ ]
23
+
24
+ [project.scripts]
25
+ road-poneglyph = "road_poneglyph.main:app"
26
+
27
+ [tool.setuptools]
28
+ packages = ["road_poneglyph"]
29
+
30
+ [tool.setuptools.package-data]
31
+ "road_poneglyph" = ["templates/*"]
@@ -0,0 +1 @@
1
+ from __future__ import annotations