Debian 12, single user sqlite production…
Not a nerd, as simple as possible please…
Thanks
Where did you see this error? Can you share more logs and information around it to give some more context?
Hi, here they are… thanks
sudo systemctl status writefreely.service
× writefreely.service
Loaded: loaded (/etc/systemd/system/writefreely.service; enabled; preset: enabled)
Active: failed (Result: start-limit-hit) since Mon 2024-02-26 18:06:03 UTC; 1h 50min ago
Duration: 114ms
Process: 4643 ExecStart=/var/www/postberg.io/html/writefreely/writefreely (code=exited, status=0/SUCCESS)
Main PID: 4643 (code=exited, status=0/SUCCESS)
CPU: 109ms
Feb 26 18:06:03 postberg systemd[1]: writefreely.service: Deactivated successfully.
Feb 26 18:06:03 postberg systemd[1]: writefreely.service: Scheduled restart job, restart counter is at 5.
Feb 26 18:06:03 postberg systemd[1]: Stopped writefreely.service.
Feb 26 18:06:03 postberg systemd[1]: writefreely.service: Start request repeated too quickly.
Feb 26 18:06:03 postberg systemd[1]: writefreely.service: Failed with result 'start-limit-hit'.
Feb 26 18:06:03 postberg systemd[1]: Failed to start writefreely.service.
sudo journalctl -u writefreely.service
Feb 26 20:11:58 postberg systemd[1]: Started writefreely.service.
Feb 26 20:11:58 postberg writefreely[5628]: 2024/02/26 20:11:58 Starting WriteFreely 0.15.0...
Feb 26 20:11:58 postberg writefreely[5628]: 2024/02/26 20:11:58 Loading config.ini configuration...
Feb 26 20:11:58 postberg writefreely[5628]: 2024/02/26 20:11:58 Loading templates...
Feb 26 20:11:58 postberg writefreely[5628]: 2024/02/26 20:11:58 Loading pages...
Feb 26 20:11:58 postberg writefreely[5628]: 2024/02/26 20:11:58 Loading user pages...
Feb 26 20:11:58 postberg writefreely[5628]: 2024/02/26 20:11:58 Loading encryption keys...
Feb 26 20:11:58 postberg writefreely[5628]: 2024/02/26 20:11:58 Connecting to sqlite3 database...
Feb 26 20:11:58 postberg writefreely[5628]: 2024/02/26 20:11:58 Adding {domain} routes (single user)...
Feb 26 20:11:58 postberg writefreely[5628]: 2024/02/26 20:11:58 Going to serve...
Feb 26 20:11:58 postberg writefreely[5628]: 2024/02/26 20:11:58 Using autocert on host postberg.io
Feb 26 20:11:58 postberg writefreely[5628]: 2024/02/26 20:11:58 Serving on https://localhost:443
Feb 26 20:11:58 postberg writefreely[5628]: 2024/02/26 20:11:58 ---
Feb 26 20:11:58 postberg systemd[1]: writefreely.service: Deactivated successfully.
Feb 26 20:11:58 postberg systemd[1]: writefreely.service: Scheduled restart job, restart counter is at 5.
Feb 26 20:11:58 postberg systemd[1]: Stopped writefreely.service.
Feb 26 20:11:58 postberg systemd[1]: writefreely.service: Start request repeated too quickly.
Feb 26 20:11:58 postberg systemd[1]: writefreely.service: Failed with result 'start-limit-hit'.
Feb 26 20:11:58 postberg systemd[1]: Failed to start writefreely.service.
config.ini
[server]
hidden_host =
port = 443
bind = localhost
tls_cert_path = certs
tls_key_path = certs
autocert = true
templates_parent_dir =
static_parent_dir =
pages_parent_dir =
keys_parent_dir =
hash_seed =
gopher_port = 0
[database]
type = sqlite3
filename = writefreely.db
username =
password =
database =
host = localhost
port = 3306
tls = false
[app]
site_name = Postberg
site_description =
host = https://postberg.io
theme = write
editor =
/etc/systemd/system/writefreely.service
[Unit]
Description=
After=syslog.target network.target mysql.service
[Service]
Type=simple
WorkingDirectory=/var/www/postberg.io/html/writefreely
ExecStart=/var/www/postberg.io/html/writefreely/writefreely
Restart=always
[Install]
WantedBy=multi-user.target
Thanks! It looks like an error is happening when WriteFreely is trying to start up. But you’ll need to run it with the --debug
flag to get more information.
To do this, can you change this line:
ExecStart=/var/www/postberg.io/html/writefreely/writefreely
to this:
ExecStart=/var/www/postberg.io/html/writefreely/writefreely --debug
and then share your logs when you try to start the application?
sudo systemctl status writefreely.service
× writefreely.service
Loaded: loaded (/etc/systemd/system/writefreely.service; enabled; preset: enabled)
Active: failed (Result: start-limit-hit) since Mon 2024-02-26 20:41:27 UTC; 1min 19s ago
Duration: 116ms
Process: 6286 ExecStart=/var/www/postberg.io/html/writefreely/writefreely --debug (code=exited, status=0/SUCCESS)
Main PID: 6286 (code=exited, status=0/SUCCESS)
CPU: 109ms
Feb 26 20:41:27 postberg systemd[1]: writefreely.service: Deactivated successfully.
Feb 26 20:41:27 postberg systemd[1]: writefreely.service: Scheduled restart job, restart counter is at 5.
Feb 26 20:41:27 postberg systemd[1]: Stopped writefreely.service.
Feb 26 20:41:27 postberg systemd[1]: writefreely.service: Start request repeated too quickly.
Feb 26 20:41:27 postberg systemd[1]: writefreely.service: Failed with result 'start-limit-hit'.
Feb 26 20:41:27 postberg systemd[1]: Failed to start writefreely.service.
sudo journalctl -u writefreely.service
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 Starting WriteFreely 0.15.0...
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 Loading config.ini configuration...
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 Loading templates...
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 templates/bare.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 templates/base.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 templates/chorus-collection-post.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 templates/chorus-collection.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 templates/classic.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 templates/collection-post.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 templates/collection-tags.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 templates/collection.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 templates/edit-meta.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 templates/pad.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 templates/password-collection.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 templates/post.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 templates/read.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 Loading pages...
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [404-general.tmpl] pages/404-general.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [404.tmpl] pages/404.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [410.tmpl] pages/410.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [500.tmpl] pages/500.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [503.tmpl] pages/503.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [about.tmpl] pages/about.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [blank.tmpl] pages/blank.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [contact.tmpl] pages/contact.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [landing.tmpl] pages/landing.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [login.tmpl] pages/login.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [privacy.tmpl] pages/privacy.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [reset.tmpl] pages/reset.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [signup-oauth.tmpl] pages/signup-oauth.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [signup.tmpl] pages/signup.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 Loading user pages...
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [user/app-settings.tmpl] templates/user/admin/app-settings.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [user/app-updates.tmpl] templates/user/admin/app-updates.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [user/monitor.tmpl] templates/user/admin/monitor.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [user/pages.tmpl] templates/user/admin/pages.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [user/users.tmpl] templates/user/admin/users.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [user/view-page.tmpl] templates/user/admin/view-page.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [user/view-user.tmpl] templates/user/admin/view-user.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [user/admin.tmpl] templates/user/admin.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [user/articles.tmpl] templates/user/articles.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [user/collection.tmpl] templates/user/collection.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [user/collections.tmpl] templates/user/collections.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [user/export.tmpl] templates/user/export.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [user/import.tmpl] templates/user/import.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [user/footer.tmpl] templates/user/include/footer.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [user/header.tmpl] templates/user/include/header.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [user/nav.tmpl] templates/user/include/nav.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [user/silenced.tmpl] templates/user/include/silenced.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [user/invite-help.tmpl] templates/user/invite-help.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [user/invite.tmpl] templates/user/invite.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [user/settings.tmpl] templates/user/settings.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [user/stats.tmpl] templates/user/stats.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 [user/subscribers.tmpl] templates/user/subscribers.tmpl
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 Loading encryption keys...
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 keys/email.aes256
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 keys/cookies_auth.aes256
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 keys/cookies_enc.aes256
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 keys/csrf.aes256
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 Connecting to sqlite3 database...
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 Adding {domain} routes (single user)...
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 Going to serve...
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 Using autocert on host postberg.io
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 Serving on https://localhost:443
Feb 26 20:41:27 postberg writefreely[6286]: 2024/02/26 20:41:27 ---
Feb 26 20:41:27 postberg systemd[1]: writefreely.service: Deactivated successfully.
Feb 26 20:41:27 postberg systemd[1]: writefreely.service: Scheduled restart job, restart counter is at 5.
Feb 26 20:41:27 postberg systemd[1]: Stopped writefreely.service.
Feb 26 20:41:27 postberg systemd[1]: writefreely.service: Start request repeated too quickly.
Feb 26 20:41:27 postberg systemd[1]: writefreely.service: Failed with result 'start-limit-hit'.
Feb 26 20:41:27 postberg systemd[1]: Failed to start writefreely.service.
Ah it doesn’t look like it errored at all, actually. But something else weird is going on that I’m not sure of.
My only suggestion would be to change your configuration so these values are blank:
tls_cert_path =
tls_key_path =
and then try to start the application. Otherwise, I’ll need to look into this since it might be a bug.
Removed certs, and run ./writefreely --debug, there is a permission denied at the bottom…
2024/02/26 20:58:38 Starting WriteFreely 0.15.0...
2024/02/26 20:58:38 Loading config.ini configuration...
2024/02/26 20:58:38 Loading templates...
2024/02/26 20:58:38 templates/bare.tmpl
2024/02/26 20:58:38 templates/base.tmpl
2024/02/26 20:58:38 templates/chorus-collection-post.tmpl
2024/02/26 20:58:38 templates/chorus-collection.tmpl
2024/02/26 20:58:38 templates/classic.tmpl
2024/02/26 20:58:38 templates/collection-post.tmpl
2024/02/26 20:58:38 templates/collection-tags.tmpl
2024/02/26 20:58:38 templates/collection.tmpl
2024/02/26 20:58:38 templates/edit-meta.tmpl
2024/02/26 20:58:38 templates/pad.tmpl
2024/02/26 20:58:38 templates/password-collection.tmpl
2024/02/26 20:58:38 templates/post.tmpl
2024/02/26 20:58:38 templates/read.tmpl
2024/02/26 20:58:38 Loading pages...
2024/02/26 20:58:38 [404-general.tmpl] pages/404-general.tmpl
2024/02/26 20:58:38 [404.tmpl] pages/404.tmpl
2024/02/26 20:58:38 [410.tmpl] pages/410.tmpl
2024/02/26 20:58:38 [500.tmpl] pages/500.tmpl
2024/02/26 20:58:38 [503.tmpl] pages/503.tmpl
2024/02/26 20:58:38 [about.tmpl] pages/about.tmpl
2024/02/26 20:58:38 [blank.tmpl] pages/blank.tmpl
2024/02/26 20:58:38 [contact.tmpl] pages/contact.tmpl
2024/02/26 20:58:38 [landing.tmpl] pages/landing.tmpl
2024/02/26 20:58:38 [login.tmpl] pages/login.tmpl
2024/02/26 20:58:38 [privacy.tmpl] pages/privacy.tmpl
2024/02/26 20:58:38 [reset.tmpl] pages/reset.tmpl
2024/02/26 20:58:38 [signup-oauth.tmpl] pages/signup-oauth.tmpl
2024/02/26 20:58:38 [signup.tmpl] pages/signup.tmpl
2024/02/26 20:58:38 Loading user pages...
2024/02/26 20:58:38 [user/app-settings.tmpl] templates/user/admin/app-settings.tmpl
2024/02/26 20:58:38 [user/app-updates.tmpl] templates/user/admin/app-updates.tmpl
2024/02/26 20:58:38 [user/monitor.tmpl] templates/user/admin/monitor.tmpl
2024/02/26 20:58:38 [user/pages.tmpl] templates/user/admin/pages.tmpl
2024/02/26 20:58:38 [user/users.tmpl] templates/user/admin/users.tmpl
2024/02/26 20:58:38 [user/view-page.tmpl] templates/user/admin/view-page.tmpl
2024/02/26 20:58:38 [user/view-user.tmpl] templates/user/admin/view-user.tmpl
2024/02/26 20:58:38 [user/admin.tmpl] templates/user/admin.tmpl
2024/02/26 20:58:38 [user/articles.tmpl] templates/user/articles.tmpl
2024/02/26 20:58:38 [user/collection.tmpl] templates/user/collection.tmpl
2024/02/26 20:58:38 [user/collections.tmpl] templates/user/collections.tmpl
2024/02/26 20:58:38 [user/export.tmpl] templates/user/export.tmpl
2024/02/26 20:58:38 [user/import.tmpl] templates/user/import.tmpl
2024/02/26 20:58:38 [user/footer.tmpl] templates/user/include/footer.tmpl
2024/02/26 20:58:38 [user/header.tmpl] templates/user/include/header.tmpl
2024/02/26 20:58:38 [user/nav.tmpl] templates/user/include/nav.tmpl
2024/02/26 20:58:38 [user/silenced.tmpl] templates/user/include/silenced.tmpl
2024/02/26 20:58:38 [user/invite-help.tmpl] templates/user/invite-help.tmpl
2024/02/26 20:58:38 [user/invite.tmpl] templates/user/invite.tmpl
2024/02/26 20:58:38 [user/settings.tmpl] templates/user/settings.tmpl
2024/02/26 20:58:38 [user/stats.tmpl] templates/user/stats.tmpl
2024/02/26 20:58:38 [user/subscribers.tmpl] templates/user/subscribers.tmpl
2024/02/26 20:58:38 Loading encryption keys...
2024/02/26 20:58:38 keys/email.aes256
2024/02/26 20:58:38 keys/cookies_auth.aes256
2024/02/26 20:58:38 keys/cookies_enc.aes256
2024/02/26 20:58:38 keys/csrf.aes256
2024/02/26 20:58:38 Connecting to sqlite3 database...
2024/02/26 20:58:38 Adding {domain} routes (single user)...
2024/02/26 20:58:38 Going to serve...
2024/02/26 20:58:38 Serving on http://localhost:443
2024/02/26 20:58:38 ---
ERROR: 2024/02/26 20:58:38 app.go:551: Could not bind to address: listen tcp 127.0.0.1:443: bind: permission denied
Thanks, so it looks like it’s really an issue with running WriteFreely on a privileged port (443). You can fix it by running this command:
sudo setcap 'cap_net_bind_service=+ep' /var/www/postberg.io/html/writefreely/writefreely
then start the app and it should work!