Getting started
Sudoc is a Next.js app, which means, you’ll do the usual setup that you’ll would do with a regular Next.js app. Along with that, there are a few additional steps you need to follow.
Requirements
To use Sudoc, make sure you have the following:
- A server or hosting service where you’ll host Sudoc. Self hosting is what we’d recommend. But if you prefer an easier solution, you can use services like Vercel.
- Node.js v24.6.0 or newer
- A Node.js package manager. pnpm is preferred, but you can use other package managers too.
- 8GB system memory (12GB or higher recommended)
- 2 or more CPU cores
It is recommended that you run Sudoc on a GNU/Linux machine, although running it on other platforms is also possible.
Cloning the repository
First, clone the Sudoc Github repository (assuming you have Git installed):
git clone https://github.com/onesoft-sudo/sudocYou can also download a snapshot instead, from the Releases page and extract it, if you'd like.
Then switch your current directory to it:
cd sudoc/Then follow the next steps.
Installing Dependencies
Just like any other Node.js project, you will have to install its dependencies before you build or use it:
pnpm installIf you wish to use other package managers, you can do so. They might have slightly different commands and behaviors.
Initializing the project and managing configuration files
See the Configuration page for more details on what the available configuration files and options are. This step is very important. You should customize the configuration files as you need. After that, run the following command to perform project initialization:
node scripts/init.tsCreating a production build
To create a production build, simply run:
pnpm run buildThis will take a while depending on your system. If you get "Segmentation fault" or crashes during this phase without error messages, it is likely that you might need more resources.
Starting the app
Once you've built the app, you can start it using the following command:
pnpm run startThis should quickly start a local server, which you can access to see the app. You can then go further and set up a reverse proxy or directly expose it to the world, although we would not recommend doing that.
Starting the dev server
If you're developing or writing documentation pages on your local machine, the dev server might be helpful for you. The dev server features hot reloading, strict mode, friendly error messages and a lot of other things that are very helpful during development.
Before you start the dev server, you should keep in mind that when you build the app for production, the sitemaps, indexes and trees are automatically generated for you. But in dev mode, you must generate them manually. To do so, run:
node scripts/genindexes.ts --pre --postTo start the dev server, run the following:
pnpm run devOne drawback is that the dev server might make the website feel a bit slow. But that won’t be the case in production.