I stumbled a bit (quite a bit) until I managed  to have a running deployment.
To potentially save some time for future newcomers, seeing that the documentation is somewhat outdated, I'll list here my steps along with some hurdles I ran into and some corresponding questions.1
. started from fresh fresh Ubuntu 18.04
*docs need to be updated, the Debian Wheezy 64-bit or Ubuntu Trusty - 14.04 are outdated.
> sudo apt upgrade
*not sure this is a necessary step, I previously had bundle error  and later updating the packages might've helped? 2
. added my domain to hosts
both on the VPS and my local machine
*to be found /etc/hosts
for Ubuntu, Debian, MacOS 3
. downloaded & ran the install script:
> curl -O https://raw.githubusercontent.com/mysociety/commonlib/master/bin/install-site.sh
> sudo sh install-site.sh alaveteli alaveteli-usr alaveteli.myfoia.org4
. set the password for the newly created user
> sudo passwd alaveteli-usr
then switched to it:
> su alaveteli-usr
. in the Alaveteli folder (/var/www/alaveteli.myfoia.org/alaveteli
> bundle pristine 6
. created the production database – as suggested here
> RAILS_ENV=production bin/rake db:create db:migrate db:seed
. launched Alaveteli:
> service alaveteli start
interestingly, each time I touch the alaveteli service as the alaveteli user I get prompted for the user initially used to run the installation script8
Also ran bundle exec rake themes:install
but that didn't help by itself.bundle exec rake assets:precompile
– copies some images into alaveteli/public/assets but not the css/js
I sloppily fixed this by stealing the compiled css & js from a Vagrant install.9
. Creating the admin user.
following Create an admin account
I created then confirmed via email (I used mailinator.com
to make sure the message doesn't get rejected) and proceeded to /admin?emergency=1 where I logged in with the emergency user,
found in alaveteli/config/general.yml
Then I ran into this issue
: I could edit the new user, but the admin checkbox was disabled. After this step, the emergency user gets disabled, so I got stuck – I eventually managed to elevate my newly created user to admin by editing the users_roles table, as described here
Are all the above steps necessary
, or it's just that the install script failed some tasks?
I saved some logs doing the installation steps:
The installation script page states:
> This is not suitable for production (it runs in development mode, for example) but should set up a functional installation of the site, which can send and receive email.
* even-though the install script uses alavateli_production
Does this relate to some configuration items that need changed before going into production, or the install-sh way is not generally suitable for production, the suggested way being the manual install?
 with the kind help of Andrei
which was familiar with an old version of Alaveteli.
 /usr/bin/bundle: bundle: line 5: syntax error near unexpected token `"INT"' /usr/bin/bundle: bundle: line 5: `Signal.trap("INT") do'