2.4 KiB

Nix Flake for Misskey

This is a Nix flake for Misskey. It can be used to deploy Misskey, a decentralized, ActivityPub-based microblogging platform, on NixOS.

This is an unofficial effort, not associated with the Misskey project. Please do not report any issues encountered when deploying Misskey via this method to the upstream Misskey project.



To use the Misskey module provided by this flake, add this flake as an input to the flake.nix used for your system configurations, and then import nixosModule from it.

For example, your flake.nix might look something like this:

  inputs = {
    misskey.url = "github:DeeUnderscore/misskey-flake";

  outputs = {self, nixpkgs, misskey}: {
    nixosConfigurations.exampleBox = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [ ./exampleBox/configuration.nix ];
      specialArgs = { 
          inherit misskey;

Then, in your confiuguration.nix, you can import the module like so:

{ config, pkgs, misskey, ...}:
  imports = [


For detailed options provided by the module, see the module source file. There is currently no generated documentation.

services.misskey.settings follows the Misskey config file structure.

Database setup

The module supplied by the flake does not provide a createLocally option for the database. Additionally, there is no support for peer authentication, so you will most likely need to set a password for the Misskey user manually.

To do this, add a Misskey user to your Postgresql configuration in your configuration.nix:

services.postgresql = {
    enable = true;
    authentication = ''
      host   misskey   misskey password

    ensureDatabases = [

    ensureUsers = [
        name = "misskey";
        ensurePermissions."DATABASE misskey" = "ALL PRIVILEGES";

And then, imperatively:

$ sudo -u postgres psql 
postgres=# ALTER ROLE misskey WITH PASSWORD 'passwordGoesHere';


The contents of this repository are available under the MIT license. See LICENSE for full text.