-
-
Notifications
You must be signed in to change notification settings - Fork 51
Manual Installation Guide for acme2certifier
This guide provides step-by-step instructions for manually installing and configuring acme2certifier from source. These steps assume you have downloaded and extracted the source code to /tmp/acme2certifier.
Note: These instructions are based on an installation on Ubuntu 24.04. Adapting them to other Linux distributions should be straightforward, though package names and service management commands may vary slightly.
Update your package lists and install required dependencies:
apt-get update # && apt-get upgrade
apt-get install -y python3-pip nginx uwsgi uwsgi-plugin-python3 curl krb5-user libkrb5-3 python3-gssapiNavigate to the source directory and install Python dependencies:
cd /tmp/acme2certifier
pip3 install Cython --break-system-packages
python3 setup.py installCopy and link required files for the application and web server:
cp /var/lib/acme2certifier/examples/acme2certifier_wsgi.py /var/lib/acme2certifier
ln -s /var/lib/acme2certifier/volume/acme_srv.cfg /var/lib/acme2certifier/acme_srv/
ln -s /var/lib/acme2certifier/examples/db_handler/wsgi_handler.py /var/lib/acme2certifier/acme_srv/db_handler.py
cp /var/lib/acme2certifier/examples/nginx/nginx_acme_srv.conf /etc/nginx/sites-available/acme_srv.conf
cp /var/lib/acme2certifier/examples/nginx/nginx_acme_srv_ssl.conf /etc/nginx/sites-available/acme_srv_ssl.conf
rm /etc/nginx/sites-enabled/default
ln -s /etc/nginx/sites-available/acme_srv.conf /etc/nginx/sites-enabled/acme_srv.conf
ln -s /etc/nginx/sites-available/acme_srv_ssl.conf /etc/nginx/sites-enabled/acme_srv_ssl.conf
cp /var/lib/acme2certifier/examples/nginx/acme2certifier.ini /var/lib/acme2certifier
chown -R www-data:www-data /var/lib/acme2certifier/Link your preferred database-handler into /var/lib/acme2certifier/acme_srv
ln -s /var/lib/acme2certifier/examples/db_handler/[wsgi|django]_handler.py /var/lib/acme2certifier/acme_srv/db_handler.pyWhen using the django handler configure install and configure the django environment.
apt-get install -y python3-django python3-mysqldb python3-pymysql python3-yaml
cp -R /var/lib/acme2certifier/examples/django/* /var/lib/acme2certifier/
sed -i "s/acme2certifier_wsgi/acme2certifier.wsgi/g" /var/lib/acme2certifier/acme2certifier.iniModify the settings.py according to your needs, create the database tables and load the fixtures.
cd /var/lib/acme2certifier
python3 manage.py makemigrations
python3 manage.py migrate
python3 manage.py loaddata acme_srv/fixture/status.yaml
chown -R www-data:www-data /var/lib/acme2certifier/Create the following systemd service file at /etc/systemd/system/acme2certifier.service:
[Unit]
Description=uWSGI instance to serve acme2certifier
After=network.target
[Service]
User=www-data
Group=www-data
WorkingDirectory=/var/lib/acme2certifier
Environment="PATH=/var/lib/acme2certifier"
ExecStart=uwsgi --ini acme2certifier.ini
[Install]
WantedBy=multi-user.targetStart and enable the acme2certifier service and restart nginx:
systemctl start acme2certifier
systemctl enable acme2certifier
systemctl restart nginxTo restart or stop the services later, use:
systemctl restart acme2certifier
systemctl restart nginx
systemctl stop acme2certifier
systemctl stop nginx
systemctl start acme2certifier
systemctl start nginxYou can test your ACME server using the lego client:
docker run -i -v /home/joern/data/lego:/.lego/ --network acme --rm --name lego goacme/lego run \
-s http://acme-srv.acme -a --email "lego@example.com" \
-d lego.acme --key-type rsa2048 --tls-skip-verify --httpacme2certifier should now be installed and running. For further configuration, refer to the project documentation.