2.4 KiB
Installation
Requirements
- A Linux-based operating system. Kernel version
6.1or later is recommended. - Basic knowledge of Docker and Docker Compose.
Installation
[!INFO]
Traditional "from-source" installation is not supported, as the server is designed to be run in a containerized environment. This guide will cover how to run the server using Docker.
You may still run the server without Docker, but I can't guarantee that it will work properly.
- Download the
docker-compose.ymlfile from the repository
Note
You may need to change the image from
ghcr.io/versia-pub/server:latesttoghcr.io/versia-pub/server:mainif you want to use the latest changes from themainbranch. Make sure to use the config template from the same branch as the server.
curl -o docker-compose.yml https://raw.githubusercontent.com/versia-pub/server/v0.7.0/docker-compose.yml
- Edit the
docker-compose.ymlfile to set up the database connection and other settings - Download the
config.example.tomlfile from the repository
curl -o config.example.toml https://raw.githubusercontent.com/versia-pub/server/v0.7.0/config/config.example.toml
- Edit the
config.example.tomlfile to set up the database connection and other settings, rename it toconfig.toml, then place it insideconfig/(create theconfig/directory if it does not exist) - Run the following command to start the server:
Warning
The first time you start the server, it will complain about missing keys in the configuration file.
These will be autogenerated and printed to the console, so you can copy them to your
config.tomlfile.
docker compose up
You may need root privileges to run Docker commands.
To check server logs, run docker compose logs versia. The server will likely stop if there is an error, so you can check the logs to see what went wrong.
Running the Server
Database migrations are run automatically on startup.
Please see the CLI documentation for more information on how to use the CLI.
Updating the server
Updating the server is as simple as running docker-compose pull to update the Docker images, then docker-compose up to restart the server.
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.