3.3 KiB
Installation
Requirements
- The Bun Runtime, version 1.0.30 or later (usage of the latest version is recommended)
- A PostgreSQL database
- (Optional but recommended) A Linux-based operating system
- (Optional if you want search) A working Meiliseach instance
Warning
Lysand has not been tested on Windows or MacOS. It is recommended to use a Linux-based operating system to run Lysand.
We will not be offerring support to Windows or MacOS users. If you are using one of these operating systems, please use a virtual machine or container to run Lysand.
With Docker
Docker is the recommended way to run Lysand (podman should also work). To run Lysand with Docker, follow these steps:
- Download the
docker-compose.ymlfile from the repository
curl -o docker-compose.yml https://raw.githubusercontent.com/lysand-org/lysand/main/docker-compose.yml
- Edit the
docker-compose.ymlfile to set up the database connection and other settings - Download the
config.toml.examplefile from the repository
curl -o config.toml.example https://raw.githubusercontent.com/lysand-org/lysand/main/config.toml.example
- Edit the
config.toml.examplefile to set up the database connection and other settings, then place it insideconfig/(create theconfig/directory if it does not exist) - Run the following command to start the server:
docker-compose up
You may need root privileges to run Docker commands.
From Source
- Clone this repository
git clone https://github.com/lysand-org/lysand.git
- Install the dependencies
bun install
-
Set up a PostgreSQL database (you need a special extension, please look at the database documentation)
-
(If you want search) Create a Meilisearch instance (using Docker is recommended). For a [
docker-compose] file, copy themeilisearchservice from thedocker-compose.ymlfile.
Set up Meiliseach's API key by passing the MEILI_MASTER_KEY environment variable to the server. Then, enable and configure search in the config file.
- Build everything:
bun prod-build
- Copy the
config.toml.examplefile toconfig.tomlinsidedist/config/and fill in the values (you can leave most things to the default, but you will need to configure things such as the database connection)
You may now start the server with bun start. It lives in the dist/ directory, all the other code can be removed from this point onwards.
Running the Server
Database migrations are run automatically on startup.
You may use the environment variables NO_COLORS=true and NO_FANCY_DATES=true to disable colors and date formatting in the console logs: the file logs will never have colors or fancy dates.
Please see the CLI documentation for more information on how to use the CLI.
Updating the server
Updating the server is as simple as pulling the latest changes from the repository and running bun prod-build again. You may need to run bun install again if there are new dependencies.
For Docker, you can run docker-compose pull to update the Docker images.
Sometimes, new configuration options are added to config.example.toml. If you see a new option in the example file, you should add it to your config.toml file.