In this tutorial, we will walk you through the steps to install Atomic Server on the latest version of nixOS.
If you haven't already installed nixOS on your system, install it by following the appropriate guide for your system.
Rustup is a tool that installs Rust on your system. To install Rustup, open your terminal and run the following command:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
This command will download and run an installation script. Follow the prompts to complete the installation process.
You need to clone the Atomic Server repository from GitHub. Open your terminal and run the following command to clone the repository:
git clone git@github.com:atomicdata-dev/atomic-data-rust.git
Next, navigate to the Atomic Server directory that you just cloned using the following command:
cd atomic-data-rust/
Then, use cargo to build the server:
cargo build --release --bin server
To create a service for Atomic Server, create a new file in the /etc/nixos/
directory with the name atomic.nix
using the following command:
sudo nano /etc/nixos/atomic.nix
In this file, paste the following:
systemd.services.atomic = {
description = "Atomic Server";
wantedBy = [ "multi-user.target" ];
environment.ATOMIC_RG_CONCURRENCY = "20"; // optional
environment.ATOMIC_PG_CONCURRENCY = "20"; // optional
serviceConfig.Type = "simple";
serviceConfig.ExecStart = "${pkgs.rust}/bin/cargo run --release --bin server";
};
Save and exit the file. This creates a service for Atomic Server that will run on boot.
Next, enable the service by adding it to the nixOS configuration file. Open the /etc/nixos/configuration.nix
file using the following command:
sudo nano /etc/nixos/configuration.nix
Add the following to the services
section of the file:
services.atomic = {
enable = true;
};
Save and exit the file.
Lastly, reload the nixOS configuration file to activate the new configuration by running the following command:
sudo nixos-rebuild switch
At this point, Atomic Server should be installed and running on your nixOS system. You can access the Atomic Server by navigating to localhost:3030
in your web browser.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!