Skip to content
This repository was archived by the owner on Jun 17, 2025. It is now read-only.

Commit 3e0b04d

Browse files
committed
Rewrite the docs
1 parent 34b82ee commit 3e0b04d

File tree

5 files changed

+181
-77
lines changed

5 files changed

+181
-77
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
# format postgresql://username[:password]@host/db_name
12
DATABASE_URL=postgresql://scripty:scripty@localhost/scripty

README.md

Lines changed: 9 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -2,90 +2,22 @@
22

33
rewrite of the [old Scripty](https://github.com/tazz4843/scripty) in general
44

5-
# selfhosting
5+
## selfhosting
66

7-
should work, officially supported if you're using linux:
7+
### native binary
88

9-
only supports linux, will not support any other OS, especially not windows
9+
this is what scripty is running on in production and is actively tested
1010

11-
WSL does not count as linux, use a VM at the very least (although good luck getting GPU passthrough)
11+
see [the prebuilt binary](./doc/selfhosting-prebuilt.md)
12+
or [build from source](./doc/selfhosting-from-source.md) guides
1213

13-
## requirements
14-
* rust: https://rustup.rs/ (nightly)
15-
* postgresql: https://www.postgresql.org/download/ (tested with 15.3)
16-
* redis: https://redis.io/download (tested with 7.0.12)
17-
* mold linker
18-
* clang (for mold)
19-
* pkg-config (libopus dependency)
20-
* stt-service: https://github.com/scripty-bot/stt-service (latest, refer to its README for more info)
14+
### podman
2115

22-
### recommended distros
23-
* arch: has the easiest install process for the latest versions of everything, and is what
24-
scripty runs on in production
25-
* debian: has old versions of stuff (that will likely still work) but is still a lot better than the
26-
dumpster fire that is ubuntu
16+
much less native support given
2717

28-
#### arch
29-
```shell
30-
sudo pacman -S postgresql redis mold clang base-devel pkgconf
31-
```
18+
[see the docs](./doc/selfhosting-podman.md)
3219

33-
#### all distros
34-
```shell
35-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
36-
```
37-
38-
## prepare
39-
### clone repo
40-
```shell
41-
git clone https://github.com/scripty-bot/scripty
42-
cd scripty
43-
```
44-
45-
### migrate database
46-
```shell
47-
cargo install sqlx-cli # skip if you already have it
48-
sudo -u postgres createuser scripty -P # will prompt for password
49-
sudo -u postgres createdb -O scripty scripty
50-
cp .env.example .env
51-
nano .env # edit DATABASE_URL to match your URL
52-
cargo sqlx migrate run
53-
```
54-
#### troubleshooting
55-
double check `pg_hba.conf` and `postgresql.conf` if you get a connection error
56-
57-
## build
58-
```shell
59-
cargo build --release
60-
# or if you want a more optimized build
61-
# takes about 3.5 minutes on a 13700K vs 45s for the normal build
62-
# probably not worth it for casual users
63-
cargo build --profile release-full
64-
```
65-
66-
## configure
67-
```shell
68-
cp config.toml.example config.toml
69-
nano config.toml # edit to your liking
70-
# note stt
71-
```
72-
73-
## run
74-
```shell
75-
./target/release/scripty_v2
76-
```
77-
78-
## advanced
79-
### MUSL build
80-
same as above, but build with `--target x86_64-unknown-linux-musl`
81-
and execute `./target/x86_64-unknown-linux-musl/release/scripty_v2`
82-
83-
on arch also install the `musl` package
84-
85-
# docker?
86-
https://www.youtube.com/watch?v=PivpCKEiQOQ
87-
88-
# translations?
20+
## translations?
8921

9022
<a href="https://hosted.weblate.org/engage/scripty-bot/">
9123
<img src="https://hosted.weblate.org/widgets/scripty-bot/-/open-graph.png" alt="Translation status" />

doc/selfhosting-from-source.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# selfhosting - building from source
2+
3+
only supports linux, will not support any other OS, especially not windows
4+
5+
WSL does not count as linux, use a VM at the very least (although good luck getting GPU passthrough)
6+
7+
## requirements
8+
9+
* rust: https://rustup.rs/ (nightly)
10+
* postgresql: https://www.postgresql.org/download/ (tested with 17.4)
11+
* valkey: https://valkey.io/ (tested with 8.1.0)
12+
* mold linker https://github.com/rui314/mold
13+
* clang (for mold)
14+
* pkg-config (libopus dependency)
15+
* libopus
16+
* stt-service: https://github.com/scripty-bot/stt-service (latest, refer to its README for more info)
17+
18+
### recommended distros
19+
20+
* arch: has the easiest install process for the latest versions of everything, and is what
21+
scripty runs on in production
22+
* debian: has old versions of stuff (that will likely still work) but is still a lot better than the
23+
dumpster fire that is ubuntu
24+
25+
#### arch
26+
27+
```shell
28+
sudo pacman -S postgresql redis mold clang base-devel pkgconf
29+
```
30+
31+
#### all distros
32+
33+
install rust with this (command from https://rustup.rs/)
34+
35+
make sure to pick rust nightly during the install process,
36+
scripty liberally uses nightly features
37+
38+
```shell
39+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
40+
```
41+
42+
## prepare
43+
44+
### clone repo
45+
46+
```shell
47+
git clone https://github.com/scripty-bot/scripty
48+
cd scripty
49+
```
50+
51+
### migrate database
52+
53+
```shell
54+
cargo install sqlx-cli # skip if you already have it
55+
sudo -u postgres createuser scripty -P # will prompt for password
56+
sudo -u postgres createdb -O scripty scripty
57+
cp .env.example .env
58+
nano .env # edit DATABASE_URL to match your database
59+
cargo sqlx migrate run
60+
```
61+
62+
#### troubleshooting
63+
64+
double check `pg_hba.conf` and `postgresql.conf` if you get a connection error
65+
66+
## build
67+
68+
```shell
69+
cargo build --release
70+
```
71+
72+
## configure
73+
74+
```shell
75+
cp config.toml.example config.toml
76+
nano config.toml # edit to your liking
77+
# at least one stt service must exist
78+
```
79+
80+
## run
81+
82+
```shell
83+
./target/release/scripty_v2
84+
```
85+
86+
## advanced
87+
88+
### MUSL build
89+
90+
official support removed (kinda), why bother building with a libc that's a few megabytes smaller but much slower?
91+
if you want to run on alpine linux anyway we'll still help you, it should be as simple as adding
92+
`--target x86_64-unknown-linux-musl` if cross-compiling for target, otherwise just normal build for native
93+
94+
if it breaks poke me

doc/selfhosting-podman.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# selfhosting scripty via podman
2+
3+
## notes
4+
5+
Scripty's pre-built binaries only support x86_64 Linux:
6+
if you're on another system you must [build from source](./selfhosting-from-source.md)
7+
8+
the podman build is completely untested
9+
10+
the binary runs but i have not tested if it's actually functional,
11+
so expect broken stuff sometimes
12+
13+
official support for broken stuff is available, poke me on scripty's discord
14+
15+
rootful docker will never be officially supported, but it'll likely work anyway.
16+
you should not be using rootful though because it's a massive security hole,
17+
and if you ask for help while using rootful i'll tell you to use rootless or podman
18+
19+
rootless is essentially equivalent to podman, just substitute `docker` for `podman` in commands
20+
21+
## the image
22+
23+
this repo automatically builds a podman image every commit at
24+
https://github.com/scripty-bot/scripty/pkgs/container/scripty
25+
26+
pull it with
27+
28+
```bash
29+
podman pull ghcr.io/scripty-bot/scripty:master
30+
```
31+
32+
## running
33+
34+
it expects `config.toml` mounted at `/app/config.toml`,
35+
and scripty's internal webserver binds on `127.0.0.1:42069` by default.
36+
change as necessary
37+
38+
a postgres database must be accessible somehow, configure that yourself
39+
40+
```bash
41+
podman run -p 42069:42069 -v "./config.toml:/app/config.toml:ro" ghcr.io/scripty-bot/scripty:master
42+
```

doc/selfhosting-prebuilt.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# selfhosting scripty - prebuilt executable
2+
3+
only supports linux, will not support any other OS, especially not windows
4+
5+
WSL does not count as linux, use a VM at the very least (although good luck getting GPU passthrough)
6+
7+
Scripty's pre-built binaries only support x86_64 Linux using glibc:
8+
if you're on another system you must [build from source](./selfhosting-from-source.md)
9+
10+
## clone the repo
11+
12+
some files in the repo are required for scripty to run
13+
(mostly internationalization files)
14+
15+
```bash
16+
git clone https://github.com/scripty-bot/scripty
17+
cd scripty
18+
```
19+
20+
## download the binary
21+
22+
each commit builds a binary
23+
24+
1. head to the github web UI and
25+
click the action icon directly to the right of the latest commit title
26+
2. click "Details" to the right of "Build executable / Build binary"
27+
3. click summary in the upper left
28+
4. scroll down to artifacts
29+
5. hit the download button on `scripty_v2-x86_64-unknown-linux-gnu`
30+
6. save to a convenient location (most likely directly in the root directory of the repo)
31+
32+
## running
33+
34+
continue from the "migrate database" section of the [build from source page](./selfhosting-from-source.md),
35+
and skip the "build" section

0 commit comments

Comments
 (0)