Environments
Hatsu supports dotenv, and you can set environment variables via the .env file.
It is required unless it has a suffix (optional).
However, it may exist as a built-in preset (in the source code) or an example preset (in .env.example)
HATSU_LOG
- default:
info - example:
info,tokio::net=debug,sqlx::query=warn
The format is the same as the RUST_LOG.
HATSU_ENV_FILE
- default:
/etc/hatsu/.env
Hatsu will first try to find the dotenv file in the current directory, and if unsuccessful will try to use the path indicated by HATSU_ENV_FILE.
HATSU_DATABASE_URL
- default:
sqlite::memory: - example:
sqlite://hatsu.sqlite3
Should be a valid sqlite: or postgres: URL. see sea-ql.org
sqlite::memory: is used by default to ensure that hatsu does not report errors as a result.
If you're not using a Postgres database, I recommend keeping the sqlite://hatsu.sqlite3.
HATSU_DOMAIN
- default: None
- example:
hatsu.local
The domain name you assigned to this Hatsu instance.
HATSU_LISTEN_HOST
- default:
127.0.0.1 - example:
0.0.0.0
The hostname on which the Hatsu server listens.
HATSU_LISTEN_PORT
- default:
3939 - example:
3939
The port on which the Hatsu server listens.
HATSU_PRIMARY_ACCOUNT
- default: None
- example: None
The primary account for this Hatsu instance, which cannot be removed and is used as a signed_fetch_actor.
HATSU_ACCESS_TOKEN (optional)
- default: None
- example: None
For accessing Admin API.
If this value is not set, the Hatsu Admin API will not be available.
This can be any string, but I recommend generating a random uuid v4.
echo "\nHATSU_ACCESS_TOKEN = \"$(cat /proc/sys/kernel/random/uuid)\"" >> .env
HATSU_NODE_NAME (optional)
- default: None
- example: None
Used for NodeInfo metadata.nodeName.
HATSU_NODE_DESCRIPTION (optional)
- default: None
- example: None
Used for NodeInfo metadata.nodeDescription.