Skip to content

Commit b6e0d1e

Browse files
authored
Update rootless.md
1 parent 8e8c6cd commit b6e0d1e

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

docs/install/rootless.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ As written, these steps will install the webui with the following properties:
88

99
* The nodejs scripts will be installed to `$HOME/mineos-node`
1010
* The user-data (servers, world config, etc.) will be in `$HOME/minecraft`
11-
* The webui will be accessible at `https://[ip-address]:9443` in your browser
12-
* It will run as `$USER`, and support ONE user
11+
* The webui will be accessible at `https://[ip-address]:8443` in your browser
12+
* It will run as `$USER` and support only one user
1313
* It will support an unlimited amount of servers (bound by your hardware)
1414

1515
# Installation steps
@@ -24,15 +24,15 @@ Only the following steps must be executed as `root`.
2424
# dnf install rsync screen rdiff-backup openssl git
2525
# chmod 777 /run/screen
2626
```
27-
The metapackage "Development tools" includes the `gcc` compiler, and any other required buildtools for `npm` packages. Depending on your distrobution, `dnf groupinstall` will differ, e.g., `apt install build-essential` on `apt`-based distros.
27+
The metapackage "Development tools" includes the `gcc` compiler, and any other required buildtools for `npm` packages. Depending on your distribution, `dnf groupinstall` will differ, e.g., `apt install build-essential` on `apt`-based distros.
2828

29-
All the following steps from here out should be executed as your normal, unprivileged user.
29+
All the following steps from here out should be executed as your normal, unprivileged user. This user does not need `sudo` privileges.
3030

3131
## DOWNLOAD JAVA
3232
```
3333
cd ~
3434
mkdir -p ~/.local/opt
35-
#wget https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-17.0.2_linux-x64_bin.tar.gz
35+
wget https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-17.0.2_linux-x64_bin.tar.gz
3636
tar xf openjdk-17*
3737
mv ~/jdk-17.0.2 ~/.local/opt/
3838
JDK_PATH=$(realpath ~/.local/opt/jdk-17.0.2/bin)
@@ -59,16 +59,16 @@ The `sed` commands offer a shortcut to change the configuration file via scripti
5959

6060
## USE HTTPS FOR SECURE TRANSPORT
6161
```
62-
mkdir -p ~/.local/etc/ssl/certs
6362
SSL_PATH=~/.local/etc/ssl/certs
63+
mkdir -p $SSL_PATH
6464
CERTFILE=$SSL_PATH/mineos.pem CRTFILE=$SSL_PATH/mineos.crt KEYFILE=$SSL_PATH/mineos.key ./generate-sslcert.sh
6565
```
66-
The SSL certificates in the standard location require `root` permissions. Rather than adjust _any_ permissions, and to still maintain the appropriate file structure, these files can be put into `~/.local`.
66+
The SSL certificates in the standard location require `root` permissions. Rather than adjust _any_ permissions--and to still maintain the appropriate file structure--these files can be put into `~/.local`, too.
6767

68-
### ACQUIRE NODEJS
68+
### DOWNLOAD NODEJS
6969
```
7070
cd ~
71-
#wget https://s3-us-west-2.amazonaws.com/nodesource-public-downloads/4.6.3/artifacts/bundles/nsolid-bundle-v4.6.3-linux-x64.tar.gz
71+
wget https://s3-us-west-2.amazonaws.com/nodesource-public-downloads/4.6.3/artifacts/bundles/nsolid-bundle-v4.6.3-linux-x64.tar.gz
7272
tar -xf nsolid*
7373
cd nsolid-bundle-v4.6.3-linux-x64
7474
./install.sh
@@ -97,7 +97,7 @@ $ cd ~/.local/bin
9797
$ curl -LO https://proot.gitlab.io/proot/bin/proot
9898
$ chmod +x proot
9999
```
100-
`proot` is a utility to allow userland overlays of files and directories over traditionally `root`-owned locations. In the previous steps, `~/.local` was used to reproduce an ordinary `/etc` filetree. The same could be done for `nsolid` and `java` (using `~/.local/opt`, for example). The usage below helps demonstrate the scope and utility of `proot`.
100+
`proot` is a utility to allow userland overlays of files and directories over traditionally `root`-owned locations. In the previous steps, `~/.local` was used to reproduce an ordinary `/etc` filetree. The same could be done for `nsolid` (using `~/.local/opt/nsolid`, for example). The usage section below helps demonstrate the scope and utility of `proot`.
101101

102102
See documentation here: https://proot-me.github.io/
103103

@@ -109,11 +109,11 @@ Due to the unprivileged user being used to host this process, server init comman
109109

110110
## PROOT, ROOT-FAKER
111111

112-
`proot`'s primary function with the webui is to present replacement authentication files, e.g., `/etc/{passwd, group, shadow}` owned by the user: it contains no authentic system user information and can be managed separately even from the linux user's password. In actuality, no such privilege execution occurs, but this file overlay allows use of `/etc/{passwd,group,shadow,mineos.conf}` where it otherwise would be restricted.
112+
`proot`'s primary function with the webui is to present replacement authentication files owned by `$USER`: it contains no authentic system user information and is separate from the linux user's password. In actuality, no such privilege escalation occurs, but this file overlay allows use of `/etc/{passwd,group,shadow,mineos.conf}` where it otherwise would be restricted.
113113

114-
`proot` can execute any program while also overlaying just the specific files. Without a particular file to run, `proot` will default to `/bin/sh`. Alternate shells can be used, and even run the webui.
114+
`proot` can execute any program while also overlaying just the specific files. Without a particular file to run, `proot` will default to `/bin/sh`. Alternate shells can be used, and even run the webui.
115115

116-
This step will use normal linux utilities to generate passwords and groups.
116+
This step will use normal linux utilities to generate passwords and groups. Enter a `proot` subshell, then generate local versions of the authentication files. `$UIPW` is the webui password to accompany `$USER`.
117117
```
118118
cd ~
119119
read -s UIPW
@@ -125,14 +125,13 @@ echo "$USER:$UIPW" | chpasswd -c SHA512
125125
EOHC
126126
```
127127

128-
Enter a `proot` subshell, then generate local versions of the authentication files.
129-
130128
## USAGE
131129

132-
Start a new terminal session, which will demonstrate whether the $PATH vars have successfully taken. Finally use `proot` to start the webui process. This invocation will only overwrite four mineos-specific files which must be user-readable; all other files in `/etc` are now inherited.
130+
Start a new terminal session, which will demonstrate whether the $PATH vars have successfully taken. Then, use `proot` to start the webui process. This invocation will only overwrite four mineos-specific files which must be user-readable; all other files in `/etc` are now inherited.
133131

134132
```
135-
$ proot -w ~/mineos-node -b ~/.local/etc/passwd:/etc/passwd -b ~/.local/etc/shadow:/etc/shadow -b ~/.local/etc/group:/etc/group -b ~/.local/etc/mineos.conf:/etc/mineos.conf ./webui
133+
$ proot -w ~/mineos-node -b ~/.local/etc/passwd:/etc/passwd -b ~/.local/etc/shadow:/etc/shadow -b ~/.local/etc/group:/etc/group -b ~/.local/etc/mineos.conf:/etc/mineos.conf
134+
bash-5-2$ ./webui
136135
```
137136

138-
Once the daemon is running, you can visit `https://[ipaddress]:8443` in your web browser and you will see a user and password prompt. Log in with your normal username and password selected from the previous `prot` step.
137+
Once the daemon is running, you can visit `https://[ipaddress]:8443` in your web browser and you will see a user and password prompt. Log in with your normal username and password selected from the previous `proot` step.

0 commit comments

Comments
 (0)