@@ -7,7 +7,71 @@ A small and ultrasecure [Lesspass][1] database server written in [Rust][2].
7
7
8
8
## Installation
9
9
10
- ### Installing Rust
10
+ ### From binary
11
+
12
+ Simply download latest release from [ releases page] [ releases ] . You can use
13
+ [ systemd unit] [ unit ] from [ Arch Linux package] [ package ] to run it.
14
+
15
+ [ releases ] : https://github.com/ogarcia/rockpass/releases
16
+ [ unit ] : https://aur.archlinux.org/cgit/aur.git/tree/rockpass.service?h=rockpass
17
+ [ package ] : https://aur.archlinux.org/packages/rockpass
18
+
19
+ ### With Docker
20
+
21
+ A docker image of Rockpass can be downloaded from [ here] [ ghcr ] or from
22
+ [ Docker Hub] [ hub ] .
23
+
24
+ To run it, simply exec.
25
+ ```
26
+ docker run -t -d \
27
+ --name=rockpass \
28
+ -p 8000:8000 \
29
+ ogarcia/rockpass
30
+ ```
31
+
32
+ This start Rockpass and publish the port to host.
33
+
34
+ Warning: this is a basic run, all data will be destroyed after container
35
+ stop and rm.
36
+
37
+ [ ghcr ] : https://github.com/users/ogarcia/packages/container/package/rockpass
38
+ [ hub ] : https://hub.docker.com/repository/docker/ogarcia/rockpass
39
+
40
+ #### Persist data using a Docker volume
41
+
42
+ Rockpass Docker image uses a volume ` /var/lib/rockpass ` to store sqlite
43
+ database. You can exec the following to mount it in your host as persistent
44
+ storage.
45
+ ```
46
+ docker run -t -d \
47
+ --name=rockpass \
48
+ -p 8000:8000 \
49
+ -v /my/rockpass:/var/lib/rockpass \
50
+ ogarcia/rockpass
51
+ ```
52
+
53
+ Take note that you must create before the directory ` /my/rockpass ` and set
54
+ ownership to UID/GID 100.
55
+ ```
56
+ mkdir -p /my/rockpass
57
+ chown -R 100:100 /my/rockpass
58
+ ```
59
+
60
+ #### Docker environment variables
61
+
62
+ | Variable | Used for | Default value |
63
+ | --- | --- | --- |
64
+ | ` ROCKET_DATABASES ` | Database location | {rockpass = { url = \" /var/lib/rockpass/rockpass.sqlite\" }} |
65
+ | ` ROCKET_SECRET_KEY ` | Unused, but need to be defined to something to avoid warnings | fIdKuZfnI2oUJg4HMrKB7RTXxXS5B2Yw9D5RpOaKciI= |
66
+ | ` ROCKET_ADDRESS ` | Listen address | 0.0.0.0 |
67
+ | ` ROCKET_PORT ` | Listen port | 8000 |
68
+ | ` ROCKET_REGISTRATION_ENABLED ` | Enable or disable the ability to register new users | true |
69
+ | ` ROCKET_TOKEN_LIFETIME ` | Time, in seconds, that the login token is valid | 2592000 (30 days) |
70
+ | ` ROCKET_LOG ` | Log level | normal |
71
+
72
+ ### From source
73
+
74
+ #### Installing Rust
11
75
12
76
Rockpass is based in [ Rocket] [ 3 ] so you need to use a nightly version of
13
77
Rust.
@@ -22,7 +86,7 @@ rustup override set nightly
22
86
23
87
[ 3 ] : https://rocket.rs/
24
88
25
- ### Installing Rockpass
89
+ #### Installing Rockpass
26
90
27
91
To build Rockpass binary simply execute the following commands.
28
92
``` sh
@@ -39,11 +103,11 @@ Since Rockpass is based in Rocket, the config is same that is detailed in
39
103
[ Rocket documentation] [ 4 ] . Anyway a ` Rocket.toml.example ` is provided with
40
104
comments and the interesting field are the following.
41
105
42
- | Setting | Use | Default value |
43
- | : ----------------------: | : ---------------------------------------------------: | : -----------------: |
44
- | ` registration_enabled ` | Enable or disable the ability to register new users | true |
45
- | ` token_lifetime ` | Time, in seconds, that the login token is valid | 2592000 (30 days) |
46
- | ` rockpass ` | SQLite database location (see below) | |
106
+ | Setting | Use | Default value |
107
+ | --- | --- | --- |
108
+ | ` registration_enabled ` | Enable or disable the ability to register new users | true |
109
+ | ` token_lifetime ` | Time, in seconds, that the login token is valid | 2592000 (30 days) |
110
+ | ` rockpass ` | SQLite database location (see below) | |
47
111
48
112
The database configuration can be detailed in two options.
49
113
0 commit comments