Skip to content

Commit 3bd0589

Browse files
authored
Update docs (hestiacp#3562)
- Include information about building - Include information about Remote Database - Add information regarding Web Sockets
1 parent 4c56d2c commit 3bd0589

File tree

5 files changed

+144
-95
lines changed

5 files changed

+144
-95
lines changed

docs/.vitepress/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ function sidebarDocs(): DefaultTheme.SidebarItem[] {
131131
text: "Contributing",
132132
collapsed: false,
133133
items: [
134+
{ text: "Building Packages", link: "/docs/contributing/building.md" },
134135
{ text: "Development", link: "/docs/contributing/development.md" },
135136
{ text: "Documentation", link: "/docs/contributing/documentation.md" },
136137
{ text: "Quick install app", link: "/docs/contributing/quick-install-app.md" },

docs/docs/contributing/building.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Building packages
2+
3+
::: info
4+
For building `hestia-nginx` or `hestia-php`, at least 2 GB of memory is required!
5+
:::
6+
7+
Here is more detailed information about the build scripts that are run from `src`:
8+
9+
## Installing Hestia from a branch
10+
11+
The following is useful for testing a Pull Request or a branch on a fork.
12+
13+
1. Install Node.js [Download](https://nodejs.org/en/download) or use [Node Source APT](https://github.com/nodesource/distributions)
14+
15+
1. Install [Yarn](https://yarnpkg.com/getting-started/install) via `corepack enable`
16+
17+
```bash
18+
# Replace with https://github.com/username/hestiacp.git if you want to test a branch that you created yourself
19+
git clone https://github.com/hestiacp/hestiacp.git
20+
cd ./hestiacp/
21+
22+
# Replace main with the branch you want to test
23+
git checkout main
24+
25+
# Enable Yarn 3.x
26+
yarn set version stable
27+
# Install Dependencies
28+
yarn install
29+
# Build
30+
yarn build
31+
32+
cd ./src/
33+
34+
# Compile packages
35+
./hst_autocompile.sh --all --noinstall --keepbuild '~localsrc'
36+
37+
cd ../install
38+
39+
bash hst-install-{os}.sh --with-debs /tmp/hestiacp-src/deb/
40+
```
41+
42+
Any option can be appended to the installer command. [See the complete list](../introduction/getting-started#list-of-installation-options).
43+
44+
## Build packages only
45+
46+
```bash
47+
# Only Hestia
48+
./scr/hst_autocompile.sh --hestia --noinstall --keepbuild '~localsrc'
49+
```
50+
51+
```bash
52+
# Hestia + hestia-nginx and hestia-php
53+
./hst_autocompile.sh --all --noinstall --keepbuild '~localsrc'
54+
```
55+
56+
## Build and install packages
57+
58+
::: info
59+
Use if you have Hestia already installed, for your changes to take effect.
60+
:::
61+
62+
```bash
63+
# Only Hestia
64+
./hst_autocompile.sh --hestia --install '~localsrc'
65+
```
66+
67+
```bash
68+
# Hestia + hestia-nginx and hestia-php
69+
./hst_autocompile.sh --all --install '~localsrc'
70+
```
71+
72+
## Updating Hestia from GitHub
73+
74+
The following is useful for pulling the latest staging/beta changes from GitHub and compiling the changes.
75+
76+
::: info
77+
The following method only supports building the `hestia` package. If you need to build `hestia-nginx` or `hestia-php`, use one of the previous commands.
78+
:::
79+
80+
1. Install Node.js [Download](https://nodejs.org/en/download) or use [Node Source APT](https://github.com/nodesource/distributions)
81+
82+
1. Install [Yarn](https://yarnpkg.com/getting-started/install) via `corepack enable`
83+
84+
```bash
85+
v-update-sys-hestia-git [USERNAME] [BRANCH]
86+
```
87+
88+
**Note:** Sometimes dependencies will get added or removed when the packages are installed with `dpkg`. It is not possible to preload the dependencies. If this happens, you will see an error like this:
89+
90+
```bash
91+
dpkg: error processing package hestia (–install):
92+
dependency problems - leaving unconfigured
93+
```
94+
95+
To solve this issue, run:
96+
97+
```bash
98+
apt install -f
99+
```

docs/docs/contributing/development.md

Lines changed: 1 addition & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ multipass mount $HOME/projects/hestiacp hestia-dev:/home/ubuntu/hestiacp
5151
sudo apt update && sudo apt install -y jq libjq1
5252
```
5353

54-
1. Install [Node JS](https://nodejs.org/en) and Yarn `npm install --global yarn`
54+
1. Install [Node JS](https://nodejs.org/en) and Yarn via `corepack enable`
5555

5656
1. Build the theme files with
5757

@@ -145,100 +145,6 @@ You can delete the backups by running `rm -rf /root/hst_backups` as root user on
145145

146146
Please refer to the [contributing guidelines](https://github.com/hestiacp/hestiacp/blob/main/CONTRIBUTING.md) for more details on submitting code changes for review.
147147

148-
### Building packages
149-
150-
::: info
151-
For building `hestia-nginx` or `hestia-php`, at least 2 GB of memory is required!
152-
:::
153-
154-
Here is more detailed information about the build scripts that are run from `src`:
155-
156-
#### Build packages only
157-
158-
```bash
159-
# Only Hestia
160-
./hst_autocompile.sh --hestia --noinstall --keepbuild '~localsrc'
161-
```
162-
163-
```bash
164-
# Hestia + hestia-nginx and hestia-php
165-
./hst_autocompile.sh --all --noinstall --keepbuild '~localsrc'
166-
```
167-
168-
#### Build and install packages
169-
170-
::: info
171-
Use if you have Hestia already installed, for your changes to take effect.
172-
:::
173-
174-
```bash
175-
# Only Hestia
176-
./hst_autocompile.sh --hestia --install '~localsrc'
177-
```
178-
179-
```bash
180-
# Hestia + hestia-nginx and hestia-php
181-
./hst_autocompile.sh --all --install '~localsrc'
182-
```
183-
184-
## Installing Hestia from a branch
185-
186-
The following is useful for testing a Pull Request or a branch on a fork.
187-
188-
Make sure to install [Node JS](https://nodejs.org/en) and Yarn `npm install --global yarn` before.
189-
190-
```bash
191-
# Replace with https://github.com/username/hestiacp.git if you want to test a branch that you created yourself
192-
git clone https://github.com/hestiacp/hestiacp.git
193-
cd ./hestiacp/
194-
195-
# Replace main with the branch you want to test
196-
git checkout main
197-
198-
# Enable Yarn 3.x
199-
yarn set version stable
200-
# Install Dependencies
201-
yarn install
202-
# Build
203-
yarn build
204-
205-
cd ./src/
206-
207-
# Compile packages
208-
./hst_autocompile.sh --all --noinstall --keepbuild '~localsrc'
209-
210-
cd ../install
211-
212-
bash hst-install-{os}.sh --with-debs /tmp/hestiacp-src/deb/
213-
```
214-
215-
Any option can be appended to the installer command. [See the complete list](../introduction/getting-started#list-of-installation-options).
216-
217-
## Updating Hestia from GitHub
218-
219-
The following is useful for pulling the latest staging/beta changes from GitHub and compiling the changes.
220-
221-
::: info
222-
The following method only supports building the `hestia` package. If you need to build `hestia-nginx` or `hestia-php`, use one of the previous commands.
223-
:::
224-
225-
```bash
226-
v-update-sys-hestia-git [USERNAME] [BRANCH]
227-
```
228-
229-
**Note:** Sometimes dependencies will get added or removed when the packages are installed with `dpkg`. It is not possible to preload the dependencies. If this happens, you will see an error like this:
230-
231-
```bash
232-
dpkg: error processing package hestia (–install):
233-
dependency problems - leaving unconfigured
234-
```
235-
236-
To solve this issue, run:
237-
238-
```bash
239-
apt install -f
240-
```
241-
242148
## Running automated tests
243149

244150
For automated tests we currently use [Bats](https://github.com/bats-core/bats-core).

docs/docs/server-administration/databases.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,34 @@ Automated can sometimes cause issues. Login via SSH and open `/var/log/{webserve
8787
2. If you are behind a firewall or proxy, you may want to disable it and try again.
8888
- `Link has expired`
8989
1. Refresh the database page and try again.
90+
91+
## Remote databases
92+
93+
If needed you can simply host Mysql or Postgresql on a remote server.
94+
95+
To add a remote database:
96+
97+
```bash
98+
v-add-database-host TYPE HOST DBUSER DBPASS [MAX_DB] [CHARSETS] [TPL] [PORT]
99+
```
100+
101+
For example:
102+
103+
```bash
104+
v-add-database-host mysql db.hestiacp.com root mypassword 500
105+
```
106+
107+
If you want you can setup phpMyAdmin on the host server to allow to connect to the database. Create a copy of `01-localhost` file in /etc/phpmyadmin/conf.d and change:
108+
109+
```php
110+
$cfg["Servers"][$i]["host"] = "localhost";
111+
$cfg["Servers"][$i]["port"] = "3306";
112+
$cfg["Servers"][$i]["pmadb"] = "phpmyadmin";
113+
$cfg["Servers"][$i]["controluser"] = "pma";
114+
$cfg["Servers"][$i]["controlpass"] = "random password";
115+
$cfg["Servers"][$i]["bookmarktable"] = "pma__bookmark";
116+
```
117+
118+
Please make sure to create aswell the phpmyadmin user and database.
119+
120+
See `/usr/local/hestia/install/deb/phpmyadmin/pma.sh`

docs/docs/server-administration/web-templates.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,15 @@ FastCGI cache is an option for Nginx mode only. If you are using Nginx + Apache2
147147
To write custom caching templates, use the following naming scheme:
148148
149149
`caching-yourname.tpl`, `caching-yourname.stpl` and `caching-yourname.sh`
150+
151+
### Does Hestia support Web socket support
152+
153+
Yes, Hestia works fine with Web sockets how ever our default templates include on default:
154+
155+
```bash
156+
proxy_hide_header Upgrade
157+
```
158+
159+
This resolved an issue with Safari from loading websites.
160+
161+
To allow the use of Web sockets remove this line. Other wise Web sockets will not work

0 commit comments

Comments
 (0)