After following the instructions on the Installation page, your Sputnik should be ready to run. However, there are a few changes that you might want to make. Sputnik uses a number of configuration parameters, which can be set in two places. Then see Configuration for more configuration options.
Bootstrapping Parameters
The first place is the launcher script (your sputnik.ws, sputnik.cgi or sputnik.fcgi file). Those can be created using "make-cgi" command or you can write them by hand.
For instance, your sputnik.ws may look like this:
require('sputnik.wsapi_app')
return sputnik.wsapi_app.new{
VERSIUM_PARAMS = { [[/home/yuri/sputnik/wiki-data/]] },
BASE_URL = '/',
PASSWORD_SALT = '8C7f8lProgw3U4IvVyDqk38bD0HAD8hBBfHzrmRF',
TOKEN_SALT = 'tdzd77zTw3aHW8IqZgQteXUG3s5kFMQZQf2Odsxz',
USE_POSIX_CRYPT = true,
-- SHOW_STACK_TRACE = true,
}
This is a Lua script, which creates a new application passing it a basic set of parameters and the last last few lines set configuration parameters.
VERSIUM_PARAMS tells sputnik how to access storage. In the simplest case, it's just a path to a directory where the data will be stored.
BASE_URL tells Sputnik where it appears relative to your web server's root. It needs to know this so that it could create correct links to its own files.
TOKEN_SALT is a secret code that will be used for encryption in cookies, etc. The one in your sputnik.cgi file will be different - it is generated randomly. You can just use this number.
PASSWORD_SALT parameter is a separate code used for hashing passwords. It is also generated randomly. If you are setting up Sputnik for the first time, you can just use the random code that was generated. If you want to move user accounts from one instance of Sputnik to another, however, you will need to use the same PASSWORD_TOKEN as on the instance that created the accounts.
USE_POSIX_CRYPT is an optional parameter but is set here by the
make-cgi
command based on whether you have LuaPosix installed. If you have (or can install) LuaPosix, then setting USE_POSIX_CRYPT to true is a very good idea, since it makes your passwords more secure. See Security for more information.
The Configuration Node
Once the required parameters mentioned above are set, you can run Sputnik and login as "Admin".
After logging in as the admin you can set further parameters using the web interface by editing the sputnik/config
node.
The content of this node is again Lua code, which evaluate into a series of parameters.
However, all you need to do at this point is set some variables to values.
As you do so, the color of the background will indicate whether your syntax is correct.
If you are not sure whether you are doing it right, use "preview" before saving.
You will find that sputnik/config
already sets a few parameters, so if you want to change those, just edit their values.
Those parameters include the title and subtitle of your site and the domain on which your Sputnik will run.
You can add more parameters here. To find out the list of available parameters use "sputnik topic" command at the command line
and the Configuration node.
Changes to sputnik/config
apply immediately when Sputnik is running as CGI. When running through Xavante or FastCGI, however, configurations do not take effect until Sputnik is reloaded. To reload Sputnik visit sputnik.reload
node while logged in as "Admin".
Parameters set in sputnik/config
usually override those specified in the launcher script.