pypiserver – service

Reading Time: < 1 minute
pip install pypiserver
cat <<EOF | sudo tee /etc/systemd/system/pypiserver.service
[Unit]
    After=network.target

 [Service]
    Type=simple
    ExecStart=/usr/local/bin/pypi-server run -p 8080 /opt/packages
    WorkingDirectory=/opt/packages
    TimeoutStartSec=3

[Install]
    WantedBy=multi-user.target
EOF

Remember you will need to reload system daemon.

 sudo systemctl daemon-reload

The service may be started in the following fashion.

sudo systemctl start pypiserver

When checking status

systemctl status pypiserver

PRO TIP: And you might want to remember to “enable” the service so that it automatically starts when the server is restarted

systemctl enable pypiserver.service
This entry was posted in Python. Bookmark the permalink.