# Eigener Atuin Server ``` $ sudo apt install postgresql ``` Postgresql user und database einrichten Konfiguration: `~/.config/atuin/server.toml` Herausfinden wo `config` und `data` sind: ``` $ sudo su - postgres postgres@hhoegl2:~$ psql postgres=# SHOW config_file; /etc/postgresql/15/main/postgresql.conf postgres=# SHOW data_directory; /var/lib/postgresql/15/main ``` Anleitung gefunden, wie man Postgresql einrichtet: ``` $ sudo -u postgres psql CREATE USER hhoegl WITH ENCRYPTED PASSWORD 'a4m9p_k!'; CREATE DATABASE atuin WITH OWNER = hhoegl; \c atuin REVOKE ALL PRIVILEGES ON SCHEMA public FROM PUBLIC; hhoegl2 $ atuin server start hhoegl2 $ atuin account register - hubert, hubert.hoegl@tha.de, foobar61 Registration successful! Please make a note of your key (run 'atuin key ') and keep it safe. You will need it to log in on other devices, and we cannot help recover it if you lose it. hhoegl2 $ atuin key damp horror citizen square friend combine dish keen bunker turn upgrade segment space congress weasel noise genius spike injury online mushroom seek poverty vibrant (base) hhoegl@hhoegl2:~$ atuin status Atuin v18.5.0 - Build rev 53acf850f37d8cc8ffdcfebd7a73343f8dc339b6 [Local] Sync frequency: 5m Last sync: 2025-04-21 23:42:39.284102477 +02:00:00 [Remote] Address: http://141.82.131.9:8888 Username: hubert Firewall auf hhoegl2 Server: Port 8888 freigeben $ sudo iptables -I INPUT -i eth0 -p tcp --dport 8888 -m comment --comment "# atuin sync #" Testweise von hhoegl@t420:~ $ $ curl http://141.82.131.9:8888 {"homage":"\"Through the fathomless deeps of space swims the star turtle Great A'Tuin, bearing on its back the four giant elephants who carry on their shoulders the mass of the Discworld.\" -- Sir Terry Pratchett","version":"18.5.0","total_history":-1} Key muss im base64 Format sein: $ atuin key --base64 3AAgNy3MtMylacy1zM5bzM/My8zNHn1bzLrM4cydBF4+JMyuYMz6OczQzM15HcyGKkc= ``` Auf t420: ``` $ atuin login Please enter username: hubert Please enter password: IMPORTANT If you are already logged in on another machine, you must ensure that the key you use here is the same as the key you used there. You can find your key by running 'atuin key' on the other machine Do not share this key with anyone Read more here: Please enter encryption key [blank to use existing key file]: 3AAgNy3MtMylacy1zM5bzM/My8zNHn1bzLrM4cydBF4+JMyuYMz6OczQzM15HcyGKkc= Logged in! ``` Synchronisation klappt von hhoegl2 auf t420, Kommando `cowsay "Muuh"`. 5 Minuten Synczeit.