Installation
Requirements
- A Linux-based operating system. Kernel version
6.1
or 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.yml
file from the repository
NOTE
You may need to change the image from ghcr.io/versia-pub/server:latest
to ghcr.io/versia-pub/server:main
if you want to use the latest changes from the main
branch. 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.yml
file to set up the database connection and other settings - Download the
config.example.toml
file 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.toml
file 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.toml
file.
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.