Skip to content

Commit 89bf102

Browse files
committed
feat (ct): add atuin
1 parent d7c4176 commit 89bf102

4 files changed

Lines changed: 181 additions & 0 deletions

File tree

ct/atuin.sh

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#!/usr/bin/env bash
2+
# Engine comes from community-scripts/core; this repo only ships the scripts.
3+
# A local core checkout wins (COMMUNITY_SCRIPTS_CORE_DIR, else a sibling ../core),
4+
# so a fork or branch of core can be tested without editing this file.
5+
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
6+
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
7+
8+
# Copyright (c) 2021-2026 community-scripts ORG
9+
# Author: Pascal de Vink (pascaldevink)
10+
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
11+
# Source: https://atuin.sh/
12+
13+
APP="Atuin"
14+
var_tags="${var_tags:-cli}"
15+
var_cpu="${var_cpu:-2}"
16+
var_ram="${var_ram:-1024}"
17+
var_disk="${var_disk:-10}"
18+
var_os="${var_os:-debian}"
19+
var_version="${var_version:-13}"
20+
#var_arm64="${var_arm64:-no}" # unset = ask the user; set yes/no only when verified
21+
var_unprivileged="${var_unprivileged:-1}"
22+
23+
header_info "$APP"
24+
variables
25+
color
26+
catch_errors
27+
28+
function update_script() {
29+
header_info
30+
check_container_storage
31+
check_container_resources
32+
33+
if [[ ! -d /opt/atuin ]]; then
34+
msg_error "No ${APP} Installation Found!"
35+
exit
36+
fi
37+
38+
if check_for_gh_release "atuin" "atuinsh/atuin"; then
39+
msg_info "Stopping Service"
40+
systemctl stop atuin
41+
msg_ok "Service stopped"
42+
43+
msg_info "Updating Atuin"
44+
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/atuinsh/atuin/releases/latest/download/atuin-server-installer.sh | ATUIN_SERVER_INSTALL_DIR="/opt/atuin" $STD sh
45+
cat <<EOF >~/.atuin
46+
$(get_latest_github_release "atuinsh/atuin")
47+
EOF
48+
msg_ok "Updated Atuin"
49+
50+
msg_info "Starting Service"
51+
systemctl start atuin
52+
msg_ok "Service started"
53+
msg_ok "Updated successfully!"
54+
fi
55+
exit
56+
}
57+
58+
start
59+
build_container
60+
description
61+
62+
msg_ok "Completed successfully!\n"
63+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
64+
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
65+
echo -e "${GATEWAY}${BGN}http://${IP}:8888${CL}"
66+
echo -e "${INFO}${YW}Credentials saved in:${CL}"
67+
echo -e "${TAB}/root/atuin.creds"

ct/headers/atuin

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
___ __ _
2+
/ | / /___ __(_)___
3+
/ /| |/ __/ / / / / __ \
4+
/ ___ / /_/ /_/ / / / / /
5+
/_/ |_\__/\__,_/_/_/ /_/

install/atuin-install.sh

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2026 community-scripts ORG
4+
# Author: Pascal de Vink (pascaldevink)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
6+
# Source: https://atuin.sh/
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
PG_VERSION="17" setup_postgresql
17+
PG_DB_NAME="atuin" PG_DB_USER="atuin" setup_postgresql_db
18+
19+
msg_info "Installing Atuin"
20+
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/atuinsh/atuin/releases/latest/download/atuin-server-installer.sh | ATUIN_SERVER_INSTALL_DIR="/opt/atuin" $STD sh
21+
cat <<EOF >/opt/atuin/server.toml
22+
host = "0.0.0.0"
23+
port = 8888
24+
open_registration = true
25+
db_uri = "postgres://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME}"
26+
EOF
27+
msg_ok "Installed Atuin"
28+
29+
msg_info "Creating Service"
30+
cat <<'EOF' >/etc/systemd/system/atuin.service
31+
[Unit]
32+
Description=Atuin
33+
After=network.target postgresql.service
34+
Requires=postgresql.service
35+
36+
[Service]
37+
Type=simple
38+
WorkingDirectory=/opt/atuin/
39+
ExecStart=/opt/atuin/atuin-server start
40+
Restart=always
41+
RestartSec=5
42+
43+
Environment=ATUIN_CONFIG_DIR=/opt/atuin
44+
ReadWritePaths=/opt/atuin
45+
46+
[Install]
47+
WantedBy=multi-user.target
48+
EOF
49+
50+
systemctl enable -q --now atuin
51+
52+
cat <<EOF >~/.atuin
53+
$(get_latest_github_release "atuinsh/atuin")
54+
EOF
55+
msg_ok "Created Service"
56+
57+
motd_ssh
58+
customize
59+
cleanup_lxc

json/atuin.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"name": "Atuin",
3+
"slug": "atuin",
4+
"categories": [
5+
0
6+
],
7+
"date_created": "2026-08-11",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"architectures": ["amd64"],
12+
"interface_port": 8888,
13+
"documentation": "https://docs.atuin.sh/latest/",
14+
"website": "https://atuin.sh",
15+
"repository": "https://github.com/atuinsh/atuin",
16+
"logo": "https://avatars.githubusercontent.com/u/122059230?s=60&v=4",
17+
"description": "Sync, search, and back up your shell history with end-to-end encryption. Ask Atuin AI for help without leaving your prompt.",
18+
"install_methods": [
19+
{
20+
"type": "default",
21+
"script": "ct/atuin.sh",
22+
"config_path": "/opt/atuin/server.toml",
23+
"resources": {
24+
"cpu": 2,
25+
"ram": 1024,
26+
"hdd": 10,
27+
"os": "Debian",
28+
"version": "13"
29+
}
30+
}
31+
],
32+
"default_credentials": {
33+
"username": null,
34+
"password": null
35+
},
36+
"notes": [
37+
{
38+
"text": "Configuration lives in /opt/atuin/server.toml",
39+
"type": "info"
40+
},
41+
{
42+
"text": "Registration is open by default, do not forget to close if required",
43+
"type": "info"
44+
},
45+
{
46+
"text": "Uses PostgreSQL",
47+
"type": "info"
48+
}
49+
]
50+
}

0 commit comments

Comments
 (0)