Skip to main content
You can deploy your own oxen-server instance on your own infrastructure, or use the hosted version on OxenHub. If you want to kick the tires of Oxen in the privacy of your own infrastructure, we recommend you setup a local server.
The hosted solution comes with a UI and the benefits of not having to setup infrastructure yourself. Sign up here to get started. OxenHub

βš™οΈ Install

To setup a local Oxen Server instance, first install the oxen-server binary.
oxen-server is supported on Linux, macOS, and Docker. It is not supported on Windows. The oxen CLI and Python client are supported on Windows and can connect to a server hosted on a supported platform.

Mac OS

On Mac-OS you can use Homebrew to install the binary.

Ubuntu

On Ubuntu you can download the latest .deb file from our GitHub Releases and install it.

Docker

To run the server in a docker container, download the latest .tar file from our GitHub Releases and run the following commands.
To install on other platforms, follow the installation instructions.

🏎️ Start Server

oxen-server does not authenticate requests itself. To require authentication, run it behind a reverse proxy or gateway that checks each request before forwarding it. If the gateway checks a bearer token, give each client its token with the config command. It keeps one token per host in ~/.config/oxen/auth_config.toml and sends it as Authorization: Bearer <TOKEN> on every request to that host.
oxen-server 0.59.0 removed the -a flag and the add-user command, and a server started with -a refuses to start. See the upgrade steps before upgrading a server that uses them.

πŸ—‚οΈ Sync Directory

The default directory that Oxen stores data is data, relative to the working directory the server was started from, which is convenient for trying things out but not what you want in production. To change it set the SYNC_DIR environment variable to an absolute path.
Output:
If you want to change the default IP ADDRESS and PORT you can do so by passing them in with the -i and -p parameters.

🐞 Debug Logs

The oxen server provides debug logs, which are off by default. You can turn these on with the RUST_LOG variable.
You can also set RUST_LOG to info or warn for more restrictive debug logs. Be aware, turning on debug logs can significantly slow down some metadata-heavy operations like oxen commit

πŸ“ Create a Repository

Assuming you have already installed the oxen CLI, you can create a remote repository on the server.
Note: The host and scheme are optional and default to hub.oxen.ai and https respectively. If you are running a local server, you can set the host to localhost:3000 and the scheme to http. You can either clone data from this remote repository, or push data to it.

πŸ—„οΈ File Storage

When you create a remote repository, Oxen will create a directory for it on the server. The directory structure is $SYNC_DIR/<namespace>/<repo_name>/.oxen.
Output:
All of the metadata and versioned files for a repository are stored in the .oxen directory. This directory mirrors the .oxen directory in your local repository, so that logic can be reused between the client and server.

πŸ’Ύ Configureable Storage Backend

Oxen allows you to configure the storage backend of self-hosted oxen servers. By default, a repository’s version files are stored in the .oxen/versions/files folder, but this can be changed by using the --storage-backend and --storage-backend-path parameters
This is useful if you have a large amount of data and you want to store it on a virtual file system. If you set --storage-backend-path to a location on your VFS, files that you push to the remote will be stored there. Depending on your VFS, this can slow down some upload and download operations.

⬆️ Upload Data

To upload data to the server, you can use the oxen CLI to initialize a local repository, add data to it, and push it to the server.
If you look in your local repository, you will see the .oxen directory.
Output:
You can set the remote to the server by running the following command. This will update the config.toml file in your local repository.
If you look at the config.toml file, you will see the remote set.
Output:
Once a remote is set you can push your changes to the server.
You can change the remote (origin) and the branch (main) to whichever remote and branch you want to push.

⬇️ Clone Data

Clone the empty repository:

API Spec

The server has a REST API that can be used to interact with the server. The API is documented here.