atuin icon indicating copy to clipboard operation
atuin copied to clipboard

deserialization failure, hosting atuin-server on fly.io

Open vielmetti opened this issue 1 year ago • 1 comments

I'm trying to host atuin-server on fly.io, and I'm running into a snag. The server appears to come up properly, but when I go to register myself as a new user I get this error. I am new to both attain and to fly.io so this has been a bit of a puzzle.

Please enter username: emv
Please enter email: [email protected]
Please enter password: 
Error: error sending request for url (https://w8emv-atuin.fly.dev/user/emv): error trying to connect: Connection reset by peer (os error 54)

Caused by:
   0: error trying to connect: Connection reset by peer (os error 54)
   1: Connection reset by peer (os error 54)

Location:
    /private/tmp/atuin-20221121-6132-1bbc4pq/atuin-12.0.0/atuin-client/src/api_client.rs:46:16

Related (perhaps?) is this error in the logs when I try to set

ATUIN_OPEN_REGISTRATION=true

I get this

023-02-19T06:06:24.304 app[3d591bf5] ord [info] Starting init (commit: 617e840)...
2023-02-19T06:06:24.324 app[3d591bf5] ord [info] Preparing to run: `/usr/local/bin/atuin server start` as atuin
2023-02-19T06:06:24.339 app[3d591bf5] ord [info] 2023/02/19 06:06:24 listening on [fdaa:1:5c71:a7b:98:3d59:1bf5:2]:22 (DNS: [fdaa::3]:53)
2023-02-19T06:06:24.368 app[3d591bf5] ord [info] Error: could not load server settings
2023-02-19T06:06:24.368 app[3d591bf5] ord [info] failed
2023-02-19T06:06:24.368 app[3d591bf5] ord [info] failed to deserialize: invalid type: string "t", expected a boolean for key `open_registration` in the environment
2023-02-19T06:06:24.368 app[3d591bf5] ord [info] Location:
2023-02-19T06:06:24.368 app[3d591bf5] ord [info] atuin-server/src/settings.rs:64:26
2023-02-19T06:06:25.332 app[3d591bf5] ord [info] Starting clean up.

The fly.io docs helpfully suggest that they can only set strings as environment variables, not booleans. And I'd like to do this all without the need for mountiag a volume just for the config file.

vielmetti avatar Feb 19 '23 07:02 vielmetti

Strange. Looking at the code, I don't see why

[env]
    ATUIN_OPEN_REGISTRATION = "true"

Wouldn't work.

If you're still having trouble, you could try put a settings.toml into your docker file with this configuration there instead

conradludgate avatar Feb 19 '23 07:02 conradludgate

Looks like Haseeb Majid @hmajid2301 worked out the full install - his notes are at

https://haseebmajid.dev/posts/2023-08-16-how-self-host-your-own-atuin-server/

vielmetti avatar Feb 04 '24 22:02 vielmetti

Looks like this is sorted

ellie avatar Feb 05 '24 15:02 ellie

Yes @Ellie it's sorted out - the tutorial I linked to had enough information to make it possible for me to get atuin server running and synced between a couple of machines. I appreciate it!

vielmetti avatar Feb 06 '24 05:02 vielmetti