You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: API.md
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,19 +107,25 @@ Get Octyne's configuration file contents. Added in v1.1.0.
107
107
108
108
**Response:**
109
109
110
-
HTTP 200 response with the configuration file contents in the body. The configuration file format is documented in the [README](https://github.com/retrixe/octyne/blob/main/README.md).
110
+
HTTP 200 response with the configuration file contents in the body. The configuration file format is documented in the [README](https://github.com/retrixe/octyne/blob/main/README.md) and is formatted with either [TOML (supported since v1.4.0)](https://toml.io) or [HuJSON (⚠️ deprecated)](https://github.com/tailscale/hujson).
111
111
112
-
⚠️ *Warning:* The configuration file uses [HuJSON](https://github.com/tailscale/hujson) instead of JSON! This means that comments and trailing commas are allowed. Don't parse the body assuming that it's JSON.
112
+
The `Content-Type` header will be set to `application/toml` if the config is using [TOML](https://toml.io) or `application/json` if the config is using [HuJSON](https://github.com/tailscale/hujson).
113
+
114
+
⚠️ *Note:*`Content-Type` was added to the response headers in v1.4.0. If absent, HuJSON can be assumed, since prior versions only support HuJSON.
113
115
114
116
---
115
117
116
118
### PATCH /config
117
119
118
120
Modify Octyne's configuration. Added in v1.1.0.
119
121
122
+
**Request Headers:**
123
+
124
+
-`Content-Type` - The content type of the request body (either `application/toml` or `application/json`). If not provided, it will be inferred from the request body. Added in v1.4.0.
125
+
120
126
**Request Body:**
121
127
122
-
New configuration file contents in the body. The configuration file format is documented in the [README](https://github.com/retrixe/octyne/blob/main/README.md) and is formatted with [HuJSON](https://github.com/tailscale/hujson).
128
+
New configuration file contents in the body. The configuration file format is documented in the [README](https://github.com/retrixe/octyne/blob/main/README.md) and is formatted with either [TOML (supported since v1.4.0)](https://toml.io) or [HuJSON (⚠️ deprecated)](https://github.com/tailscale/hujson).
Copy file name to clipboardExpand all lines: README.md
+65-4Lines changed: 65 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,15 +4,15 @@ A process manager with an HTTP API for remote console and file access.
4
4
5
5
Octyne allows running multiple apps on a remote server and provides an HTTP API to manage them. This allows for hosting web servers, game servers, bots and so on on remote servers without having to mess with SSH, using `screen` and `systemd` whenever you want to make any change, in a highly manageable and secure way.
6
6
7
-
It incorporates the ability to manage files and access the terminal output and input over HTTP remotely. For further security, it is recommended to use HTTPS (see [config.json](#configjson)) to ensure end-to-end secure transmission.
7
+
It incorporates the ability to manage files and access the terminal output and input over HTTP remotely. For further security, it is recommended to use HTTPS (see [config.toml](#configtoml)) to ensure end-to-end secure transmission.
8
8
9
9
[retrixe/ecthelion](https://github.com/retrixe/ecthelion) complements octyne by providing a web interface to control apps on octyne remotely.
10
10
11
11
## Quick Start
12
12
13
13
-[Download the latest version of Octyne from GitHub Releases for your OS and CPU.](https://github.com/retrixe/octyne/releases/latest) Alternatively, you can get the latest bleeding edge version of Octyne from [GitHub Actions](https://github.com/retrixe/octyne/actions?query=branch%3Amain), or by compiling it yourself.
14
14
- Place octyne in a folder (on Linux/macOS/\*nix, mark as executable with `chmod +x <octyne file name>`).
15
-
- Create a `config.json` next to Octyne (see [here](https://github.com/retrixe/octyne#configuration) for details).
15
+
- Create a `config.toml` next to Octyne (see [here](https://github.com/retrixe/octyne#configuration) for details).
16
16
- Run `./<octyne file name>` in a terminal in the folder to start Octyne. An `admin` user will be generated for you.
17
17
- You may want to get [Ecthelion](https://github.com/retrixe/ecthelion) to manage Octyne over the internet, and [octynectl](https://github.com/retrixe/octynectl) as a CLI tool to manage Octyne locally on your machine. [Additionally, make sure to follow the security practices here to prevent attacks against your setup!](https://github.com/retrixe/octyne#security-practices-and-reverse-proxying)
18
18
- You might want to manage Octyne using systemd on Linux systems, which can start/stop Octyne, start it on boot, store its logs and restart it on crash. [This article should help you out.](https://medium.com/@benmorel/creating-a-linux-service-with-systemd-611b5c8b91d6)
@@ -27,10 +27,61 @@ Octyne depends on two files in the current working directory to get configuratio
27
27
28
28
The path to these files can be customised using the `--config=/path/to/config.json` and `--users=/path/to/users.json` CLI flags (if relative, resolved relative to the working directory).
29
29
30
-
### config.json
30
+
### config.toml
31
31
32
32
Used to configure the apps Octyne should start, Redis-based authentication for allowing more than a single node, Unix socket API, and HTTPS support. A reverse proxy can also be used for HTTPS if it supports WSS.
33
33
34
+
```toml
35
+
port = 42069# optional, default is 42069
36
+
37
+
[unixSocket]
38
+
# enables Unix socket API for auth-less actions by locally running apps e.g. octynectl
39
+
enabled = true
40
+
# optional, if absent, default is TMP/octyne.sock.PORT (see API.md for details)
41
+
# location = ""
42
+
# optional, sets the socket's group owner, if absent, default is current user's primary group
43
+
# group = ""
44
+
45
+
[redis]
46
+
# whether the authentication tokens should sync to Redis for more than 1 node
47
+
enabled = false
48
+
# link to Redis server
49
+
url = "redis://localhost"
50
+
51
+
[https]
52
+
# whether Octyne should listen using HTTP or HTTPS
53
+
enabled = false
54
+
# path to HTTPS certificate
55
+
cert = "/path/to/cert.pem"
56
+
# path to HTTPS private key
57
+
key = "/path/to/key.pem"
58
+
59
+
[logging]
60
+
# whether Octyne should log actions
61
+
enabled = true
62
+
# path to log files, can be relative or absolute
63
+
path = "logs"
64
+
65
+
[logging.actions]
66
+
# optional, disable logging for specific actions, more info below
67
+
68
+
# each key has the name of the server
69
+
[servers.test1]
70
+
# optional, default true, Octyne won't auto-start when false
71
+
# enabled = true
72
+
# the directory in which the server is located
73
+
directory = "/home/test/server"
74
+
# the command to run to start the server
75
+
command = "java -jar spigot-1.12.2.jar"
76
+
```
77
+
78
+
### config.json
79
+
80
+
In Octyne v1.4.0, JSON was replaced with TOML for configuration. However, JSON still works for backwards compatibility, so the documentation below has been retained. Note that JSON is deprecated and will be removed with v2.0. Migrate to v1.4.0 or later to use TOML.
81
+
82
+
<details>
83
+
<summary>config.json example</summary>
84
+
34
85
*NOTE: Octyne supports comments and trailing commas in the config.json file, they don't need to be removed.*
35
86
36
87
```jsonc
@@ -65,6 +116,8 @@ Used to configure the apps Octyne should start, Redis-based authentication for a
65
116
}
66
117
```
67
118
119
+
</details>
120
+
68
121
### users.json
69
122
70
123
Contains users who can log into Octyne. This file is automatically generated on first start with an `admin` user and a generated secure password which is logged to terminal. You can perform account management via Ecthelion, octynectl or other such tools.
@@ -81,7 +134,15 @@ Note: actions performed locally using the Unix socket API by apps like [octynect
81
134
82
135
**Note: Fine-grained control over logging is currently *experimental*. Therefore, action names may change in any version, not just major versions. However, we will generally try to avoid this in the interest of stability.**
83
136
84
-
By default, Octyne will log all actions performed by users. You can enable/disable logging for specific actions by setting the action to `true` or `false` in the `logging.actions` object in `config.json`. For example, to disable logging for `auth.login` and `auth.logout`, your `actions` object would be:
137
+
By default, Octyne will log all actions performed by users. You can enable/disable logging for specific actions by setting the action to `true` or `false` in the `logging.actions` section in `config.toml`. For example, to disable logging for `auth.login` and `auth.logout`:
0 commit comments