Skip to content

Commit 81e474b

Browse files
authored
Merge branch 'master' into parallel-build-manager-workflow
2 parents a424af7 + d56f902 commit 81e474b

File tree

14 files changed

+157
-61
lines changed

14 files changed

+157
-61
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# [0.1.0-alpha.68](https://github.com/raghavyuva/nixopus/compare/v0.1.0-alpha.67...v0.1.0-alpha.68) (2025-11-24)
2+
3+
4+
### Bug Fixes
5+
6+
* feature disabled error on signup ([#587](https://github.com/raghavyuva/nixopus/issues/587)) ([8af20ab](https://github.com/raghavyuva/nixopus/commit/8af20abf6c02706e6e726e63da4df7a1399645a3))
7+
8+
9+
110
# [0.1.0-alpha.67](https://github.com/raghavyuva/nixopus/compare/v0.1.0-alpha.66...v0.1.0-alpha.67) (2025-11-21)
211

312

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ You can customize your installation by providing the following optional paramete
6969
Example with optional parameters:
7070

7171
```bash
72-
nixopus install \
72+
sudo nixopus install \
7373
--api-domain nixopusapi.example.tld \
7474
--view-domain nixopus.example.tld \
7575
--verbose \
@@ -79,11 +79,14 @@ nixopus install \
7979
Example for custom ip setup:
8080

8181
```bash
82-
nixopus install \
82+
sudo nixopus install \
8383
--host-ip 10.0.0.154 \
8484
--verbose
8585
```
8686

87+
> [!NOTE]
88+
> Running `nixopus install` requires root privileges (sudo) to install system dependencies like Docker. If you encounter permission errors, make sure to run the command with `sudo`.
89+
8790
You can also install the CLI and run `nixopus install` with options in a single command, refer [installation documentation](https://docs.nixopus.com/install/#installation-options) for more details on options
8891

8992
## About the Name

cli/app/commands/install/deps.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ def install_dep(dep, package_manager, logger, dry_run=False):
6464
if dry_run:
6565
logger.info(f"[DRY RUN] Would run: {install_command}")
6666
return True
67-
subprocess.check_call(install_command, shell=True)
67+
result = subprocess.run(install_command, shell=True, capture_output=True, text=True)
68+
if result.returncode != 0:
69+
error_output = result.stderr.strip() or result.stdout.strip()
70+
if error_output:
71+
logger.error(f"Installation command output: {error_output}")
72+
raise subprocess.CalledProcessError(result.returncode, install_command, result.stdout, result.stderr)
6873
return True
6974
if package_manager == "apt":
7075
cmd = ["sudo", "apt-get", "install", "-y", package]
@@ -86,6 +91,15 @@ def install_dep(dep, package_manager, logger, dry_run=False):
8691
return True
8792
subprocess.check_call(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
8893
return True
94+
except subprocess.CalledProcessError as e:
95+
error_msg = str(e)
96+
if "docker" in package.lower() and (e.returncode == 100 or "permission" in error_msg.lower()):
97+
logger.error(failed_to_install.format(dep=package, error=f"Exit code {e.returncode}"))
98+
logger.error("Docker installation requires root privileges.")
99+
logger.error("Please run: sudo nixopus install")
100+
else:
101+
logger.error(failed_to_install.format(dep=package, error=e))
102+
return False
89103
except Exception as e:
90104
logger.error(failed_to_install.format(dep=package, error=e))
91105
return False

cli/app/commands/version/version.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
from importlib.metadata import version
1+
import sys
2+
from importlib.metadata import PackageNotFoundError, version
3+
from pathlib import Path
24

35
from rich.console import Console
46
from rich.panel import Panel
@@ -9,9 +11,27 @@ class VersionCommand:
911
def __init__(self):
1012
self.console = Console()
1113

14+
def _get_version(self) -> str:
15+
"""Get version from package metadata or bundled version.txt"""
16+
try:
17+
return version("nixopus")
18+
except PackageNotFoundError:
19+
# Read from version.txt (works in both dev and PyInstaller bundle)
20+
if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
21+
# Running from PyInstaller bundle
22+
version_file = Path(sys._MEIPASS) / "version.txt"
23+
else:
24+
# Running from source
25+
version_file = Path(__file__).parent.parent.parent.parent.parent / "version.txt"
26+
27+
if version_file.exists():
28+
return version_file.read_text().strip().lstrip("v")
29+
30+
return "unknown"
31+
1232
def run(self):
1333
"""Display the version of the CLI"""
14-
cli_version = version("nixopus")
34+
cli_version = self._get_version()
1535

1636
version_text = Text()
1737
version_text.append("Nixopus CLI", style="bold blue")

cli/app/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import os
22
import time
3-
from importlib.metadata import version as get_version
43

54
import typer
65
from rich.console import Console
@@ -73,7 +72,8 @@ def main(
7372

7473
console.print(panel)
7574

76-
cli_version = get_version("nixopus")
75+
version_cmd = VersionCommand()
76+
cli_version = version_cmd._get_version()
7777
version_text = Text()
7878
version_text.append("Version: ", style="bold white")
7979
version_text.append(f"v{cli_version}", style="green")

cli/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ a = Analysis(
8181
datas=[
8282
('../helpers/config.prod.yaml', 'helpers/'),
8383
('../helpers/config.dev.yaml', 'helpers/'),
84+
('../version.txt', '.'),
8485
],
8586
hiddenimports=[
8687
'app.commands.clone.command',

cli/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "nixopus"
3-
version = "0.1.26"
3+
version = "0.1.28"
44
description = "A CLI for Nixopus"
55
authors = ["Nixopus <[email protected]>"]
66
readme = "README.md"

docs/cli/installation.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,11 @@ Once the CLI is installed, you can use it to install Nixopus on your VPS:
190190
::: code-group
191191

192192
```bash [Basic Installation]
193-
nixopus install
193+
sudo nixopus install
194194
```
195195

196196
```bash [With Custom Domains]
197-
nixopus install \
197+
sudo nixopus install \
198198
--api-domain api.example.com \
199199
--view-domain app.example.com \
200200
--verbose
@@ -205,11 +205,15 @@ nixopus preflight
205205
```
206206

207207
```bash [Install Dependencies Only]
208-
nixopus install deps
208+
sudo nixopus install deps
209209
```
210210

211211
:::
212212

213+
::: warning Root Privileges Required
214+
The `nixopus install` command requires root privileges to install system dependencies like Docker. Always use `sudo` unless you're already running as root. If you encounter permission errors or "exit status 100", ensure you're using sudo.
215+
:::
216+
213217
::: tip Preflight Check
214218
Always run `nixopus preflight` before installation to verify your system meets all requirements. This can save time by catching issues early.
215219
:::

docs/install/index.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,13 @@ curl -sSL https://install.nixopus.com | bash -s -- --skip-nixopus-install
6161
Once the CLI is installed, you can install Nixopus on your VPS:
6262

6363
```bash
64-
nixopus install
64+
sudo nixopus install
6565
```
6666

67+
::: warning Sudo Required
68+
Running `nixopus install` requires root privileges to install system dependencies (like Docker). Always use `sudo` when running the install command. If you encounter "exit status 100" or permission errors, ensure you're using sudo.
69+
:::
70+
6771
::: info CLI Verification
6872
Before proceeding, verify the CLI is working:
6973
```bash
@@ -251,27 +255,37 @@ If you've already installed the CLI separately, you can run `nixopus install` di
251255
::: code-group
252256

253257
```bash [With Domains]
254-
nixopus install \
258+
sudo nixopus install \
255259
--api-domain api.example.com \
256260
--view-domain example.com \
257261
--verbose
258262
```
259263

260264
```bash [With IP]
261-
nixopus install \
265+
sudo nixopus install \
262266
--host-ip 192.168.1.100 \
263267
--verbose
264268
```
265269

266270
```bash [Custom Ports]
267-
nixopus install \
271+
sudo nixopus install \
268272
--api-port 9000 \
269273
--view-port 9001 \
270274
--timeout 600
271275
```
272276

273277
:::
274278

279+
::: tip Why Sudo?
280+
The `nixopus install` command needs root privileges to:
281+
282+
- Install Docker and other system dependencies
283+
- Configure system-level services
284+
- Set up network configurations
285+
286+
If you're already running as root user, you can omit `sudo`.
287+
:::
288+
275289
## Accessing Nixopus
276290

277291
After successful installation, access your Nixopus instance:

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "nixopus",
3-
"version": "0.1.0-alpha.67",
3+
"version": "0.1.0-alpha.68",
44
"description": "A modern container management platform",
55
"private": false,
6-
"cli-version": "0.1.26",
6+
"cli-version": "0.1.27",
77
"cli-packages": [
8-
"nixopus-0.1.26-darwin-amd64.pkg",
9-
"nixopus-0.1.26-darwin-arm64.pkg",
10-
"nixopus_0.1.26_amd64.apk",
11-
"nixopus_0.1.26_amd64.deb",
8+
"nixopus-0.1.27-darwin-amd64.pkg",
9+
"nixopus-0.1.27-darwin-arm64.pkg",
10+
"nixopus-0.1.27-1.x86_64.rpm",
1211
"nixopus.tar",
13-
"nixopus-0.1.26-1.x86_64.rpm"
12+
"nixopus_0.1.27_amd64.deb",
13+
"nixopus_0.1.27_amd64.apk"
1414
]
1515
}

0 commit comments

Comments
 (0)